home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Software
Operating System
Shut down when I press the sleep button
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Stéphane Lenclud" data-source="post: 1174182" data-attributes="member: 140174"><p>I like my HTPC to shut down when I hit the power button on my remote control.</p><p>The problem is that an MCE remote actually sends the sleep command when you hit the power button.</p><p>By default on Windows (7, 8 and 10) the sleep button sends your computer into sleep mode.</p><p>In your settings you can actually configure what is Windows doing in response to both power and sleep buttons.</p><p></p><p>[ATTACH=full]175560[/ATTACH]</p><p></p><p>Here are the options you have for your power button:</p><p></p><p>[ATTACH=full]175561[/ATTACH]</p><p></p><p>Now sadly the sleep button won't let you choose that shut down option:</p><p></p><p>[ATTACH=full]175562[/ATTACH]</p><p></p><p>However you can still tell Windows to shut down when the sleep button is pressed and that's how:</p><ul> <li data-xf-list-type="ul">Run a command prompt as administrator.</li> <li data-xf-list-type="ul">Run <strong><span style="font-family: 'Courier New'">powercfg -getactivescheme</span></strong> and note the scheme UID.</li> <li data-xf-list-type="ul">Run <span style="font-family: 'Courier New'"><strong>powercfg -q <scheme_guid></strong></span> and note the UID for "Power buttons and lid" subsection.</li> <li data-xf-list-type="ul">Run <strong><span style="font-family: 'Courier New'">powercfg -q <scheme_guid> <sub_guid></span></strong> and note the UID for "Sleep button action" power setting.</li> <li data-xf-list-type="ul">Run <strong><span style="font-family: 'Courier New'">powercfg -setacvalueindex <scheme_guid> <sub_guid> <setting_guid> <setting_index></span></strong> where setting index is 3 for shut down.</li> </ul><p>The command you will end up running to change that setting should look like:</p><p><span style="font-family: 'Courier New'"><strong>powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 3</strong></span></p><p>Obviously the UIDs on your machine should be different so make sure you don't just copy and paste that command. You need to workout the UIDs for your setup as described above.</p><p></p><p>Once you have executed that command properly, go back to your system settings where you should see the following:</p><p></p><p>[ATTACH=full]175563[/ATTACH]</p><p></p><p>Notice how the sleep button entry is empty. That's ok, it's just that the UI still won't show that shut down option.</p><p>Now restart Windows for the changes to take effect, then you can try out your newly programmed sleep button.</p><p></p><p><a href="https://social.technet.microsoft.com/Forums/windows/en-US/e517a8cc-96be-47ee-978e-ce89bb8bec40/sleep-button-action-shut-down-how?forum=w7itprogeneral&prof=required" target="_blank">Special thanks goes to Wray Smallwood for publishing that solution.</a></p><p><a href="http://answers.microsoft.com/en-us/windows/forum/windows_10-power/how-to-shut-down-when-i-press-the-sleep-button/9d8756e6-e8c3-46db-a115-1cade0adb4ec?tm=1454587391973" target="_blank">Microsoft community post</a></p></blockquote><p></p>
[QUOTE="Stéphane Lenclud, post: 1174182, member: 140174"] I like my HTPC to shut down when I hit the power button on my remote control. The problem is that an MCE remote actually sends the sleep command when you hit the power button. By default on Windows (7, 8 and 10) the sleep button sends your computer into sleep mode. In your settings you can actually configure what is Windows doing in response to both power and sleep buttons. [ATTACH=full]175560[/ATTACH] Here are the options you have for your power button: [ATTACH=full]175561[/ATTACH] Now sadly the sleep button won't let you choose that shut down option: [ATTACH=full]175562[/ATTACH] However you can still tell Windows to shut down when the sleep button is pressed and that's how: [LIST] [*]Run a command prompt as administrator. [*]Run [B][FONT=Courier New]powercfg -getactivescheme[/FONT][/B] and note the scheme UID. [*]Run [FONT=Courier New][B]powercfg -q <scheme_guid>[/B][/FONT] and note the UID for "Power buttons and lid" subsection. [*]Run [B][FONT=Courier New]powercfg -q <scheme_guid> <sub_guid>[/FONT][/B] and note the UID for "Sleep button action" power setting. [*]Run [B][FONT=Courier New]powercfg -setacvalueindex <scheme_guid> <sub_guid> <setting_guid> <setting_index>[/FONT][/B] where setting index is 3 for shut down. [/LIST] The command you will end up running to change that setting should look like: [FONT=Courier New][B]powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 3[/B][/FONT] Obviously the UIDs on your machine should be different so make sure you don't just copy and paste that command. You need to workout the UIDs for your setup as described above. Once you have executed that command properly, go back to your system settings where you should see the following: [ATTACH=full]175563[/ATTACH] Notice how the sleep button entry is empty. That's ok, it's just that the UI still won't show that shut down option. Now restart Windows for the changes to take effect, then you can try out your newly programmed sleep button. [URL='https://social.technet.microsoft.com/Forums/windows/en-US/e517a8cc-96be-47ee-978e-ce89bb8bec40/sleep-button-action-shut-down-how?forum=w7itprogeneral&prof=required']Special thanks goes to Wray Smallwood for publishing that solution.[/URL] [URL='http://answers.microsoft.com/en-us/windows/forum/windows_10-power/how-to-shut-down-when-i-press-the-sleep-button/9d8756e6-e8c3-46db-a115-1cade0adb4ec?tm=1454587391973']Microsoft community post[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Software
Operating System
Shut down when I press the sleep button
Contact us
RSS
Top
Bottom