[THIN] Re: [SPAM] Re: OT: Visual Basic Help

  • From: "Avien Darbendy" <a.darbendy@xxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>, <thin-bounce@xxxxxxxxxxxxx>
  • Date: Thu, 13 Jan 2005 14:18:29 +0100

Thin-bounce I am very glad with your script, We have spend in the past
very much time to write script to edit TS profile path and Home
directory path on Terminal service-profile tab. Thanks to your script we
successfully edit the TS profile path, I will appreciate if you tell me
how can I change the home directory path on Terminal service-profile
tab, see figure through VBS.

 

I use ADSVW.exe to examine the name of argumentum, but I find nothing
about Terminal service properties. 

 

 

 

Thanks,

Avien

 

-----Oorspronkelijk bericht-----
Van: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] Namens
Pavlo Ignatusha
Verzonden: dinsdag 11 januari 2005 17:06
Aan: thin@xxxxxxxxxxxxx
Onderwerp: [SPAM] [THIN] Re: OT: Visual Basic Help

 

I use this kind of script to change some user attributes (TS profile
Path,

logon script, home drive letter and home folder path) for all users in

certain OU. Edit it to reflect your AD and the user account attributes
you

need changed.

 

---------------------------------Beginning of script

insert-----------------------------------------

Option Explicit

 

Dim strOU, strHomeFolder, strProfile, strScript, strDrive, objOU,
objUser,

objShell, objExecObject, strUser

 

Set objShell = WScript.CreateObject("WScript.Shell")

strOU = "OU=Your_OU,DC=Your_Domain1,DC=Your_Domain2"

strScript = "netlogon.bat"

strHomeFolder = "\\pgh\dfsroot\home"

strDrive = "U:"

 

set objOU = GetObject("LDAP://"; & strOU)

 

objOU.Filter = Array("user")

 

For Each objUser in objOU

Set objExecObject = objShell.Exec ("tsprof /update /domain:pgh

/profile:\\pgh\dfsroot\tsprofiles\" & objUser.SAMAccountName & " " &

objUser.SAMAccountName)

Wscript.sleep 1000

objUser.scriptPath = strScript

objUser.HomeDirectory = strHomeFolder & "\" & objUser.SAMAccountName

objUser.HomeDrive = strDrive

 

objUser.SetInfo

Next

 

wscript.Echo "script is complete"

 

----------------------End of script

insert---------------------------------------------------------------

 

Thanks,

 

Pavlo Ignatusha

Systems Network Coordinator

Pembroke General Hospital

Tel. (613) 732-3675 ext.6150

Fax. (613) 732-9986

www.pemgenhos.org

 

"All that matters is love and work" - Sigmund Freud.

 

 

-----Original Message-----

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx]On
Behalf

Of Taylor, George

Sent: Tuesday, January 11, 2005 10:46 AM

To: thin@xxxxxxxxxxxxx

Subject: [THIN] OT: Visual Basic Help

 

 

I'm hoping there are some VB gurus on this list that could help me out.

Awhile back someone here wrote a script using examples from MS to create

users from a text file.  It worked fine, but a mistake was made and the

attribute MSexchQueryBaseDN got set to an odd place.  This has basically

stop them from using the Exchange Address book in OWA.  I have many

hundreds of users that are like this.  Obviously I don't want to have to

manually change this on each and every one.

 

Could any of you scripting gurus our there provide me with an example of

how you would change this attribute using VB?

 

Thanks Much,

 

George

********************************************************

This Weeks Sponsor SeamlessPlanet.com Domain Names

Register your .com domain name for as low as $7.85

One of the lowest prices on the web! Part of The Kenzig Group.

http://www.seamlessplanet.com

********************************************************** 

Useful Thin Client Computing Links are available at:

http://thin.net/links.cfm

ThinWiki community - Awesome SBC Search Capabilities!

http://www.thinwiki.com

***********************************************************

For Archives, to Unsubscribe, Subscribe or 

set Digest or Vacation mode use the below link:

http://thin.net/citrixlist.cfm

GIF image

Other related posts:

  • » [THIN] Re: [SPAM] Re: OT: Visual Basic Help