Jump to content

[Server 2003/XP Pro] Startup script does not run


careless_hxuk
 Share

Recommended Posts

Is there some trick to creating startup scripts that I have missed? Mine is not working and I can't figure it out.

I've created a script to add a scheduled task which shuts down the machine at the end of the day. In total I have three batch files: AddScheduledTask.bat, shutdown1.bat and shutdown2.bat

AddScheduledTask.bat

@echo off
schtasks /create /tn "5pmshutdown" /tr "\\server\netlogon\shutdown\shutdown1.bat" /sc once /st 16:45:00 /sd %date% /ru "System"
schtasks /create /tn "9pmshutdown" /tr "\\server\netlogon\shutdown\shutdown2.bat" /sc once /st 21:25:00 /sd %date% /ru "System"

shutdown1.bat

@echo off
\\server\netlogon\shutdown\psshutdown.exe -c -f -k -t 900 -m "The computer will shut down in 15 minutes. Please save your work and log off, or press cancel to abort the shutdown."

shutdown2.bat

@echo off
\\server\netlogon\shutdown\psshutdown.exe -f -k -t 300 -m "The computer will shut down in 5 minutes. Please save your work and log off. This shutdown cannot be aborted."

The scripts are saved in \\server\NETLOGON\shutdown. I've created a GPO and added the AddScheduledTask.bat script to the startup scripts for that GPO. I've then linked the GPO to a test OU within active directory. I've checked the share permissions for the NETLOGON share and the computer account has the correct privileges to be able to access it. Beyond this, I don't know what else to try.

Am I missing something?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...