Solved

disable keyboard power options, e.g. sleep,wakeup,poweroff

Posted on 2003-12-05
23
26,325 Views
Last Modified: 2011-08-18
is there a registry hack i could do to disable
the keyboards power options, e.g.
power off, sleep and wake up?


i have 4 different pcs i want to do it on, so
im not looking for a hardware bios change

thank you
0
Comment
Question by:jxharding
  • 7
  • 5
  • 5
  • +3
23 Comments
 
LVL 16

Accepted Solution

by:
Kyle Schroeder earned 125 total points
ID: 9882301
jxharding,
Go to the Power Options control panel, Advanced tab.  You should have some settings in there for "When I press the sleep button on my computer:", etc that you can set to "Do nothing". Or you might try changing the keyboard driver to a "generic" PS/2 or MS Natural driver, but the buttons might still be detected.

Group Policy Editor (start/run/gpedit.msc) might have some other settings to affect this, I haven't looked specifically though.

-dog*
0
 
LVL 49

Expert Comment

by:sunray_2003
ID: 9882606
Hmm.. I am not sure if you have already done the bios changes but

going to BIOS and disabling the ACPI functions should disable these power functions on Keyboard

Sunray
0
 
LVL 65

Expert Comment

by:SheharyaarSaahil
ID: 9884074
0
 
LVL 16

Expert Comment

by:Kyle Schroeder
ID: 9886645
Funny...both those links have the exact same information, substantially the same as what I already proposed by using the Power OPtions control panel...

Anyway...if you look in the "System Devices" branch of Device Manager, there is (at least on my system) an "ACPI Sleep button" as well as "ACPI fixed function button" (I have a MS Natural Keybd Pro with inet/mmedia buttons, etc).  Unfortunately, you can't set these to "Disabled" in their properties, though you can uninstall them from Dev. Mgr (but I have a feeling they'll be redetected at next boot).  So setting them to "Do nothing" seems the best option.

-dog*
0
 
LVL 16

Expert Comment

by:Kyle Schroeder
ID: 9886648
What model are the keyboards?  You may be able to adjust these through the driver software for hte keyboard also.

-dog*
0
 

Author Comment

by:jxharding
ID: 9887379
there are no drivers for these keyboards, xp has all the software
so everybody is telling me there is no registry edit to take this away?
0
 
LVL 16

Expert Comment

by:Kyle Schroeder
ID: 9888840
Did you make the change I explained above in the Power Options control panel?  YOu can do it via a registry change, but I don't have the exact key.  Since you only have 4 machines to do it on, I don't see the urgency of having a .reg file fix for it.  I can find out, using Sysinternals RegMon if its really that critical.

-dog*
0
 
LVL 65

Expert Comment

by:SheharyaarSaahil
ID: 9888892
well im not sure that it will work for u or not, but i could find only this method of disabling power keys by registry modification, take a look at this articel:

"I created the binary value "Scancode Map" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout" and filled it with 00 00 00 00 00 00 00 00 02 00 00 00 00 00 5E ED 00 00 as recommended by wolluf. It didn't work. I read http://www.microsoft.com/hwdev/tech/input/w2kscan-map.a...
 and turned right ctrl to nothing filling the value's data with 00 00 00 00 00 00 00 00 02 00 00 00 00 00 1D E0 00 00 00 00. It worked. Then I tried to turn right ctrl into power down key and nothing happened. I tested then with a virtual machine (key substitution done in host machine) and the virtual machine "understood" the power off command issued by pressing the substituted right ctrl key. So this substitution occurs later than power down key processing."

>>above article is taken from the site http://www.tek-tips.com/gpviewthread.cfm/qid/640536/pid/616/lev2/67/lev3/70<<

Hope it helps :)
0
 
LVL 16

Expert Comment

