Doing some digging within Microsoft and various sites on the Internet, I am interested in updating a "Create" User Script

CAUTION - The following code is in VBScript and not Kixtart.

code:

sub CreateUser(ServerName, name, password, fullname, logonscript)
on error resume next
err.clear

set objServer = GetObject("WinNT://" & ServerName)
set objUser = objServer.Create ("user", name)
objUser.Fullname = fullname
objUser.setPassword password
objUser.loginscript = logonscript
objUser.SetInfo

if err <> 0 then
WScript.Echo "Unable to create user" & name
Else
Wscript.Echo "Finished creating user: " & name
end if
end sub

CreateUser "vernonh0", "KenT", "abc123", "Kenneth Tam", "logon.wsf"
CreateUser "vernonh0", "MariaL", "abc123", "Maria Lau", "logon.wsf"
CreateUser "vernonh0", "VinceH", "abc123", "Vince Hui", "logon.wsf"



The above code is great, but I want to add addtional parameters for Terminal Server (Win32_TerminalServiceSetting CIM_Setting):

code:

uint32 SetHomeDirectory (
string "H: \\Server\KDyer$"
);

uint32 SetProfilePath (
string \\Server\Citrix_Profiles\KDyer
);


I did find some references to the "extended" or Terminal Service section of a User's Profile, but am kinda stuck.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/tsref_15yf.asp
Win32_TerminalServiceSetting CIM_Setting
HomeDirectory H: \\portntsh01\KDyer1$ -- or SetHomeDirectory http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/tsref_82qv.asp
ProfilePath = \\portntsh01\Citrix_Profiles\KDyer -- or SetProfilePath http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/tsref_7hwn.asp http://www.scriptinternals.de/content/ref/wmi/namespaces/root_cimv2/CIM_Setting/CIM_Setting.htm http://www.scriptinternals.de/content/ref/wmi/namespaces/root_cimv2/Win32_TerminalServiceSetting/Win32_TerminalServiceSetting.htm http://cwashington.netreach.net/depo/view.asp?Index=133&ScriptType=vbscript

Any insights on how to set these would helpful.

Thanks!

- Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's