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: Execute on shutdown


10 Sep 2011   #1

Windows 7
 
 
Execute on shutdown

Hallo,

For some reasons I want to execute some programs before the System is shut down.

I want to normally choose the shutdown button to perform the shutdown
(or other button on the same location),
But a message should show something like “performing …”
and after finishing finally shutting down the PC.
The Windows Update sometimes does have the same behaviour.

I’m looking for this feature for Windows 7 and XP.
Each would help a lot.

I also already tried some programs, but it looks like I’m not geek enough
I hope someone already achieved this and could explain how.

My System SpecsSystem Spec
.

12 Sep 2011   #2

Windows 7 Ultimate x64/Windows 8 Consumer Preview x64/Ubuntu 11.04
 
 

Windows 7 Shutdown Assistant looks good but it's $19.95. There's a free trial though if you want to check it out.
Windows 7 Shutdown Assistant – Help You schedule Windows 7 PC to shut down, Write Notes and Run file, Program

You could also run the command where **** is the time in seconds until shutdown:
shutdown -s -t ****

Another option is to use the native Task Scheduler. This will enable you to automatically run a program at a certain time. You might be able to shutdown the system after the program has finished.
Task Scheduler - Create New Task
My System SpecsSystem Spec
12 Sep 2011   #3

Windows 7
 
 

Quote   Quote: Originally Posted by JaidynM View Post
Windows 7 Shutdown Assistant looks good but it's $19.95. There's a free trial though if you want to check it out.
Windows 7 Shutdown Assistant – Help You schedule Windows 7 PC to shut down, Write Notes and Run file, Program
I do not realy know what this Programm realy does.
But It does not put A button to the shut down option where I can select the spectial shutdown.
It can also not replace the normal shut down, with aditional pre shutdown features.

Quote   Quote: Originally Posted by JaidynM View Post
You could also run the command where **** is the time in seconds until shutdown:
shutdown -s -t ****
running a Programm that shuts down the PC in the end is not the same,
also it is uncomfortable and the usere can interfer with it and cause Problems

Quote   Quote: Originally Posted by JaidynM View Post
Another option is to use the native Task Scheduler. This will enable you to automatically run a program at a certain time. You might be able to shutdown the system after the program has finished.
Task Scheduler - Create New Task
The Task scheduler also does not provide a Feature to trigger a programm during shutdown.

My Goal would be a changed shut down.
So that a Programm/script can run like the windows update during the shutdown process. So that the user can not get in trubels working on the machine.
Th script than could be used eg for BackUp purpose, ....

The feature is that the user is not disturbed as it does not run when he is working on the PC but when he is leaving the PC.
Also the user don't have to think about it!
A seperate programm placed anywere else would not archive the same.


So what I'm now thinking about is: What does the Windows Shutdown button triger?
Is there a way to change this command to another script/program which would show a shutdown screen and process its work.
My System SpecsSystem Spec
.


13 Sep 2011   #4

Windows 7 32 bit
 
 

It's not really a good idea to try to perform lengthy tasks at shutdown. For one thing, apps that don't reply TRUE meaning it's ok to shut down, are displayed on the shutdown screen(that black screen saying "waiting for a background process to end") and the user can kill them, thinking they are hung.

Here's details of how programs are notified of shutdown:
WM_QUERYENDSESSION Message (Windows)

If you have to do some task, then restart the computer, it's better to use a program that specifically does it. There are system calls to restart the computer and restart certain apps on startup etc.. See the MSDN section on shutting down.

Another risk is some users seeing it take forever to shut the system down may just hold down the power button.
My System SpecsSystem Spec
13 Sep 2011   #5

Windows 7
 
 

Quote   Quote: Originally Posted by MilesAhead View Post
It's not really a good idea to try to perform lengthy tasks at shutdown. For one thing, apps that don't reply TRUE meaning it's ok to shut down, are displayed on the shutdown screen(that black screen saying "waiting for a background process to end") and the user can kill them, thinking they are hung.
Windows Update does NOT show this screen.
It shows somethink like:
Quote:
Updateing step 0 of 3
XY% done
Please Do not power off the Computer
Quote   Quote: Originally Posted by MilesAhead View Post
Here's details of how programs are notified of shutdown:
WM_QUERYENDSESSION Message (Windows)
Hmmm ... I'll take a look at that.

