Friday, March 27, 2009

Create shortcut of shutdown and Restart in Xp

U can create a shortcut of shutdown and restart in window xp. No need to goto start button and do all that long stuff.

So here is way to create shutdown button. Open notepad and type the following code.

shutdown -s -t 0

here 0 is zero it is the time in seconds after which machine shutsdown. -s means shutdown.
Now save as this notepad with name shutdown.bat . thats all.

Now here is way to create shortcut to restart or reboot. open notepad and type the following code:

shutdown -r -t 0

here -r means restart. Again save as this notepad as restart.bat thats all. Now when ever u ned to shutdown/restart ur machine click this files thats all.

Now i thought to improve this code so that it even deletes all the temporary files & temporary internet files too before shutdown or restart. so just type following code in notepad:

cd C:\DOCUME~1\crypto\LOCALS~1\Temp
del /q *.*
cd C:\Documents and Settings\crypto\Local Settings\Temporary Internet Files
del /q /f *.*
SHUTDOWN -S -T 0

NOTE: here in code where i have written crypto u have to replace it with ur Username. ok
Similarily by replacing -s with -r u can create it for reboot.

Tested personally.

No comments:

Post a Comment