9
2
Is there a way that Windows 7 can remind me (with a dialog box for example) to complete some particular tasks before shutting down, such as locking my secret files and logging out from some services?
9
2
Is there a way that Windows 7 can remind me (with a dialog box for example) to complete some particular tasks before shutting down, such as locking my secret files and logging out from some services?
7
If you have logon auditing enabled (which you can do from the Security Policies management console, secpol.msc
), you can use the event viewer to find the event for user logoff or system shutdown. Then, you can click on "create a task for this event" and create a task that displays the desired message. As mentioned in the comments, you could also use a logoff or shutdown script.
If you were to use a logoff script, you would want to create the script, most likely using VBscript, and then use group policy settings (gpedit.msc
) to set it up. The main function you'll be looking at is MsgBox
, which displays a standard Windows message box with whatever text, buttons, icons, etc. you want.
This is just an example, which shows a warning-style box with a single OK button. For full documentation, see the MSDN article on MsgBox.
MsgBox "Please make sure to clean up after yourself before logging off. Have you done everything?",48,"Clean up"
...which gives you
0
Go to Windows Task Scheduler, and create a task. In the Triggers section, click New... and in the Begin a Task... drop-down, select the option that works best for you.
There a lot of different options etc. to choose from. Enjoy!
2Hi Josh, Thanks for the wonderful option, but i can't see any shutdown trigger there.. Can you please explain more if there is any of that option – Chetan Sharma – 2010-10-14T15:50:15.040
Good point. I don't see any "shutdown" option either. Perhaps you could create a task that gets triggered using the Lock function that does the things that you want, and then executes a shutdown when complete. So instead of explicitly shutting down your PC, just click the Lock instead. – Joshua – 2010-10-14T21:17:19.717
1+1 He could use a user logoff script or a shutdown scipt as an alternative. – paradroid – 2010-10-14T21:43:44.277
Indeed, that would work as well. – nhinkle – 2010-10-14T23:07:49.643
Hmmm, logoff or shutdown script, does that mean i have to write .bat file or are there other ways to do this work... (I only know about .bat files) – Chetan Sharma – 2010-10-15T03:09:28.140
1It would be better to use a VBscript, since those can create messages. I'll edit my post to include an example. – nhinkle – 2010-10-15T03:12:04.517
FYI secpol.msc isn't included with Win7 Home Premium or less. – stentor – 2013-02-03T20:24:24.827