Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Custom Power Button Action


  • Please log in to reply
14 replies to this topic

#1 mattk37

mattk37

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 01 December 2008 - 03:42 PM

Hi, I really miss the functionality of XP allowing you to set the power button action to ask what you want to do.
Posted Image
Unfortunately, Vista seems to have gotten rid of that option, while leaving the ability of the popup ask what wou want to do
(shown in this short JScript)
(new ActiveXObject("Shell.Application")).ShutdownWindows();
Posted Image
Is there a way to "remap" the power button? I've tried to use autohotkey, but it doesn't seem to support the power button...
Thanks,
-Matt

Edited by mattk37, 01 December 2008 - 03:52 PM.


BC AdBot (Login to Remove)

 


#2 garmanma

garmanma

    Computer Masochist


  • Members
  • 27,809 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cleveland, Ohio
  • Local time:10:54 PM

Posted 01 December 2008 - 03:56 PM

I don't like it either. I haven't come across a hack yet. I let you know if I do
Mark
Posted Image
why won't my laptop work?

Having grandkids is God's way of giving you a 2nd chance because you were too busy working your butt off the 1st time around
Do not send me PMs with problems that should be posted in the forums. Keep it in the forums, so everyone benefits
Become a BleepingComputer fan: Facebook and Twitter

#3 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:54 PM

Posted 01 December 2008 - 05:46 PM

It's incorporated in the Start button. Click on the > arrowhead to the right of the Lock Computer thingie:
Posted Image
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#4 mattk37

mattk37
  • Topic Starter

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 01 December 2008 - 05:53 PM

It's incorporated in the Start button. Click on the > arrowhead to the right of the Lock Computer thingie:
Posted Image


nonono I know that already... :huh:
what i am saying is pressing the actual power button on the tower to show the options

Edited by mattk37, 01 December 2008 - 07:04 PM.


#5 garmanma

garmanma

    Computer Masochist


  • Members
  • 27,809 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cleveland, Ohio
  • Local time:10:54 PM

Posted 01 December 2008 - 07:18 PM

Go to the Control Panel>Power Options and on the left should be "Click on what the power button does" and choose the option you want

Edited by garmanma, 01 December 2008 - 07:19 PM.

Mark
Posted Image
why won't my laptop work?

Having grandkids is God's way of giving you a 2nd chance because you were too busy working your butt off the 1st time around
Do not send me PMs with problems that should be posted in the forums. Keep it in the forums, so everyone benefits
Become a BleepingComputer fan: Facebook and Twitter

#6 mattk37

mattk37
  • Topic Starter

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 01 December 2008 - 08:39 PM

Go to the Control Panel>Power Options and on the left should be "Click on what the power button does" and choose the option you want

ugh again:
ASK what to do
NOT a single action (see pics in original post)

#7 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:54 PM

Posted 02 December 2008 - 08:24 AM

nonono I know that already... dry.gif
what i am saying is pressing the actual power button on the tower to show the options


When I press the power button at work (on an XP system) it does not show those screens. But this is a setting in the Advance tab of the Power Settings in XP (and the "Do nothing" option is missing in Vista).

The Vista registry is similar to XP - so if you can find the registry keys that affect this, then you may be able to reproduce the behavior in Vista. To find it, you'll have to get a backup copy of your XP registry before AND after you make the changes. Then use a registry compare tool to find out what entries are changed - and use that to change the Vista entries.

Don't forget to backup your registry before making any changes.

Good luck!
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#8 mattk37

mattk37
  • Topic Starter

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 02 December 2008 - 04:17 PM

Here is what i'm saying:
in xp, it gave the option of "Ask Me What to Do" when i pressed the power button:

Posted Image

in Vista, that option is no longer there (Do Nothing IS there usasma):

Posted Image

I compared the registry and i've narrowed it down to a few, but i have no experience with hex (which is what the options are stored as)

Edited by mattk37, 02 December 2008 - 04:18 PM.


#9 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:54 PM

Posted 02 December 2008 - 04:30 PM

Post the registry entries here for us to have a look at and we'll try to see if we can help figure it out.
I've got a Vista and an XP VM that I can easily hose if need be. :huh:
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#10 mattk37

mattk37
  • Topic Starter

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 02 December 2008 - 08:04 PM

ok, attached are the regshot results, ignore the REALLY long entries changed in the Vista one.
the file names explain what i did.
thanks :huh:

Attached Files



#11 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:54 PM

Posted 03 December 2008 - 04:25 PM

Haven't been able to locate the registry item, but found a powercfg command that should do it for Vista (while at work). I have to find it again and I'll post it then.
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#12 mattk37

mattk37
  • Topic Starter

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 03 December 2008 - 07:34 PM

Haven't been able to locate the registry item, but found a powercfg command that should do it for Vista (while at work). I have to find it again and I'll post it then.

that would be awesome :huh:

#13 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:54 PM

Posted 03 December 2008 - 08:46 PM

