Turn Off Computer
Results 1 to 8 of 8

Thread: Turn Off Computer

Hybrid View

  1. #1
    Join Date
    Nov 2001
    Location
    California, USA
    Posts
    2,020

    Turn Off Computer

    Does anyone know how to turn off the computer befores it boots into WindowXP? Lets say I boot up using a floppy disk, is there a command to turn off the computer.

    No, I am not looking for the power button , but a command. Otherwise, how does WindowXP do it?

    Thanks

  2. #2
    Join Date
    Jul 2001
    Location
    Chicago
    Posts
    1,107
    XP uses the drivers for ACPI or whatever other power configuration it's using. Command.com and cmd.exe provide no such executable. The only reason a PC needs to be able to shut itself down is to update the swap file and power down some devices, and no command prompt uses a swap file or any mission-critical devices, the command has never been created.

    I'm sure a programmer could create a 'boot disk' that would simply power the computer down, but I have never heard of it being done. And there may be other OSes that offer this feature, but not from Microsoft. What are you trying to accomplish with this?

  3. #3
    Join Date
    Nov 2001
    Location
    California, USA
    Posts
    2,020
    Thanks for your reply.

    The reason why I am asking about this is because, currently, I have GHOST burned on a cd. I use a batch file to run it. In GHOST, there are commands that after you finish reimaging the drives, it can go back to DOS or reboot to Windows.

    Anyway, the point is, it takes along time to reimage soemtime so I just go upstair and sleep. I want it, when GHOST is done reimaging or cloning, it will automatically shut the computer off rather then running all night.

  4. #4
    Join Date
    Jul 2001
    Location
    Chicago
    Posts
    1,107
    I could do it if you were running windows 98. Maybe someone can take this 16-bit solution and reapply it to XP. I'm not fluent enough on the ins and outs yet. So this is not a final suggestion, just a jumping off point.

    Add this key to the registry immediately before ghosting the drive:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce "C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows"
    Then set the ghost batch file to boot to windows

    The key should stay the same, but the executable is different and the parameters probably are, too.

  5. #5
    Join Date
    Apr 2000
    Location
    Friern Barnet, London, England
    Posts
    46,565
    The prof's solution looks like it should work, but have a look at this - I didn't read it very thouroughly, but it might be able to do what you want:

    http://www.eyrx.com/DOC/D_GUIDE/STRTSTOP.HTM
    Nick.

  6. #6
    Join Date
    Nov 2001
    Location
    California, USA
    Posts
    2,020
    Thanks ProfessorU and SuperSparks,

    I will try it and get back to you.

    Each of the account on my computer has a password to log in.

    The registry entry that you provided, does that mean they have to log in, inorder for it to work?

    Thanks

  7. #7
    Join Date
    Jul 2001
    Location
    Chicago
    Posts
    1,107
    I wouldn't expect the registry key to work until a user is logged into windows, as it could be exploited as a security hole.

    Also, I don't think XP has a rundll.exe, but a rundll32.exe. So that's one of the changes that would have to be made.

    Supersparks link makes things sound pretty complicated, but it almost certainly would work if implemented correctly.

  8. #8
    Join Date
    Jul 2001
    Location
    Chicago
    Posts
    1,107
    Hello again. This thread might be dead but I'll post this anyway. There is no need to call up rundll32 to shutdown XP or 2000, and they don't have the capability anyway. Instead I would try http://www.aumha.org/downloads/shutdown.zip . Running this from the runonce registry key might work.

    Alternately you might be able to use the command-line utility microsoft includes with XP, tsshutdn.exe. I think this is a carryover from win2000 server that MS didn't bother to remove. Again you might be able to run this from the runonce registry key.

    If the registry key won't execute until you log on, you could configure to auto-logon using TweakUI. Of course this would compromise security if you're worried about local security of your PC.
    Last edited by ProfessorU; February 3rd, 2003 at 10:00 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •