Windows 2008 startup script will not run?

Posted by larsks on Server Fault See other posts from Server Fault or by larsks
Published on 2012-10-31T17:00:13Z Indexed on 2012/10/31 23:03 UTC
Read the original article Hit count: 222

I am trying to get a very simple batch script to run when my Windows 2008 Server (R2) system starts up. I have added the script to the "Startup Scripts" in the local group policy by running gpedit.msc, and I see the script listed under Windows Settings/Scripts (Startup/Shutdown)/Startup when I run rsop.msc, but the script is not being executed. The "Last Executed" column in rsop is empty even after a reboot, and a file that should be created by the script is never created.

At the moment, the entire contents of the script are:

rem Check if this script is running.
date /t > c:\temp\flag

The target directory (c:\temp) exists. The script is called c:\scripts\startup.bat, and works fine if I run it by hand.

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about group-policy