Looks like the "close action" and the "also needed to show up on Power Menus" options are what you're looking for:
http://blogs.technet.com/richardsmith/arch...-the-guids.aspx

Let us know if it works for you - I haven't been able to try it on my system yet.
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#14 mattk37

mattk37
  • Topic Starter

  • Members
  • 16 posts
  • OFFLINE
  •  
  • Local time:08:54 PM

Posted 03 December 2008 - 09:09 PM

Looks like the "close action" and the "also needed to show up on Power Menus" options are what you're looking for:
http://blogs.technet.com/richardsmith/arch...-the-guids.aspx

Let us know if it works for you - I haven't been able to try it on my system yet.


that doesn't seem to have much to do with what i am saying...

here is a reg file i made, but it says that the keys are in use :huh:

Windows Registry Editor Version 5.00

[HKEY_USERS\SYSTEM\CurrentControlSet\Control\Session Manager\Power]
"SystemPowerPolicy"=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,02,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,03,00,\
  00,00,00,00,00,00,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,03,00,00,00,04,00,00,C0,01,00,00,00,\
  05,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,12,00,00,00

  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\381b4222-f694-41f0-9685-ff5bb260df2e\4f971e89-eebd-4455-a8de-9e59040e7347\7648efa3-dd9c-4e3e-b566-50f929386280]
"ACSettingIndex"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c\4f971e89-eebd-4455-a8de-9e59040e7347\7648efa3-dd9c-4e3e-b566-50f929386280]
"ACSettingIndex"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\User\PowerSchemes\a1841308-3541-4fab-bc81-f71556f20b4a\4f971e89-eebd-4455-a8de-9e59040e7347\7648efa3-dd9c-4e3e-b566-50f929386280]
"ACSettingIndex"=dword:00000004

[HKEY_USERS\S-1-5-21-650302481-2879485454-116807313-1000\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,02,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,03,00,\
  00,00,00,00,00,00,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,03,00,00,00,04,00,00,C0,01,00,00,00,\
  05,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,12,00,00,00
  
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power]
"AcPolicy"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,02,00,00,00,03,\
  00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,FF,FF,\
  FF,FF,02,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,32,00,00,80,04,00,00,\
  00,04,00,00,00,04,00,00,00,00,00,00,00,40,00,00,00,00,00,00,00,03,00,00,00,\
  01,00,00,00,03,00,00,00,03,00,00,00,04,00,00,C0,01,00,00,00,05,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,B0,04,00,00,\
  00,00,00,00,90,E8,07,00,50,D9,90,7C,D0,E7,07,00,00,00,00,00,00,64,64,00,02,\
  00,00,00,04,00,00,C0,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Power]
"AcPolicy"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,02,00,00,00,03,\
  00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,FF,FF,\
  FF,FF,02,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,32,00,00,80,04,00,00,\
  00,04,00,00,00,04,00,00,00,00,00,00,00,40,00,00,00,00,00,00,00,03,00,00,00,\
  01,00,00,00,03,00,00,00,03,00,00,00,04,00,00,C0,01,00,00,00,05,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,B0,04,00,00,\
  00,00,00,00,90,E8,07,00,50,D9,90,7C,D0,E7,07,00,00,00,00,00,00,64,64,00,02,\
  00,00,00,04,00,00,C0,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power]
"DcPolicy"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,02,00,00,00,03,\
  00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,FF,FF,\
  FF,FF,02,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,32,00,00,80,04,00,00,\
  00,04,00,00,00,04,00,00,00,00,00,00,00,40,00,00,00,00,00,00,00,03,00,00,00,\
  01,00,00,00,03,00,00,00,03,00,00,00,04,00,00,C0,01,00,00,00,05,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,B0,04,00,00,\
  00,00,00,00,90,E8,07,00,50,D9,90,7C,D0,E7,07,00,00,00,00,00,00,64,64,00,02,\
  00,00,00,04,00,00,C0,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Power]
"DcPolicy"=hex:01,00,00,00,00,00,00,00,03,00,00,00,08,00,00,00,02,00,00,00,03,\
  00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,FF,FF,\
  FF,FF,02,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,32,00,00,80,04,00,00,\
  00,04,00,00,00,04,00,00,00,00,00,00,00,40,00,00,00,00,00,00,00,03,00,00,00,\
  01,00,00,00,03,00,00,00,03,00,00,00,04,00,00,C0,01,00,00,00,05,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,B0,04,00,00,\
  00,00,00,00,90,E8,07,00,50,D9,90,7C,D0,E7,07,00,00,00,00,00,00,64,64,00,02,\
  00,00,00,04,00,00,C0,00,00,00,00



is there a way to add the file to the registry before logon?

#15 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:54 PM

Posted 04 December 2008 - 06:14 AM

This free tool should do it - http://home.eunet.no/pnordahl/ntpasswd/
Also, I believe you can do it in the Recovery Console (DOS prompt)
Also in Bart PE.
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users