by:Kyle Schroeder
ID: 9888958
OK, here is what happens in the relevant part of the registry when you change that option for "When I press the Sleep button on my computer" from "Standby" to "Do nothing"
(Captured by SysInternals' RegMon 6.06, http://www.sysinternals.com/ntw2k/source/regmon.shtml):

1      3.51960794      rundll32.exe:2700      OpenKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE243F8E0      
3      3.51970013      rundll32.exe:2700      CreateKey      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE2BF3430      
5      3.51973980      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE243F8E0      
7      3.52006079      rundll32.exe:2700      SetValue      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies      SUCCESS      01 00 00 00 00 00 00 00 ...      
9      3.52009320      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE2BF3430      
11      3.52017170      rundll32.exe:2700      OpenKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE2BF3430      
12      3.52019265      rundll32.exe:2700      QueryValue      HKCU\Control Panel\PowerCfg\CurrentPowerPolicy      SUCCESS      "0"      
13      3.52020941      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE2BF3430      
14      3.52027869      rundll32.exe:2700      OpenKey      HKCU\Control Panel\PowerCfg\PowerPolicies      SUCCESS      Key: 0xE2BF3430      
16      3.52034043      rundll32.exe:2700      CreateKey      HKCU\Control Panel\PowerCfg\PowerPolicies\0      SUCCESS      Key: 0xE245A958      
18      3.52037703      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg\PowerPolicies      SUCCESS      Key: 0xE2BF3430      
20      3.52041139      rundll32.exe:2700      QueryValue      HKCU\Control Panel\PowerCfg\PowerPolicies\0\Policies      SUCCESS      01 00 00 00 00 00 00 00 ...      
22      3.52044324      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg\PowerPolicies\0      SUCCESS      Key: 0xE245A958      
30      3.52064299      rundll32.exe:2700      OpenKey      HKCU\Control Panel\PowerCfg\PowerPolicies      SUCCESS      Key: 0xE245A958      
32      3.52070109      rundll32.exe:2700      CreateKey      HKCU\Control Panel\PowerCfg\PowerPolicies\0      SUCCESS      Key: 0xE243F8E0      
34      3.52073629      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg\PowerPolicies      SUCCESS      Key: 0xE245A958      
36      3.52077010      rundll32.exe:2700      SetValue      HKCU\Control Panel\PowerCfg\PowerPolicies\0\Policies      SUCCESS      01 00 00 00 00 00 00 00 ...      
38      3.52079664      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg\PowerPolicies\0      SUCCESS      Key: 0xE243F8E0      
40      3.52086117      rundll32.exe:2700      OpenKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE243F8E0      
42      3.52091760      rundll32.exe:2700      CreateKey      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE2BF3430      
44      3.52095308      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE243F8E0      
46      3.52098772      rundll32.exe:2700      SetValue      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies      SUCCESS      01 00 00 00 00 00 00 00 ...      
48      3.52101426      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE2BF3430      
50      3.52579895      rundll32.exe:2700      CreateKey      HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power      SUCCESS      Key: 0xE23109F0      
51      3.52603501      rundll32.exe:2700      SetValue      HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power\AcPolicy      SUCCESS      01 00 00 00 00 00 00 00 ...      
52      3.52604954      rundll32.exe:2700      CloseKey      HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power      SUCCESS      Key: 0xE23109F0      
53      3.52858590      rundll32.exe:2700      CreateKey      HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power      SUCCESS      Key: 0xE245A958      
54      3.52876301      rundll32.exe:2700      SetValue      HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power\DcPolicy      SUCCESS      01 00 00 00 00 00 00 00 ...      
55      3.52877586      rundll32.exe:2700      CloseKey      HKLM\SYSTEM\CURRENTCONTROLSET\Control\Session Manager\Power      SUCCESS      Key: 0xE245A958      
56      3.52960865      rundll32.exe:2700      OpenKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE2BF3430      
57      3.52962793      rundll32.exe:2700      SetValue      HKCU\Control Panel\PowerCfg\CurrentPowerPolicy      SUCCESS      "0"      
58      3.52964637      rundll32.exe:2700      CloseKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE2BF3430      
59      3.53262496      explorer.exe:1620      OpenKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE23109F0      
60      3.53296271      explorer.exe:1620      OpenKey      HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg      SUCCESS      Key: 0xE2BF3430      
61      3.53347646      explorer.exe:1620      CreateKey      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE245A958      
62      3.53350216      explorer.exe:1620      CreateKey      HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE243F8E0      
63      3.53352479      explorer.exe:1620      CloseKey      HKCU\Control Panel\PowerCfg      SUCCESS      Key: 0xE23109F0      
64      3.53359240      explorer.exe:1620      CloseKey      HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg      SUCCESS      Key: 0xE2BF3430      
65      3.53361056      explorer.exe:1620      QueryValue      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies      BUFOVRFLOW            
66      3.53362899      explorer.exe:1620      QueryValue      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies      SUCCESS      01 00 00 00 00 00 00 00 ...      
67      3.53364743      explorer.exe:1620      QueryValue      HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy\Policies      SUCCESS      01 00 00 00 01 00 00 00 ...      
68      3.53366140      explorer.exe:1620      CloseKey      HKCU\Control Panel\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE245A958      
69      3.53367705      explorer.exe:1620      CloseKey      HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy      SUCCESS      Key: 0xE243F8E0      
70      3.53458861      rundll32.exe:2700      OpenKey      HKCU\Software\Policies\Microsoft\Windows\System\Power      NOTFOUND            
71      3.54009127      rundll32.exe:2700      OpenKey      HKCU\Software\Policies\Microsoft\Windows\System\Power      NOTFOUND            

The strange thing is there aren't many "SetValue" operations in there...line 62 is I think where the real concern is however.  So, copy and paste the following lines between --- into a file "power.reg" (make it in Notepad) then double-click it:
------Don't include this line-----------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,01,00,00,00,01,00,00,00,03,00,00,00
--------END--Don't include this--------

Run that one each PC, see what you get.  It may be that this setting is not directly modifiable via registry script, and has to be set "by hand" using the Power Options control panel.

-dog*
0
 

Expert Comment

by:vitalybe
ID: 11566466
I found a way to REASSIGN these 3 keys to some more useful feature. You'll need two programs for that:

1) I hate this key - http://www.bytegems.com/ihatethiskey.shtml
2) Girder - http://www.girder.nl/

