Have you ever forgotten the things you need to do before Shutting Down the computer? Like sending an important mail or locking some files down? I wont believe it if you say NO. Because every once in a while we are so busy in doing OTHER things on computer that we forget the actual reason we logged into the computer. Today I will teach you how to create a reminder message that will pop up when you try to shutdown the computer and asks you to confirm that you have done your "Important Work".
Alright! Lets Begin.
>> Open up the Notepad or any similar text editor.
>> Paste this code in it.
Option Explicit
Dim result
result = MsgBox ("Have you sent that e-mail?", vbYesNo, "System is ready to Shutdown")
Select Case result
Case vbYes
MsgBox("shuting down ...")
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "C:\WINDOWS\system32\shutdown.exe -s -t 1"
Case vbNo
MsgBox("Then do it already")
End Select
>> Edit the code if you like. Change Have you sent that e-mail? with your own message, but make sure that your message is in between " "
>> Now click on File --> Save As. Change "save as type" to All Files. And in "File name" enter the name along with .vbs in the end, like Reminder.vbs
>> Thats almost it. Every time you double click on the Reminder.vbs this message will appear. If you click on Yes, your system will shutdown immediately and No will stop the shutdown process.
This part is optional
>> Now what about the Shutdown button in the start menu. No message will appear if you use that button. So all now need to do is to mimic the same action.
>> Put the Reminder.vbs file in a folder other than desktop. Preferably where you keep your other programs. Right click on Reminder and Send to --> Desktop (create shortcut)
>> On desktop, right click and select the Properties of the shortcut you have just created.
>> Assign a shortcut key to it. Anything you can remember easily.
>> Change the icon as well.
>> One last thing. There is no easy way to bind this script to Shutdown button in the start menu. So we are going to change this Shutdown button with something safe that if you accidentally click this button again (an old habit) you return to your desktop quickly.
>> Right click on the Shutdown button from the start menu and click on Properties. You will see Power button action. Now choose whatever suits you. I am using Lock.
>> That it. All you need is to practice the shortcut key you have assigned or double clicking the shortcut link.
1 Comments
Really helpful, thanks. You saved my time.
ReplyDelete