View Full Version : Shortcut to Shutdown Windows XP ~ Problems

11-07-2002, 10:55 PM
Hello all,
Well, I wanted a quick way to shutdown Windows XP. The 'c:\windows\rundll32.exe user.exe ExitWindows' trick does not work, even changing 'c:\windows\system32\rundll32.exe user.exe ExitWindows' won't work.

So, how do you?

Simple, just right-click, New>Shortcut, type 'shutdown -s -f'.

Now, I used this in a batch file, well, tested anyway, however when I shut down this way, the computer will not turn off after shutting down by itself. You know, how recent computers can now switch themselves off once you close Windows, well, my computer does during a normal shut down, but not through the above way.

The reason why I want this is so then I can make a batch file that will check both partitions of my drive, then defragment them and then shut down the computer so I can run it before I go to bed and in the morning find my computer switched off. I have got all the commands set up (chkdsk and defrag), but the shutdown command does the above mentioned thing and is of no help to me unless I create some program to do it properly for me.

Any ideas why it does this and any ways to solve it?

Sam H
11-07-2002, 11:26 PM
I think that command line should read
c:\windows\rundll32.exe user.exe,exitwindows

Hope that helps.


Babe Ruth
12-07-2002, 01:05 AM

The following registry key should do want you want:
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Cu rrentVersion\Winlogon\PowerdownAfterShutdown

This is a REG_SZ type and can have a value of a 1 in which case the computer will turn itself off (assuming your pc hardware supports the feature if not, not harmful but will leave at the "It is now safe to turn off your pc" screen). If the value is 0 then all back to normal.

So in your procedure you will want to add a line like:

:: This command does a silent registry update of the PowerdownAfterShutdown setting
regedit /s powerdown.reg

where the powerdown.reg file should contain:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

Hope that helps...

Cheers, Babe.

Babe Ruth
12-07-2002, 01:37 AM
Actually having posted the previous re "PowerdownAfterShutdown" I don't think that registry key is actually used in Win2k or WinXP.

Back to the drawing board.

12-07-2002, 02:15 AM
Apparently enabling ACPI in the BIOS will actually do the trick, but that's what people say. I have ACPI enabled and when I use the batch file short cut to shutdown, my pc doesn't turn itself off. The easiest way I've found is to just press the computer switch, and it will just go thru shutdown stage and turn itself off. Also I have this little utility that shut downs the pc as well. You can schedule the time you wanna shut down and stuff. get it from here

no harm in trying this utility. you won't be wasting your time.