EDITED: The answer I am looking for is powercfg **-setacvalueindex** SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 0
I did not read the docs carefully and I mindset thought it is focused on -setdcvalueindex.
I am working with this document from Microsoft: This was crossposted and a moderator asked me to repost in here.
[https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options] [Microsoft Learn - Powercfg Command Line Options]
Working on unattended stuffs for next Windows 11 so these are a few of stuffs I needed to work with Powercfg ( Power configuration ).
I have a question after setting up the value using the command I found online to bypass the bad battery. Apparently it was trapped into DC value ( for battery ). It would seem no way to edit the AC value. See the code in below.
Power Setting GUID: 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546 (Critical battery action)`
GUID Alias: BATACTIONCRIT `` 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: 0x00000002`
Current DC Power Setting Index: 0x00000000`
Want both AC and DC to set as Do Nothing which value should be 0. I am not sure why or how I can work with two index values if i can't see the command that I can set for AC power index. After executing the command: powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 0
I was able to check and see the power setting from setting side, Battery value was changed into Critical Battery Action into DO NOTHING. AC power, i was not able to set the Do Nothing.
Please help with not using SUB_BATTERY but it was only thing i could see. How can i do this and thank you. it was because of Windows's automatic shutdown when bad battery produced 0% at AC plugged in. This is a workaround but I am missing the last value for AC Power Setting Index.