Windows 11 batch script on logoff does not work

TomNXT

New Member
Joined
Dec 27, 2022
Messages
4
Hello, so i added my batch script for auto turning off nanoleafs on pc shutdown via this tutorial Executing a batch script on Windows shutdown but it does not work, if you run the script alone, it works fine, but not on windows shutdown... any ideas? Its added in a shutdown folder and also linked via "add" button
 


Have you looked at the event viewer to see if there is an error message? Does the script execute from the task scheduler? Do you have it set to execute on shutdown or logoff? Both are different events.
 


in task scheduler it works, if i go to gpedit to scripts there is only Shutdown and Startup options no logoff and this is meant to work for shutdown, event viewer i dont know how to check i never worked with it

edit: ok ihave looked into the event viewer and there are no errors referring to my batch script, i converted it to .exe file, again it works if i open it but not on shutdown if i add it into scripts section
 


If you're trying to do with with a GPO you will want to enable GPO tracing & logging and examine that log for errors
 


ah nvm, i fixed it by putting it into a logoff folder, that worked
 


Solution
Back
Top