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: Run program on shutdown

10 Jan 2010   #1
PeterMinin

Windows 7 Professional 64-bit
 
 
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 know how to set the shutdown event. Any guesses?


My System SpecsSystem Spec
.
10 Jan 2010   #2
WindowsStar

Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
 
 

What version of Windows 7 are you using?
My System SpecsSystem Spec
10 Jan 2010   #3
richc46

Microsoft Community Contributor Award Recipient

Windows 10, Home Clean Install
 
 

Quote   Quote: Originally Posted by PeterMinin View Post
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 know how to set the shutdown event. Any guesses?
Does this help?




How To Automatically Shutdown Your Windows Vista Computer
My System SpecsSystem Spec
.

10 Jan 2010   #4
seekermeister

W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
 
 

How about a batch file to run the program, which includes a shutdown switch?
My System SpecsSystem Spec
10 Jan 2010   #5
PeterMinin

Windows 7 Professional 64-bit
 
 

WindowsStar, Windows 7 Home Premium.
richc46, no, this won't help)
seekermeister, do you mean always shutting down with this batch file? I've already thought about replacing shutdown.exe with my own, which will first do all that I want and then run the original .exe, but it's the last thing I'll try if everything else fails.
My System SpecsSystem Spec
10 Jan 2010   #6
seekermeister

W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
 
 

I have no idea if totally replacing the shutdown.exe would be the right answer for you, because I don't know what purpose that you want to serve, but from the tone of your post, it seems apparent that you want to retain a choice. If that be the case, the batch file could just be a standalone option. Either it, or the normal means of shutdown could be available.
My System SpecsSystem Spec
10 Jan 2010   #7
seekermeister

W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
 
 

If you want to try out the batch file idea, and if like me, you don't know much about programming, Batchrun might be useful:

Batchrun Free Download

I've not used it before, but this converter might make it more useful also:

Bat To Exe Converter Free Download
My System SpecsSystem Spec
10 Jan 2010   #8
PeterMinin

Windows 7 Professional 64-bit
 
 

The purpose is making a patch that would turn off NumLock at shutdown because the led keeps lighting after power-off. But now I found a strange thing: if I manually turn NumLock off and press Shutdown, after logging off the led lights again. It seems that even if I find a way to turn if off in my session, it will be no use, so I have to find the cause of this lighting. I've read suggestions about a BIOS option of keyboard power-on, but it's already turned off, so I guess the cause is in some Windows setting. It's kind of off-topic but this is the actual problem.
My System SpecsSystem Spec
10 Jan 2010   #9
seekermeister

W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
 
 

Yes, it does the same thing on mine, but I fail to see the problem. Outside of simply dealing with an annoyance, is there an operational reason that the LED is a problem? I don't know why the LEDs flash on shutdown, but I assume that when they do this on startup that it has to do with detection procedures. Maybe there is some obscure reason that this is necessary on shutdown also...I don't know.
My System SpecsSystem Spec
10 Jan 2010   #10
PeterMinin

Windows 7 Professional 64-bit
 
 

No, there is nothing but annoyance in it.
You say that your LEDs flash on shutdown, but mine stay on while the computer is off, so it's a bit more annoying If I plug the keyboard off and on again while the computer is off, the LEDs flash and turn off as they should, but it isn't much a solution
My System SpecsSystem Spec
Reply

 Run program on shutdown




Thread Tools





Similar help and support threads
Thread Forum
How to run a program immediately prior to shutdown?
Hi, 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...
General Discussion
How to Auto Shutdown and run program on Windows7
Hello, I like enjoy music before sleep use my PC, but always forget to shut down my PC with windows 7 installed, and another thing is I want to run some program automatically like play a song at 2:30 PM, do you have any idea or tools can do this? Thank you so much! :D PS: I found this software,...
General Discussion
Which program tracks the shutdown processes
There was a program with which one could track the system shutdown processes - but I forgot the name of it. My system is getting ridiculous. It has always been slow at shutdown. That's why I set the Reg Key to 2000ms. But that does not help. The system boots in 15 seconds but needs 2...
Performance & Maintenance
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.
Software
Forced Shutdown when no program running
I have a problem that every time I shut my computer down, a screen pops up that says there is a program running and it is being forced to shut down. The problem is there is NO program running when I shut down. What do I need to do? Thanks
General Discussion
A shutdown program sequence
I have a program that needs to be shut down before I shut down my comp. I have a tweak that forces shut downs but I would prefer to have an automatic shut down sequence so I can have that particular program shut down before the comp shuts down. Is it possible to create a shutdown sequence?
Performance & Maintenance

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 07:12.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App