I've been driving myself nuts trying to run a simple (and I mean SIMPLE) shutdown script to no avail. No matter what script flavor (i.e., .bat, .vbs, .js, .cmd) nothing works. I get nothing. I simply want to remove some logs and files (internet cookies, cache, temp folder contents, etc.) and e-mail a system report upon shutting down. I thought it would be easy; but I can't even get a "Hello World" message box to pop-up.
The event viewer gives me an event id of 1000, source is UserInit, saying that access is denied. The ACLs include SYSTEM with FULL access rights. I tried setting the scripts' ACL to Everyone with FULL to no avail.
Running the Startup scripts don't even PUT an event id in the log; they simply fail in stealth.
2 questions:
1) does the startup/shutdown scripts run under the "SYSTEM" privileges? If not, what security level/acl?
2) ANY ideas how to trace/troubleshoot this issue? Setting scripts to run visible shows nothing.
Logon/Logoff scripts both work for all scripts except for .bat and .cmd (both give a UserInit error (event id 1000) of "No application is associated with the specified file for this operation."
; however, I need to run at the shutdown/startup level (in case there are no logons, I need the report e-mailed anyway--some of my services create logs).
I also tried running them with "RunAs", but I get a UserInit error (event id 1000) of "The system cannot find the file specified."
I should also note that this is a standalone workstation/server, running Win2k Pro SP2 [Version 5.00.2195], and is NOT part of an Active Directory or domain. There are no other issues or errors, either in the Event logs or elsewhere. There are no other anamolies, intermittent or otherwise.
Any suggestions, URL referrals, or, hopefully, solutions, would be *GREATLY* appreciated.
A few of the shutdown scripts I have tried (Each has a corresponding Startup script. E.g., Hello instead of Goodbye, startup instead of shutdown.):
'******************************
' Goodbye.vbs
'******************************
MsgBox "Goodbye world"
//******************************
// Goodbye.vbs
//******************************
WScript.Echo("Goodbye world"
;
'******************************
' shutdown.vbs
'******************************
Set oShell = CreateObject("WScript.Shell"
oShell.Popup "Shutdown Script", 10, "Group Policy - Script Policy"
REM ***************************
REM shutdown.bat
REM ***************************
echo "Shutting down..." >shutdown.out 2>&1
The event viewer gives me an event id of 1000, source is UserInit, saying that access is denied. The ACLs include SYSTEM with FULL access rights. I tried setting the scripts' ACL to Everyone with FULL to no avail.
Running the Startup scripts don't even PUT an event id in the log; they simply fail in stealth.
2 questions:
1) does the startup/shutdown scripts run under the "SYSTEM" privileges? If not, what security level/acl?
2) ANY ideas how to trace/troubleshoot this issue? Setting scripts to run visible shows nothing.
Logon/Logoff scripts both work for all scripts except for .bat and .cmd (both give a UserInit error (event id 1000) of "No application is associated with the specified file for this operation."
I also tried running them with "RunAs", but I get a UserInit error (event id 1000) of "The system cannot find the file specified."
I should also note that this is a standalone workstation/server, running Win2k Pro SP2 [Version 5.00.2195], and is NOT part of an Active Directory or domain. There are no other issues or errors, either in the Event logs or elsewhere. There are no other anamolies, intermittent or otherwise.
Any suggestions, URL referrals, or, hopefully, solutions, would be *GREATLY* appreciated.
A few of the shutdown scripts I have tried (Each has a corresponding Startup script. E.g., Hello instead of Goodbye, startup instead of shutdown.):
'******************************
' Goodbye.vbs
'******************************
MsgBox "Goodbye world"
//******************************
// Goodbye.vbs
//******************************
WScript.Echo("Goodbye world"
'******************************
' shutdown.vbs
'******************************
Set oShell = CreateObject("WScript.Shell"
oShell.Popup "Shutdown Script", 10, "Group Policy - Script Policy"
REM ***************************
REM shutdown.bat
REM ***************************
echo "Shutting down..." >shutdown.out 2>&1