Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: How to run a program immediately prior to shutdown?

06 Dec 2014   #1

Windows 7 Professional 64-bit SP1
How to run a program immediately prior to shutdown?


I decided to start a new thread about this as it's usually preferred to resurrecting an old one. I want to do the same as the original poster in this thread, i.e use the shutdown button to trigger a batch file or script to run before shutdown.

I'm running W7 Pro SP1 but I can't find any reference to gpedit on my system. I used to be able to find my way round earlier versions of Windows but the combination of advancing years together with Microsoft's habit of throwing the pack of cards in the air every time they bring out a new version means I'm struggling to find anything in this one.

Any help would be greatly appreciated.
My System SpecsSystem Spec
06 Dec 2014   #2

Windows 7 Ultimate x64 sp1

Open the "run" dialog. win key + r, or type run in the search under start button.
Type gpedit.msc . then hit ok.
My System SpecsSystem Spec
06 Dec 2014   #3

Windows 7 Professional 64-bit SP1

Many thanks rustberger. Am I correct in thinking that I can just add an ordinary DOS batch file into the Shutdown Scripts location?
My System SpecsSystem Spec


Thread Tools

Similar help and support threads
Thread Forum
Crash during suspend, shutdown/hibernate restarts immediately
HP G62-234DX laptop running Windows 7 Home Premium (64-bit). OS was freshly reinstalled last week. For the past month or so, I've had no sound output from speakers or headphone jack, and attempting to go into sleep mode has resulted in an instant shutdown no matter how sleep mode is started (via...
BSOD Help and Support
Computer Turning Itself Back On Almost Immediately After Shutdown
This doesn't happen all the time but it does happen more than I would like it to. Sometimes after I shutdown my PC via the start button. It will turn itself back on after about 2-3 seconds. This is very annoying and I was wondering it anyone else had this issue or if anyone has even heard of this...
General Discussion
Run program on shutdown
I tried to set a program to run on shutdown, but both solutions found in the Internet are for Win XP, so in Win7 they failed: placing shortcuts to Start Menu > Programs > Shutdown or using gpedit.msc (it's just not present, as soon as I can see). I also tried using the Task Scheduler but I don't...
General Discussion
Hotkey to shutdown immediately ?
I've referred to First time I did a hotkey, somehow it worked, BUT it asked me "What do you want the computer to do?" I wouldn't like it sitting on my desktop either. & now the hotkey is not working whatsoever. I'd...
General Discussion
Shutdown program
I think I got a shutdown script/program from here but couldn't find it. I installed it and it allowed me to use a hotkey to get to the shutdown Windows7 window. Anyone know what I'm talking about. Got it on one of my Win7 machines and want to install it on another new machine.

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 05:21.
Twitter Facebook