Actually his syntax is fine I tested it on my machine, the only difference I made to it was to change User to user. Something else must be going on.
Clarence
You can get the latest info on ADSI from...
http://www.microsoft.com/ntserver/windowsnt5/exec/feature/ADSIintro.asp
You can get the domain name from
WshNetwork.UserDomain
It may be a problem with the quotes. I build the string first, then just ref the string in the GetObject line.
e.g.
adsPath = "WinNT://" & strDomain & "/" & strUser
set adsObj = GetObject(adsPath)
Regards,
Ian
WSH FAQ http://wsh.glazier.co.nz/frame.htm
Hi,
I have tried to get this to wirk but still gt a syntax error. What could I
have misytyped?
Set UserObj = GetObject("WinNT://Your_Domain/" & u & ",User")
I did insert my server name. Is there anyway to have the script insert my
server name for me?
Thanks
Tim
http://wsh.glazier.co.nz