Sign in to follow this  
Followers 0

Win 2000 default entry on Shutdown menu

3 posts in this topic

#1 ·  Posted (edited)

The shutdown dialog on Windows 2000 (and XP with classic logoff) always annoyed me because Windows would remember the entry you chose previously.

See if you have no idea what I am talking about.

I've looked a long time for a registry hack that make the dialog always default to "Shutdown" being selected... With the help of RegShot, I've finally found a solution. Put the following script in your Startup folder:

Note: This script requires an AutoIt version that contains the RegEnum function.

; If you know the key specific to your system, you would not need RegEnum
; For an EXAMPLE, here's my sytem:
;   RegWrite("HKEY_USERS\S-1-5-21-1801674531-920026266-839522115-1003\_
;     Software\Microsoft\Windows\CurrentVersion\Explorer",_
;     "Shutdown Setting", "REG_DWORD", 0)

$value = 2
#cs -- Possible values (in order as the appear in the combo box):
     -- If you set value to 64 but your system does not support hibernate, I think "standby" is set
 1 = logoff (also 8 and 32)
 2 = shutdown (also 0)
 4 = restart
16 = standby
64 = hibernate

$key = getUserKey() & "\Software\Microsoft\Windows\CurrentVersion\Explorer"
RegWrite ( "keyname", "Shutdown Setting", "REG_DWORD", $value)

Func getUserKey()
  Local $i = 0
     $i = $i + 1
     $x = RegEnumKey ( "HKEY_USERS", $i)
  Until StringLen($x) > 16 And Not StringInstr($x, "classes")
  Return  "HKEY_USERS\" & $x
Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post

Link to post
Share on other sites

I see that you don't have a solution for the user key.

Here it is:

- Replace HKEY_USERS\S-1-5-21-1801674531-920026266-839522115-1003 with HKEY_CURRENT_USER

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0