From: J Cohen on
I am having a problem when I try to create a set of 4 power options. I have a
program that creates them by doing EnumPwrSchemes to get a starting point for
each, reads the base schemes with ReadPwrScheme and then writes out the new
schemes with WritePwrScheme. All functions return without error, and new
entries that appear to be correct always show up under
HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies.

However, the new schemes usually do not show up under the Control Panel
Power Options applet. Every now and then one or two does.

I am resetting between experiments using powercfg /restoredefaultpolicies.

The schemes that are reported by EnumPwrSchemes correspond to what is shown
in Power Options.

What is causing Power Options and EnumPwrSchemes to not show my new power
schemes?

From: J Cohen on
OK, I found a workaround for my own question. One of my power scheme names
had a name that exceeded 32 characters. When I reduced it down to 32 it was
fine.

"J Cohen" wrote:

> I am having a problem when I try to create a set of 4 power options. I have a
> program that creates them by doing EnumPwrSchemes to get a starting point for
> each, reads the base schemes with ReadPwrScheme and then writes out the new
> schemes with WritePwrScheme. All functions return without error, and new
> entries that appear to be correct always show up under
> HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies.
>
> However, the new schemes usually do not show up under the Control Panel
> Power Options applet. Every now and then one or two does.
>
> I am resetting between experiments using powercfg /restoredefaultpolicies.
>
> The schemes that are reported by EnumPwrSchemes correspond to what is shown
> in Power Options.
>
> What is causing Power Options and EnumPwrSchemes to not show my new power
> schemes?
>