Powercfg works for the 'Power Schemes', but not for anything in the 'Advanced' tab. I've googled and googled and have come up short.
As a workaround, I have the following in my script, but I don't like this method and I'd really prefer to make it automated if at all possible.
Section
ExecShell "" "$SYSDIR\Powercfg.cpl"
MessageBox MB_OK "Click on the 'Advanced' tab. In the 'Power Buttons' heading, \
change the option for 'When I close the lid of my portable computer:' to 'Do Nothing'. \
Then click 'Apply' and close the window. The installation will then continue."
SectionEnd