The first one costs money, the second is for free.

I won't go to lengths to explain how you use both programs, you'll have to read a bit, but it is not hard at all.

I Hate This Key (only Deluxe version!) disables the functionality of Power Off/Sleep/Wake up.

Girder can be used to do other stuff on these keys press. For example, I use them to control the volume.

Good luck and enjoy :).
0
 

Author Comment

by:jxharding
ID: 11566589
thanks!
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

by:paul_knapp
ID: 11975235
I found a way to disable the sleep key in windows 2000. In windows 2000, the only options available to u r 'standby' or 'power off'. This is different in windows xp. u have two additional options, 'ask me what to do' & 'do nothing'. I found the registry key where these settngs are written. The key is [HKEY_USERS\S-1-5-21-117609710-162531612-839522115-1108\Control Panel\PowerCfg\GlobalPowerPolicy]. The string of numbers is unique to who the user is, so u will have to modify per PC. U need to export this key from a windows XP machine having set whatever keys u want disabled first. Logon to each PC as the 'user' that will have the PC. Run regedit & drill down to the same key. Export that key. Next edit the 'XP' key & the 'users' key. copy & paste the unique number string over the 'XP' unique string. Save it & merge into registry. RE-boot the PC & try the sleep button. It should do nothing.
0
 

Author Comment

by:jxharding
ID: 11987457
thanks!
0
 
LVL 16

Expert Comment

by:Kyle Schroeder
ID: 11992615
Just to clarify paul_knapp's great find...you won't have HKEY_USERS\S-1-5-21-117609710-162531612-839522115-1108 on your system, but if you set "Do Nothing" on your own profile, you can use HKEY_CURRENT_USER\Control Panel\PowerCfg\GlobalPowerPolicy to get the setting.  Same difference either way, but the particular user SID specified is unique to Paul's machine.

dogztar
0
 

Expert Comment

by:vitalybe
ID: 11998567
I can't see the point to all this... Are you saying that to disable the keys I need 2000 AND XP? Or how else I am to get the needed data (SID)?
0
 
LVL 1

Expert Comment

by:paul_knapp
ID: 11998961
I assumed that the person who originally posted the question had Windows 2000 installed on the PC's he had questions about. I discovered that Windows 2000 has only two possible options available - 'standby' or 'power off'. However, Windows XP gives you two addtionaloptions - 'ask me waht to do' & 'do nothing'. So i assume, like me, you have PC's that run Windows 2000 or Windows XP. What i did was determine in Windows XP what registry key was modified when you change the power options. So i set my windows XP PC to 'do nothing' when sleep button was pressed. I then exported the registry key. Copied this file to a windows 2000 PC. I then, on the windows 2000 PC, edited the registry. Determined what the SID was for that PC. Remember that this key is unique to each user who logs on to the PC, so make sure you logon as the normal user of this PC not Administrator. Once i had the SID, I edit the copied registry file & modified the SID to match the one for the Windows 2000 PC. Saved it & merged the file into the registry. Once you reboot the sleep key is disabled. This fix does not give you the extra options so if you change anything in the Power settings to do with the sleep button, you will have to remerge the registry key again to get the setting back. This fix is only for Windows 2000. Windows XP has options to disable the sleep key. I have not looked at any other Windows operating systems like Windows 95,98,Me, so i can't help you with those. I hope this makes sense now if post again.
0
 

