Run program on shutdown

PeterMinin

New member
Local time
2:02 AM
Messages
22
Location
Moscow
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 Computer

Computer Manufacturer/Model Number
Irbis
OS
Windows 7 Professional 64-bit
CPU
AMD Athlon 7750 Dual-core 2.71 GHz
Motherboard
ASRock N68-S
Memory
4096 MB
Graphics Card(s)
nVidia GeForce 9600 GT
Sound Card
Xonar D1
Monitor(s) Displays
Philips 170C
Screen Resolution
1280*1024
Hard Drives
Hitachi 320 GB
Keyboard
Genius
Mouse
A4Tech X6-005D
Internet Speed
4 Mb/s
What version of Windows 7 are you using?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell OP7010
OS
Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
Memory
16GB
Monitor(s) Displays
4 Dell 24" LCD
Screen Resolution
1280x1024
Keyboard
Dell
Mouse
Dell Optical
Internet Speed
40meg
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 Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell XPS 420
OS
Windows 10, Home Clean Install
CPU
Intel Core2 processsor Q8200(2.33Ghz 1333FSB) Quad Core Tech
Motherboard
Dell
Memory
6 gb
Graphics Card(s)
ATI Radeon 256MB HD3650
Sound Card
Intergrated 7.1 Channel Audio
Monitor(s) Displays
Dell SP2009W 20"
Hard Drives
640 GB Serial ATA Hard drive
Cooling
Fan
Keyboard
Dell USB Keyboard
Mouse
Dell Premium Optical USB
Internet Speed
DSL 2.85
How about a batch file to run the program, which includes a shutdown switch?
 

My Computer

