build powercfg script close the lid..

Topics: Developer Forum, User Forum
Aug 10, 2015 at 6:56 AM
Hi,

I'v been ask to create a script that will do the following:
  1. powercfg /getactivescheme. after it will find the active schema GUID it will continue to the next step.
  2. configure the active Subgroup GUID: (Power buttons and lid)
  3. configure Power Setting GUID: (Lid close action)
  4. Do nothing.
this is what I wrote for now:

@echo off
powercfg /getactivescheme
Powercfg /SETACVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
Powercfg /SETDCVALUEINDEX 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
Powercfg /SETACTIVE 381b4222-f694-41f0-9685-ff5bb260df2e

Regards,

Michel V