We have AD2003 implemented and clients getting login scripts from GPO's. We have the script in UserConfig/WindowsSettings/Scripts - Startup. It runs but i have this problem below.
Here is vb code i have created so far.
On Error Resume Next
wi = "domain\nypak-workstation installers"
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
Call wshshell.run("cmd.exe /C net localgroup administrators " & wi & " /add")
'call wshshell.run("cmd.exe /C net localgroup administrators domain\domain admins /add")
call wshshell.run("cmd.exe /C net localgroup administrators domain\a1migrator /add")
Problem is, the script only works for the domain\a1migrator line. the other two lines fail no matter what i do. it seems to be the spaces causing the issue though. How should i be structuring this script?
Thanks,
Here is vb code i have created so far.
On Error Resume Next
wi = "domain\nypak-workstation installers"
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
Call wshshell.run("cmd.exe /C net localgroup administrators " & wi & " /add")
'call wshshell.run("cmd.exe /C net localgroup administrators domain\domain admins /add")
call wshshell.run("cmd.exe /C net localgroup administrators domain\a1migrator /add")
Problem is, the script only works for the domain\a1migrator line. the other two lines fail no matter what i do. it seems to be the spaces causing the issue though. How should i be structuring this script?
Thanks,