Quote   Quote: Originally Posted by MilesAhead View Post
If you have to do some task, then restart the computer, it's better to use a program that specifically does it. There are system calls to restart the computer and restart certain apps on startup etc.. See the MSDN section on shutting down.
Why Restart?
The system should perform the task, shutdown and stay off.
Windows Update also uses this procedure for many tasks.

Quote   Quote: Originally Posted by MilesAhead View Post
Another risk is some users seeing it take forever to shut the system down may just hold down the power button.
They will not if they see the massage.
And if so, they will also do it, in other cases, so this is not the problem.
My System SpecsSystem Spec
13 Sep 2011   #6

Windows 7 32 bit
 
 

I didn't say Windows Update shows a screen. I said the shutdown shows the screen if apps are busy and refusing to shut down. It's not a good place to do lengthy stuff. But they call 'em PCs because people do what they want with 'em. Good luck.
My System SpecsSystem Spec
14 Sep 2011   #7

Windows 7
 
 

Quote   Quote: Originally Posted by MilesAhead View Post
I didn't say Windows Update shows a screen. I said the shutdown shows the screen if apps are busy and refusing to shut down.
I didn't say that you said
But fact is that Windows update shows a screen if it is nessesary and there you can NOT stop it.

Quote   Quote: Originally Posted by MilesAhead View Post
It's not a good place to do lengthy stuff.
I think it is the perfect place!
During using, the PC does have to do other things I want to do.
At start up I don't want to wait till the PC is ready.
On shut down ... click - good bye - PC is working and I'm doing some other stuff.

Quote   Quote: Originally Posted by MilesAhead View Post
But they call 'em PCs because people do what they want with 'em. Good luck.
I do not understand what is the meaning ...
My System SpecsSystem Spec
15 Sep 2011   #8

Windows 7 Ultimate x64/Windows 8 Consumer Preview x64/Ubuntu 11.04
 
 

Quote   Quote: Originally Posted by MPREv View Post
Quote   Quote: Originally Posted by JaidynM View Post
Windows 7 Shutdown Assistant looks good but it's $19.95. There's a free trial though if you want to check it out.
Windows 7 Shutdown Assistant – Help You schedule Windows 7 PC to shut down, Write Notes and Run file, Program
I do not realy know what this Programm realy does.
But It does not put A button to the shut down option where I can select the spectial shutdown.
It can also not replace the normal shut down, with aditional pre shutdown features.

Quote   Quote: Originally Posted by JaidynM View Post
You could also run the command where **** is the time in seconds until shutdown:
shutdown -s -t ****
running a Programm that shuts down the PC in the end is not the same,
also it is uncomfortable and the usere can interfer with it and cause Problems

Quote   Quote: Originally Posted by JaidynM View Post
Another option is to use the native Task Scheduler. This will enable you to automatically run a program at a certain time. You might be able to shutdown the system after the program has finished.
Task Scheduler - Create New Task
The Task scheduler also does not provide a Feature to trigger a programm during shutdown.

My Goal would be a changed shut down.
So that a Programm/script can run like the windows update during the shutdown process. So that the user can not get in trubels working on the machine.
Th script than could be used eg for BackUp purpose, ....

The feature is that the user is not disturbed as it does not run when he is working on the PC but when he is leaving the PC.
Also the user don't have to think about it!
A seperate programm placed anywere else would not archive the same.


So what I'm now thinking about is: What does the Windows Shutdown button triger?
Is there a way to change this command to another script/program which would show a shutdown screen and process its work.
Sorry, I couldn't find much else. If I come across any such program, I'll be sure to VM/PM you.
My System SpecsSystem Spec
15 Sep 2011   #9

Windows 7
 
 

Quote   Quote: Originally Posted by JaidynM View Post
Sorry, I couldn't find much else. If I come across any such program, I'll be sure to VM/PM you.
Thanx, thats very nice!

I'm now thinking at a new approache.

The Windows Taskplaner.
There you can choose a event as trigger.
I look in the predefined but I don't find a "start to shut down" like event.

But if there is one this could be used I think!

Maybe anyone else know something ...
My System SpecsSystem Spec
Reply

 Execute on shutdown




Thread Tools



Similar help and support threads for2: Execute on shutdown
Thread Forum
sidebar execute Software
Execute Last Command General Discussion
execute a .bat and .exe file as administrator once for all System Security
Windows 7 administrator: can't restart, shutdown, execute anything General Discussion
Is there a way to execute a prgm/script at user logoff/shutdown? General Discussion
Help bat file to execute a bat General Discussion
Cannot execute webcam Hardware & Devices

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 12:47 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33