473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Configure Presentation Power schemes settings via WMi/API

Hi All,

We are trying to build an automation utility to configure OS. I found a way
to automate the processes below via registry:

Control Panel -Power Options -Power Schemes Tab:
-Power schemes -Presentation

Turn off monitor Never
Turn off hard disks Never
System Standby Never

HKEY_CURRENT_USER\Control Panel\PowerCfg
String Value name Value Data
CurrentPowerPolicy 2

HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\2
- set above settings then export the key
- run the imported registry setting in the code

But may I ask for anyone who could help me find a way to automate in C# the
process above via WMI/API?

Thanks in advance!
Nov 28 '07 #1
6 7207
This and all of your previous questions can be answered by using the RSoP
WMI Classes, you should also take a look at the GPO command line tools.
Search MSDN for RSOP.

Willy.

"rflazaro" <rf******@nospam.nospamwrote in message
news:5B**********************************@microsof t.com...
Hi All,

We are trying to build an automation utility to configure OS. I found a
way
to automate the processes below via registry:

Control Panel -Power Options -Power Schemes Tab:
-Power schemes -Presentation

Turn off monitor Never
Turn off hard disks Never
System Standby Never

HKEY_CURRENT_USER\Control Panel\PowerCfg
String Value name Value Data
CurrentPowerPolicy 2

HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\2
- set above settings then export the key
- run the imported registry setting in the code

But may I ask for anyone who could help me find a way to automate in C#
the
process above via WMI/API?

Thanks in advance!

Nov 28 '07 #2
Hi,

Thanks for the reply but I don't think RSoP will work for my case. The Group
Policy Management Console can only be installed in a domain server. I forgot
to mention that I'm currently using WEPOS as my OS for the automation. Sorry
my bad!
"Willy Denoyette [MVP]" wrote:
This and all of your previous questions can be answered by using the RSoP
WMI Classes, you should also take a look at the GPO command line tools.
Search MSDN for RSOP.

Willy.

"rflazaro" <rf******@nospam.nospamwrote in message
news:5B**********************************@microsof t.com...
Hi All,

We are trying to build an automation utility to configure OS. I found a
way
to automate the processes below via registry:

Control Panel -Power Options -Power Schemes Tab:
-Power schemes -Presentation

Turn off monitor Never
Turn off hard disks Never
System Standby Never

HKEY_CURRENT_USER\Control Panel\PowerCfg
String Value name Value Data
CurrentPowerPolicy 2

HKEY_CURRENT_USER\Control Panel\PowerCfg\PowerPolicies\2
- set above settings then export the key
- run the imported registry setting in the code

But may I ask for anyone who could help me find a way to automate in C#
the
process above via WMI/API?

Thanks in advance!


Nov 29 '07 #3
"rflazaro" <rf******@nospam.nospamwrote in message
news:A1**********************************@microsof t.com...
Hi,

Thanks for the reply but I don't think RSoP will work for my case. The
Group
Policy Management Console can only be installed in a domain server. I
forgot
to mention that I'm currently using WEPOS as my OS for the automation.
Sorry
my bad!
GPM Console and RSoP can be used for Local (registry policy seting) Computer
Policy management, just run mmc and add the "Local Computer Policy" add-in,
and look at the Computer and User Configuration - Administrative Templates.
These templates contain the information you are looking for.
Don't know whether WEPOS contains the RSoP WMI provider though, this is
something you can find out by running wbemtest and connect to the root/rsop
namespace.

Willy.

Nov 29 '07 #4
Hi,

I was able to explore on the GPM Console by running gpedit.msc in the
command prompt just to see what are the available policies I could use via
RSoP but it seems to not have some of the policies that I am having trouble
with automating including how to configure Presentation Power schemes
settings. :(

"Willy Denoyette [MVP]" wrote:
"rflazaro" <rf******@nospam.nospamwrote in message
news:A1**********************************@microsof t.com...
Hi,

Thanks for the reply but I don't think RSoP will work for my case. The
Group
Policy Management Console can only be installed in a domain server. I
forgot
to mention that I'm currently using WEPOS as my OS for the automation.
Sorry
my bad!

GPM Console and RSoP can be used for Local (registry policy seting) Computer
Policy management, just run mmc and add the "Local Computer Policy" add-in,
and look at the Computer and User Configuration - Administrative Templates.
These templates contain the information you are looking for.
Don't know whether WEPOS contains the RSoP WMI provider though, this is
something you can find out by running wbemtest and connect to the root/rsop
namespace.

Willy.
Nov 29 '07 #5
"rflazaro" <rf******@nospam.nospamwrote in message
news:C5**********************************@microsof t.com...
Hi,

I was able to explore on the GPM Console by running gpedit.msc in the
command prompt just to see what are the available policies I could use via
RSoP but it seems to not have some of the policies that I am having
trouble
with automating including how to configure Presentation Power schemes
settings. :(

This specific Power Management option is only available in Vista and higher.
What stops you from setting this through the Registry API's?
Willy.
Nov 29 '07 #6
Hi Will,

I have problem setting this by tweaking the registry for I haven't found a
registry key that would help me do this. Anyways, thanks for the reply. We'll
probably make this a limitation to our automation project.

Thanks!

"Willy Denoyette [MVP]" wrote:
"rflazaro" <rf******@nospam.nospamwrote in message
news:C5**********************************@microsof t.com...
Hi,

I was able to explore on the GPM Console by running gpedit.msc in the
command prompt just to see what are the available policies I could use via
RSoP but it seems to not have some of the policies that I am having
trouble
with automating including how to configure Presentation Power schemes
settings. :(


This specific Power Management option is only available in Vista and higher.
What stops you from setting this through the Registry API's?
Willy.
Dec 3 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: CSN | last post by:
Is is possible to find out what options (prefix, bindir, etc.) were specified to "configure" when Postgres was built? __________________________________ Do you Yahoo!? New Yahoo! Photos -...
4
by: db2group88 | last post by:
Hello, we are using db2 udb v8.2 on windows. if we need to run a reorg and runstats monthly, i think the best way to do them is via the tool "Configure Automatic Maintainance". I find out that...
4
by: Bredal Jensen | last post by:
Hello, Ar some point in my web pages , i need to present a power point presentation. Any ideas about the various way of doing this are welcome. Many thanks in advance JB
4
by: Bredahl jensen | last post by:
Hello, At some point in my application, i need to show a power point presentation to users. How can this be done? The power point is uploaded from a web page . Should i store it in the database...
0
by: Dave Jones | last post by:
Hi I am trying to add a web Reference for a web service outside my network network. When I try to create a Web Reference and enter the URL. Although, it will find it fine but i get the following...
14
by: david | last post by:
I have developed web forms including login by using ASP.NET via HTTP. Now I want to secure the connection from client to the server via HTTPS. How can I configure the server or something else to...
5
by: askmeofit | last post by:
I'm a Phd student in statistics, and I'm writing computer code for the simulation of stochastic differential equations. Little background about my knowledge: I know C programming decently, and my...
4
by: =?Utf-8?B?V2lsbWVyIEhlcm5hbmRleg==?= | last post by:
An ActiveX component created using ATL under Visual Studio 2003, and it is used in a ASP, runs perfectly under administrator or power users group, however this same object does not run under the...
0
by: =?Utf-8?B?cmZsYXphcm8=?= | last post by:
Hi All, We are trying to build an automation utility to configure OS. May I ask for anyone who could help me find a way to automate in C# the processes below via WMI/API/Registry? Control...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.