Hi! My apologies if this is the wrong forum to post in, but it seemed like the best fit.

So I'm trying to get a bat file together with power settings that I want to apply. But I'm running into an issue. For some reason, the power button and lid close actions wont change. Here is the relevant code from the bat:

Code:
set pf=powercfg
set av=setacvalueindex
set pm=8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

rem lid close
%pf% /%av% %pm%    4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 003
rem power button
%pf% /%av% %pm%    4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 003
rem sleep button                                                        
%pf% /%av% %pm%    4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 003

%pf% -setactive %pm% pause  



And a bit of the relevant output from powercfg -query:


Code:
 Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347  (Power buttons and lid)
    GUID Alias: SUB_BUTTONS
    Power Setting GUID: 5ca83367-6e45-459f-a27b-476b1d01c936  (Lid close action)
      GUID Alias: LIDACTION
      Possible Setting Index: 000
      Possible Setting Friendly Name: Do nothing
      Possible Setting Index: 001
      Possible Setting Friendly Name: Sleep
      Possible Setting Index: 002
      Possible Setting Friendly Name: Hibernate
      Possible Setting Index: 003
      Possible Setting Friendly Name: Shut down
    Current AC Power Setting Index: 0x00000003
    Current DC Power Setting Index: 0x00000003   

Power Setting GUID: 7648efa3-dd9c-4e3e-b566-50f929386280  (Power button action)
  GUID Alias: PBUTTONACTION
  Possible Setting Index: 000
  Possible Setting Friendly Name: Do nothing
  Possible Setting Index: 001
  Possible Setting Friendly Name: Sleep
  Possible Setting Index: 002
  Possible Setting Friendly Name: Hibernate
  Possible Setting Index: 003
  Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000003
Current DC Power Setting Index: 0x00000003

Power Setting GUID: 96996bc0-ad50-47ec-923b-6f41874dd9eb  (Sleep button action)
  GUID Alias: SBUTTONACTION
  Possible Setting Index: 000
  Possible Setting Friendly Name: Do nothing
  Possible Setting Index: 001
  Possible Setting Friendly Name: Sleep
  Possible Setting Index: 002
  Possible Setting Friendly Name: Hibernate
  Possible Setting Index: 003
  Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000003 Current DC Power Setting Index: 0x00000003

As you can see it is reporting that it is set to "Shut Down" on lid close/power button/sleep button. But in the control panel, it is still set to Sleep. Anyone know why?
Thanks!