Expert Comment

by:vitalybe
ID: 11999731
I am sorry to be a bother... But how can I get the actual unique number that sets Windows2000 to "Do nothing", without installing WindowsXP?
0
 
LVL 1

Expert Comment

by:paul_knapp
ID: 11999808
If you install Windows XP then you dont need to do anything because the options are in XP. If you only have a windows 2000 PC then you need to have a PC that already has Windows XP on it in order to get the registry entry. Are you trying to do this on a home PC? Is this the only PC you have?. I was assuming that you are working with a LAN ( Local Area Network ) where you have a mix of PC's. If this is not the case then you will need to know someone who has XP so you can get the registry key you need to copy to yours.
0
 

Expert Comment

by:vitalybe
ID: 11999844
I have Win2000 and no near WinXP.

But.. If just anyone with WinXP can give me the registry key, why can't you post it here? Is it more than just a string of numbers?
0
 
LVL 1

Expert Comment

by:paul_knapp
ID: 11999969
Yes. I am not allowed to post my e-mail address ( Experts exchange rules ). They suggest that i could put the reg file on a website that you can get to. I have never done this before so I need to find a 'free' web site that allows this then I can post a link for you so uoy can get the file. OK will let u know asap.
0
 
LVL 1

Expert Comment

by:paul_knapp
ID: 12000216
Ok cut & paste this link into IE Explorer ( this is my personel file storage area ).  

htttp://home.comcast.net/~thebrit2/powerslpof.reg

Ignore the invalid web page in the background, u should get a dialog box to open or save the file. Save the file to your PC.

Run 'regedit'. go to the HKEY_USERS section. Click on the '+' sign. Look for an entry that looks like the one below. The line that starts with S-1-5-21-etc. is your SID key. Write this complete number down.
 HKEY_USERS\
                     \S-1-5-21-117609710-162531612-839522115-1109

Next locate the file you just downloaded. Use mouse & 'right click' on the file. select 'edit'. The file looks like below. Change the SID number to the one you just wrote down. Save the file. Now 'merge' this file into your registry ( 'double-click' with mouse will work). Re-boot your PC & try the sleep button. it should not work. Please post if this was good cos I want to remove that file when u r done. Thanks

**Windows Registry Editor Version 5.00

[HKEY_USERS\S-1-5-21-117609710-162531612-839522115-1108\Control Panel\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,00,00,00,00,03,\
  00,00,00,08,00,00,00,00,00,00,00,03,00,00,00,00,00,00,80,00,00,00,00,03,00,\
  00,00,00,00,00,80,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,00,00,\
  00,00,00,00,00,01,00,00,00,03,00,00,00,02,00,00,00,04,00,00,c0,01,00,00,00,\
  04,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,00,01,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,\
  00,16,00,00,00 **


0
 

Expert Comment

by:vitalybe
ID: 12000239
I will give it a try :).

Thanks for the patience.
0
 
LVL 16

Expert Comment

by:Kyle Schroeder
ID: 12012061
You can skip getting the SID most likely, just copy/paste this into a power.reg file then double-click it:
---BEGIN - Don't copy this line----
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,00,00,00,00,03,\
  00,00,00,08,00,00,00,00,00,00,00,03,00,00,00,00,00,00,80,00,00,00,00,03,00,\
  00,00,00,00,00,80,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,00,00,\
  00,00,00,00,00,01,00,00,00,03,00,00,00,02,00,00,00,04,00,00,c0,01,00,00,00,\
  04,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,00,01,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,\
  00,16,00,00,00

[HKEY_USERS\.Default\Control Panel\PowerCfg\GlobalPowerPolicy]
"Policies"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,00,00,00,00,03,\
  00,00,00,08,00,00,00,00,00,00,00,03,00,00,00,00,00,00,80,00,00,00,00,03,00,\
  00,00,00,00,00,80,02,00,00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,00,00,\
  00,00,00,00,00,01,00,00,00,03,00,00,00,02,00,00,00,04,00,00,c0,01,00,00,00,\
  04,00,00,00,01,00,00,00,0a,00,00,00,00,00,00,00,03,00,00,00,01,00,01,00,01,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,\
  00,16,00,00,00
----END - Don't copy this line----

This will also set the defaults for the system and any new users as well.  If this works, paul_knapp should get the points, I was just trying to make it a bit easier.  Also, the reg file above will work on any system; you won't have to recreate it for each system (as every user will have a different SID code).

dogztar
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now