How to: Add startup and shutdown scripts in Windows |
| Written by Mihai Dobos | |
|
There are some features of Microsoft Windows that can come very handy from time to time if you know how to use them. Startup and shutdown scripts feature is one of that.
Firstly, you should know what scripts are all about. A script is a set of commands that your system can run in order to automate tasks.
*NOTE: Learn some scripting basics if you are a novice; scripts that are not corectly written can block the computer, the windows startup process or the windows shutdown process.
1. Create a file called script.bat (Right click - New -> Text document and open it with notepad; now click File - Save as and write it's name and extension - .bat with the option Save as: All files) del /q c:\temporary\* By running this batch file you will delete all files in that folder (/q forces delete without confirmation). This is a very simple script; the posibilities are endless and you should learn to use visual basic scripting if you want to build some proffesional work. Now if you want to integrate any kind of script to automatically run when Windows starts or shuts down (user logon/logoff), you must follow these steps: 1. Click Start - Run and type mmc
2. On the Management console that starts, click File -> Add/Remove Snap-in. 3. On the window that opens, search for Group Policy Object editor on the left panel, click Add and in the properties window that pops out leave the settings that are selected (Local computer) and click ok. The result should be like in the picture bellow
4. Navigate through the left panel by opening each branch like this: Console Root -> Computer configuration -> Windows Settings -> Scripts (Startup/shutdown) 5. Open the properties window for Startup or Shutdown as you desire from the right panel; on the window that pops out add, edit or remove scripts that you want.
written by Frank , February 12, 2008
Interesting concept, but it doesn't execute the script at shutdown.
written by vikram , February 19, 2008
thank u lot pls send some more interactivity on writing batch file
written by alvin , March 13, 2008
how to shutdown a computer using time delay ?
written by Mihai Dobos , March 13, 2008
Hello Alvin Open a command prompt (Start menu - Run - cmd) and type "shutdown /?". The shutdown command lets you shutdown, restart, log off, etc your PC after a given period of time.
written by vinitha , April 04, 2008
how to shutdown a client in a network
written by Rudi ludick , May 09, 2008
Hi How can i shutdown a remote pc that is not part of a domain but is in a workgroup? If i use the shutdown command i get access denied.Could some one please help with this? Do you need more help? Ask now!
|
|
| Last Updated ( Thursday, 13 March 2008 ) |