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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What context does a Computer Startup Script Run

Status
Not open for further replies.

dachaney

IS-IT--Management
Sep 3, 2001
84
NL
I have a Computer Startup Script (vbs) defined using Group Policy which installs some auditing software on a computer when it connects to the network and domain.

This works fine on a Windows 2000 PC and if run manually on an XP machine when logging in as any type of user, however I get Script Runtime errors on the XP machine at startup.

The GPO has the Computer name in the scope

Under what security context does the script run at computer startup ?

The script is a simple two liner

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

The error given is
'Windows Script Host
- Invalid procedure call or argument
- At line 2 char 1
- code 800A0005'

The share permissions are Everyone=Read

Domain controller = W2k3

Any ideas
Thanks
 
I'm going to guess it's got something to do with the UNC (the double backslash) and the PC trying to connect directly at startup. I had a similar problem with a login script and delayed it a few seconds before running and that seemed to fix it. I say, "seemed" because I have no idea if the delay was for sure the fix or not. I'm not that familiar with vbs but is there a way to delay the second line, say 10 seconds, and see if that works?
 
Thanks

I added a 20 sec delay using Wscript.Sleep 20000 but this had no positive effect
 
Tried something else. Tried to run the script manually (double click) on a Windows 2003 server and got the following message (ran as Admin user)

"Windows Script Host
Script: audit.vbs
Line : 2
Char : 1
Error : Permission Denied
Source : Microsoft VBScript runtime error"

Looks like there are some additional permissions somewhere prevent the script from running correctly.

Any Ideas?
 
sorry should have added the error code

Code : 800A0046
 
Check to see if your anti-virus software has that file locked. This would return the error you receive on the 2003 server and possibly the error at the workstation.

Regards,
David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top