Does anyone have experience with automatically running a program/macro at pc shutdown?
I found the Windows Group Policy Editor, which can apparently do this, but I'm wondering there are third party utilities or other solutions.
Running program at shutdown?
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Macro Scheduler is the answer.
Make a script to run the exit programs you want, then last command will be to logout/exit Windows.
Make a shorcut on the Start Menu to Exit Windows and train that they should choose that icon vs. the normal Shut Down icon.
I don't have the details handy, but you can use the Policy Editor to remove the normal Shut Down Windows icon, so only yours will be there.
Make a script to run the exit programs you want, then last command will be to logout/exit Windows.
Make a shorcut on the Start Menu to Exit Windows and train that they should choose that icon vs. the normal Shut Down icon.
I don't have the details handy, but you can use the Policy Editor to remove the normal Shut Down Windows icon, so only yours will be there.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Group Policy Editor is simplest. You can set it to run a .bat file. So you could create a .bat file to run a Macro Scheduler script/exe.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Thanks, you're right, despite the "turn your pc into a doorstop" warnings I see on the web, the Group Policy Editor is easy to use, it will run a .exe directly. A registry backup is probably a good idea though.
Unfortunately it runs the script/exe towards the end of the shutdown sequence and doesn't solve this particular problem of needing to pre-emptively kill a process that stalls shutdown - so it's back to the drawing board
Unfortunately it runs the script/exe towards the end of the shutdown sequence and doesn't solve this particular problem of needing to pre-emptively kill a process that stalls shutdown - so it's back to the drawing board
-
- Newbie
- Posts: 2
- Joined: Wed Apr 08, 2009 4:29 pm
How about this. Make the macro that you want to run at shutdown, cancel the shutdown process. There is a slash option in the shutdown command to cancel shutdown. After your macro finishes then it could execute shutdown itself. I haven't used this option in a while, but I'm sure it will be simple to find.
May seem wierd to do it this way, but it would work perfectly with the idea
of editing the Group Policy Editor to execute your macro, which would then cancel shutdown, do its thing, and re-issue the shutdown command.
The great thing about doing it this way is you never have to think about it again.
May seem wierd to do it this way, but it would work perfectly with the idea
of editing the Group Policy Editor to execute your macro, which would then cancel shutdown, do its thing, and re-issue the shutdown command.
The great thing about doing it this way is you never have to think about it again.
PepsiHog@work
Of the top of my head I think this is it.There is a slash option in the shutdown command to cancel shutdown. After your macro finishes then it could execute shutdown itself. I haven't used this option in a while, but I'm sure it will be simple to find.
Code: Select all
Run>shutdown.exe -a