careless_hxuk Posted February 24, 2009 Share Posted February 24, 2009 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.batAddScheduledTask.bat@echo offschtasks /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 More sharing options...
careless_hxuk Posted February 24, 2009 Author Share Posted February 24, 2009 Update: After reading around, I moved the AddScheduledTask.bat file from its original path to the GPO folder. I've also checked gpresult and the GPO has been applied to the computer, but still no sign of the scheduled tasks... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now