1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

How can I run a batch file at shutdown in XP HOME (NOT Pro)?

Discussion in 'Windows XP' started by Roger at CCCC, 2004/04/01.

Thread Status:
Not open for further replies.
  1. 2004/04/01
    Roger at CCCC

    Roger at CCCC Inactive Thread Starter

    Joined:
    2003/05/22
    Messages:
    234
    Likes Received:
    0
    How can I write a batch file to run at shutdown (or logoff) in XP Home (not PRO)? I found a thread that addressed the question in Pro, but not in Home.

    Thanks for any response.
     
  2. 2004/04/01
    Steve R Jones

    Steve R Jones SuperGeek Staff

    Joined:
    2001/12/30
    Messages:
    12,315
    Likes Received:
    252
    What do you want the batch file to do? Is the option to run it not available in home?
     

  3. to hide this advert.

  4. 2004/04/01
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    Steve - if I remember the thread he is probably speaking of, I suggested running a batch file via a logoff script. This is a part of gpedit.msc and I don't think that feature is included with XP-home.

    There may be a way to do the same with XP-home but I'm clueless as to any method to suggest.
     
    Newt,
    #3
  5. 2004/04/01
    Angel71

    Angel71 Inactive

    Joined:
    2003/09/01
    Messages:
    83
    Likes Received:
    0
    There are third-party programs like Shutdown Plus and Show Stopper that may work in XP.

    Alternatively, just add the shutdown command to the end of your batch file, create a shortcut in the quicklaunch bar and use that to shutdown your machine.
     
  6. 2004/04/02
    ToroGuns

    ToroGuns Inactive

    Joined:
    2004/04/02
    Messages:
    48
    Likes Received:
    0
    From TechTV:

    http://tinyurl.com/bgj7

    This is what I use for a 1 click shutdown...If in fact thats what you're looking for.
     
  7. 2004/04/04
    Roger at CCCC

    Roger at CCCC Inactive Thread Starter

    Joined:
    2003/05/22
    Messages:
    234
    Likes Received:
    0
    Thanks for all responses. What I really want to do is run a batch file, ask a question to the user, and then optionally call another batch file. Using gpedit.msc for that purpose doesn't seem to work even in XP Pro. The user's screen hangs and I had to turn off the PC manually. As suggested, I'll try just using a conventional batch file with the Shutdown command at the end and not use the normal Start-Shutdown feature at all.

    Thanks again.
     
  8. 2004/04/04
    dobhar Lifetime Subscription

    dobhar Inactive

    Joined:
    2002/05/24
    Messages:
    924
    Likes Received:
    3
    You could try using Wizmo from Steve Gibson's web site. I have used this for shutting down and rebooting.

    Wizmo is a multipurpose miscellaneous Windows utility that provides an array of single-click functions that are missing from Windows. Triggered by a single mouse click, it can do things like power down your system's displays, activate your screen saver, change or mute the audio volume, restart, reboot, or shutdown your system, and much more. It even includes a rather cool built-in "Graviton" screen saver that simulates the motion of any number of mutually gravitationally attracted celestial objects.

    I have also used (running Windows XP Pro) a Shutdown (C:\Windows\System32\shutdown.exe -s -t 5) shortcut and a Reboot (C:\Windows\System32\shutdown.exe -s -t 5) shortcut.

    Right-click on the Desktop and choose New | Shortcut from the pop-up menu. Browse to the file C:\Windows\ System32\Shutdown.exe, click Next, name the shortcut, and click Finish. Now right-click on the new shortcut and choose Properties. In the Target box, append the command line switch -l (to log off), -s (to shut down), or -r (to reboot).

    If you also add the switch "“t xx (where xx is a number of seconds), Shutdown.exe will display a warning and count down the specified number of seconds before activating. You can specify a comment to be displayed with the warning by adding the switch -c "Your text ". The countdown behavior is particularly useful if the shutdown program is launched through the Scheduled Tasks applet. For example, a library computer might be scheduled to shut down 10 minutes before closing, with a 60-second warning. Once the countdown has begun, the only way to stop it is to launch the program again with the -a (for abort) switch on its command line.

    Shutdown.exe is included with Windows XP, and you can add it to Windows NT 4.0 or 2000 via the corresponding Resource Kit.
     
  9. 2004/04/05
    Roger at CCCC

    Roger at CCCC Inactive Thread Starter

    Joined:
    2003/05/22
    Messages:
    234
    Likes Received:
    0
    Thanks, Dobhar, for your suggestions. I will try them out. When I hear about options like Shutdown.exe or gpedit.msc that are included with Win/XP, I always wonder if there is a comprehensive list somewhere that lists all of these extra provided programs along with a brief description or instructions about what they do. Does anyone know of such a list, and where I can find it? Thanks again.
     
  10. 2004/04/05
    PeteC

    PeteC SuperGeek Staff

    Joined:
    2002/05/10
    Messages:
    28,896
    Likes Received:
    389
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.