Computer Manufacturer/Model Number
DIY
OS
W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
CPU
Phenom II 1090T w/Noctua NH-D14 /**4400+ X2 w/CM Hyper TX 3
Motherboard
ASRock 890FX Deluxe 4/**A8N-SLI
Memory
2 x 2GB Patriot PGS34g1600LLKA/**4x1GB Corsair VS
Graphics Card(s)
EVGA GTX460 SC/**EVGA 8800GTS
Sound Card
Asus Xonar D2X/**Xonar D1
Monitor(s) Displays
Acer X233H, Dell E152FPc /**LG M237-WD
Screen Resolution
1920x1080 & 1024x768/**1980x1080
Hard Drives
WDC 2TB, 1.5TB, 1TB, 500GB,Seagate 500GB , Maxtor 80GB /**500GB Seagate & WDC 1TB Black
PSU
CM RS600 w/ APC BX1000G/**Antec 500 TP w/ APC BX1000
Case
HAF922/**Antec 1040IIB
Cooling
3x200mm, 1x140 and 1x120mm/**5x80mm fans
Keyboard
Logitech Media USB/**Saitek Eclipse
Mouse
Cordless Trackman Wheel/**Ditto
Internet Speed
3.3Mbps
Other Info
SB 560 5.1 w/ Sennheiser RS140/**Creative T20 speakers, Dvico FusionHDTV7 Gold RT, Cisco E3000, HP 5510V AIO, Linksys E3000, Belkin F5U237 hub and **F5D8055 adapter
(** = 2nd rig)
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 Computer

Computer Manufacturer/Model Number
Irbis
OS
Windows 7 Professional 64-bit
CPU
AMD Athlon 7750 Dual-core 2.71 GHz
Motherboard
ASRock N68-S
Memory
4096 MB
Graphics Card(s)
nVidia GeForce 9600 GT
Sound Card
Xonar D1
Monitor(s) Displays
Philips 170C
Screen Resolution
1280*1024
Hard Drives
Hitachi 320 GB
Keyboard
Genius
Mouse
A4Tech X6-005D
Internet Speed
4 Mb/s
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 Computer

Computer Manufacturer/Model Number
DIY
OS
W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
CPU
Phenom II 1090T w/Noctua NH-D14 /**4400+ X2 w/CM Hyper TX 3
Motherboard
ASRock 890FX Deluxe 4/**A8N-SLI
Memory
2 x 2GB Patriot PGS34g1600LLKA/**4x1GB Corsair VS
Graphics Card(s)
EVGA GTX460 SC/**EVGA 8800GTS
Sound Card
Asus Xonar D2X/**Xonar D1
Monitor(s) Displays
Acer X233H, Dell E152FPc /**LG M237-WD
Screen Resolution
1920x1080 & 1024x768/**1980x1080
Hard Drives
WDC 2TB, 1.5TB, 1TB, 500GB,Seagate 500GB , Maxtor 80GB /**500GB Seagate & WDC 1TB Black
PSU
CM RS600 w/ APC BX1000G/**Antec 500 TP w/ APC BX1000
Case
HAF922/**Antec 1040IIB
Cooling
3x200mm, 1x140 and 1x120mm/**5x80mm fans
Keyboard
Logitech Media USB/**Saitek Eclipse
Mouse
Cordless Trackman Wheel/**Ditto
Internet Speed
3.3Mbps
Other Info
SB 560 5.1 w/ Sennheiser RS140/**Creative T20 speakers, Dvico FusionHDTV7 Gold RT, Cisco E3000, HP 5510V AIO, Linksys E3000, Belkin F5U237 hub and **F5D8055 adapter
(** = 2nd rig)

My Computer

Computer Manufacturer/Model Number
DIY
OS
W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
CPU
Phenom II 1090T w/Noctua NH-D14 /**4400+ X2 w/CM Hyper TX 3
Motherboard
ASRock 890FX Deluxe 4/**A8N-SLI
Memory
2 x 2GB Patriot PGS34g1600LLKA/**4x1GB Corsair VS
Graphics Card(s)
EVGA GTX460 SC/**EVGA 8800GTS
Sound Card
Asus Xonar D2X/**Xonar D1
Monitor(s) Displays
Acer X233H, Dell E152FPc /**LG M237-WD
Screen Resolution
1920x1080 & 1024x768/**1980x1080
Hard Drives
WDC 2TB, 1.5TB, 1TB, 500GB,Seagate 500GB , Maxtor 80GB /**500GB Seagate & WDC 1TB Black
PSU
CM RS600 w/ APC BX1000G/**Antec 500 TP w/ APC BX1000
Case
HAF922/**Antec 1040IIB
Cooling
3x200mm, 1x140 and 1x120mm/**5x80mm fans
Keyboard
Logitech Media USB/**Saitek Eclipse
Mouse
Cordless Trackman Wheel/**Ditto
Internet Speed
3.3Mbps
Other Info
SB 560 5.1 w/ Sennheiser RS140/**Creative T20 speakers, Dvico FusionHDTV7 Gold RT, Cisco E3000, HP 5510V AIO, Linksys E3000, Belkin F5U237 hub and **F5D8055 adapter
(** = 2nd rig)
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 Computer

Computer Manufacturer/Model Number
Irbis
OS
Windows 7 Professional 64-bit
CPU
AMD Athlon 7750 Dual-core 2.71 GHz
Motherboard
ASRock N68-S
Memory
4096 MB
Graphics Card(s)
nVidia GeForce 9600 GT
Sound Card
Xonar D1
Monitor(s) Displays
Philips 170C
Screen Resolution
1280*1024
Hard Drives
Hitachi 320 GB
Keyboard
Genius
Mouse
A4Tech X6-005D
Internet Speed
4 Mb/s
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 Computer

Computer Manufacturer/Model Number
DIY
OS
W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
CPU
Phenom II 1090T w/Noctua NH-D14 /**4400+ X2 w/CM Hyper TX 3
Motherboard
ASRock 890FX Deluxe 4/**A8N-SLI
Memory
2 x 2GB Patriot PGS34g1600LLKA/**4x1GB Corsair VS
Graphics Card(s)
EVGA GTX460 SC/**EVGA 8800GTS
Sound Card
Asus Xonar D2X/**Xonar D1
Monitor(s) Displays
Acer X233H, Dell E152FPc /**LG M237-WD
Screen Resolution
1920x1080 & 1024x768/**1980x1080
Hard Drives
WDC 2TB, 1.5TB, 1TB, 500GB,Seagate 500GB , Maxtor 80GB /**500GB Seagate & WDC 1TB Black
PSU
CM RS600 w/ APC BX1000G/**Antec 500 TP w/ APC BX1000
Case
HAF922/**Antec 1040IIB
Cooling
3x200mm, 1x140 and 1x120mm/**5x80mm fans
Keyboard
Logitech Media USB/**Saitek Eclipse
Mouse
Cordless Trackman Wheel/**Ditto
Internet Speed
3.3Mbps
Other Info
SB 560 5.1 w/ Sennheiser RS140/**Creative T20 speakers, Dvico FusionHDTV7 Gold RT, Cisco E3000, HP 5510V AIO, Linksys E3000, Belkin F5U237 hub and **F5D8055 adapter
(** = 2nd rig)
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 Computer

Computer Manufacturer/Model Number
Irbis
OS
Windows 7 Professional 64-bit
CPU
AMD Athlon 7750 Dual-core 2.71 GHz
Motherboard
ASRock N68-S
Memory
4096 MB
Graphics Card(s)
nVidia GeForce 9600 GT
Sound Card
Xonar D1
Monitor(s) Displays
Philips 170C
Screen Resolution
1280*1024
Hard Drives
Hitachi 320 GB
Keyboard
Genius
Mouse
A4Tech X6-005D
Internet Speed
4 Mb/s
To be honest, I have no idea if the LEDs remain lit after shutdown, because my PC is rarely turned off, and when it is, I'm generally too busy with whatever I'm trying to accomplish to pay any attention to them. As long as something is normal and doesn't physically interfere with other functions, I generally let the PC do what it wants. I would think that you have better things to do with the PC shutdown than to stare at the LEDs. :)
 

My Computer

Computer Manufacturer/Model Number
DIY
OS
W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
CPU
Phenom II 1090T w/Noctua NH-D14 /**4400+ X2 w/CM Hyper TX 3
Motherboard
ASRock 890FX Deluxe 4/**A8N-SLI
Memory
2 x 2GB Patriot PGS34g1600LLKA/**4x1GB Corsair VS
Graphics Card(s)
EVGA GTX460 SC/**EVGA 8800GTS
Sound Card
Asus Xonar D2X/**Xonar D1
Monitor(s) Displays
Acer X233H, Dell E152FPc /**LG M237-WD
Screen Resolution
1920x1080 & 1024x768/**1980x1080
Hard Drives
WDC 2TB, 1.5TB, 1TB, 500GB,Seagate 500GB , Maxtor 80GB /**500GB Seagate & WDC 1TB Black
PSU
CM RS600 w/ APC BX1000G/**Antec 500 TP w/ APC BX1000
Case
HAF922/**Antec 1040IIB
Cooling
3x200mm, 1x140 and 1x120mm/**5x80mm fans
Keyboard
Logitech Media USB/**Saitek Eclipse
Mouse
Cordless Trackman Wheel/**Ditto
Internet Speed
3.3Mbps
Other Info
SB 560 5.1 w/ Sennheiser RS140/**Creative T20 speakers, Dvico FusionHDTV7 Gold RT, Cisco E3000, HP 5510V AIO, Linksys E3000, Belkin F5U237 hub and **F5D8055 adapter
(** = 2nd rig)
OK, I see :) Thanks anyway
 

My Computer

Computer Manufacturer/Model Number
Irbis
OS
Windows 7 Professional 64-bit
CPU
AMD Athlon 7750 Dual-core 2.71 GHz
Motherboard
ASRock N68-S
Memory
4096 MB
Graphics Card(s)
nVidia GeForce 9600 GT
Sound Card
Xonar D1
Monitor(s) Displays
Philips 170C
Screen Resolution
1280*1024
Hard Drives
Hitachi 320 GB
Keyboard
Genius
Mouse
A4Tech X6-005D
Internet Speed
4 Mb/s
In the back of my motherboard manual it actually says that the lights may still remain on - in my BIOS there is an option to disable Num Lock before booting but it turns on in Windows. This might be related to your PSU still supplying juice to your keyboard.
 

My Computer

Computer Manufacturer/Model Number
Sony Vaio Z46GDU
OS
Windows 7 Ultimate x86-64
CPU
[email protected] 1066MHz FSB
Motherboard
Sony branded
Memory
6GB DDR3 1066MHz
Graphics Card(s)
9300M GS 256MB Dedicated (Speed) + Intel4500MHD (Stamina)
Sound Card
Realtek HD Audio
Monitor(s) Displays
13.1' WXGA
Screen Resolution
1600x900
Hard Drives
320GB 7200RPM w/ 16MB cache
Internet Speed
1MB/s
Did someone have a solution to run a program on exit?

I would like to send a power off to the virtual machine running.
I have a .bat file that does just what I want, by I would like that the .bat file runs when shutdown is choosen.

Windows 7 Home Premium 64bit
 

My Computer

OS
Windows 7 Home Premium 64bit

My Computer

Computer Manufacturer/Model Number
DIY
OS
W7x64 Pro, SuSe 12.1/** W7 x64 Pro, XP MCE
CPU
Phenom II 1090T w/Noctua NH-D14 /**4400+ X2 w/CM Hyper TX 3
Motherboard
ASRock 890FX Deluxe 4/**A8N-SLI
Memory
2 x 2GB Patriot PGS34g1600LLKA/**4x1GB Corsair VS
Graphics Card(s)
EVGA GTX460 SC/**EVGA 8800GTS
Sound Card
Asus Xonar D2X/**Xonar D1
Monitor(s) Displays
Acer X233H, Dell E152FPc /**LG M237-WD
Screen Resolution
1920x1080 & 1024x768/**1980x1080
Hard Drives
WDC 2TB, 1.5TB, 1TB, 500GB,Seagate 500GB , Maxtor 80GB /**500GB Seagate & WDC 1TB Black
PSU
CM RS600 w/ APC BX1000G/**Antec 500 TP w/ APC BX1000
Case
HAF922/**Antec 1040IIB
Cooling
3x200mm, 1x140 and 1x120mm/**5x80mm fans
Keyboard
Logitech Media USB/**Saitek Eclipse
Mouse
Cordless Trackman Wheel/**Ditto
Internet Speed
3.3Mbps
Other Info
SB 560 5.1 w/ Sennheiser RS140/**Creative T20 speakers, Dvico FusionHDTV7 Gold RT, Cisco E3000, HP 5510V AIO, Linksys E3000, Belkin F5U237 hub and **F5D8055 adapter
(** = 2nd rig)
Back
Top