Discussion:
How to receive notification on power plans addition/removal
(too old to reply)
Priyko
2009-09-22 14:49:02 UTC
Permalink
Hello all,

I would like to register for notifications to my application whenever a new
power plan is added or deleted. This is so that the UI which displays the
list of existing plans can be dynamically updated/refreshed. This is on Win7
and Vista. I didnt find any relevant GUIDs for this purpose. Any pointers
would help.

Thanks,
Priya
Rong-Chun Zhang [MSFT]
2009-09-23 10:41:14 UTC
Permalink
Hello Priya,

Thank you for contacting Microsoft Support. My Name is Rongchun Zhang. I am
the Support Professional who will be working with you on this case.

A new namespace(\\.\root\cimv2\power) has been added to WMI, but it is only
available in Windows Server 2008 R2 and Windows 7. The Win32_PowerPlan
represents power plans on a system. Each power plan is identified through a
unique GUID as well as by a friendly name. Multiple power plans can exist;
however, each computer can have only a single active power plan in effect
at any given time.

More information
http://msdn.microsoft.com/en-us/library/dd904518%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/dd904531%28VS.85%29.aspx

Also, based on my researches, the power plans is write into the following
registry key, we also monitor that key to get the notifications.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\User\PowerSchemes

Let me know if this helps, if you have any additional question, feel free
to contact me.

Best regards,
Rongchun Zhang (v-***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
***@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Continue reading on narkive:
Loading...