Set a script to only run while logged off
I wanted to know if there was a way to create a kbox script that will only run on a computer if it is logged off. The situation is that I will be implementing Kbox Patching for Windows XP machines on our network and some of these computers run 24/7. I want to WOL all shutdown computers running a patching job and have the job end at a specific time. Sometime after the patching job is complete, I want to have the machine shutdown the computer but only if the computer is in a logged off state. If the computer is logged on I don't want it to shutdown via this script. Any ideas on how to create a kbox script or know of a different way to accomplish my goals would be great.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
cogx
11 years ago
I can't believe this post is this old and no one ever followed up and that I can't find dozens of other posts asking this question. In any case, I think I finally figured out a way, at least it appears to have just worked on a test script.
Verify the process “explorer.exe” is not running.
and only execute the script if that is true.
I guess I'm more than a little baffled as to why there isn't a simple checkbox for the option to only run a script when no user is logged in.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.