Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error running GPO Startup VBS Script on XP

Status
Not open for further replies.

dachaney

IS-IT--Management
Sep 3, 2001
84
NL
Hi Guys,

I have a very simple machine startup script applied by Group Policy to install(if need be) some audit software when the pc/laptop connects to our domain.

Audit.vbs
Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "\\server\share\audit.exe"

This works fine on Windows 2000 machines, but comes up with an error on XP machines
'Windows Script Host
- Invalid procedure call or argument
- At line 2 char 1
- code 800A0005'

When I run this script manually it works fine

Any Ideas ?

Thanks

 
So it runs OK on Win2K, and runs OK on XP when you manually run it, but doesn't run automatically on XP?

My guess is that it is related to group policy processing, which was changed from Win2K to XP. In XP processing of GPOs can begin before the network is initialized, which means that a UNC path wouldn't be available. If I'm not mistaken, there is an option to force Windows XP clients to wait for the network before applying GPOs.

This can be configured using the following group policy setting:

Computer Configuration --> Administrative Templates --> System --> Logon --> Always wait for the network at computer startup and logon --> Enable
 
Thanks, but this has not solved the issue.
 
try this

Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run("\\server\share\audit.exe")

----------------------------
Josh
CCNA, MCSE 2003(in progress)
 
Well this didn't work either (thanks anyway), however I noticed somthing else. If I copy the script onto the desktop it works fine.

If I try to run the script from the Domain Controller eg by navigating to \\domain\Sysvol\domain\Policies\{GP-guid}\machine\Scripts\Startup and try to run it from there I get the error message as described?

'Windows Script Host
- Invalid procedure call or argument
- At line 2 char 1
- code 800A0005'
- Source: VBScript runtime error

Any other thoughts ?
 
Verify permissions to the policy folder in NTFS.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top