English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi,

can some one please help!

How can i get a Batch file(.bat) to run when ever
someone logs off or Shutdown a Windows Xp Pro computer.

Is this possible?


Thanks

Amit Panwar

2007-04-03 17:02:26 · 2 answers · asked by amitdelpanwar 1 in Computers & Internet Programming & Design

2 answers

XP Pro- you're in luck it's actually pretty easy.
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/gptext_assigncomputershutdownscripts.mspx?mfr=true


(Not so easy with XP home.)

2007-04-03 17:09:51 · answer #1 · answered by Vegan 7 · 1 0

this is for XP (the most widely used OS), but other versions are similiar:

It is possible to create a shutdown icon, reboot icon, etc...anyway you want.

Here's how to create a shutdown icon:

1) Right click Desktop, select New, select Icon, click browse, then find your way to C:\Windows\System32 folder, and look for the file shutdown, double click to select it, then click Next, the word Shutdown will be the name of the new icon, but you can change to any name you like.

2) your new shutdown icon is on the desktop, right click it, select Properties, at the end of the shutdown.exe , type " -s " (without quotes, make sure there is a space between shutdown.exe and -s (like this: shutdown.exe -s), OK to exit.

To reboot, use -r
To force applictions to shut down, use -f

click Start, click run, type cmd, enter, type shutdown to more informations of other options.

Note: if you create more than 1 shutdown icon (shut down, reboot, etc...), make sure you name each icon accordinately

2007-04-03 17:31:21 · answer #2 · answered by digital_goddess_usa 3 · 0 2

fedest.com, questions and answers