RE: Batch File using Powercfg.exe Won't Run
- From: Baboon <baboon@xxxxxxxxxxxxxx>
- Date: Thu, 17 Jan 2008 14:00:01 -0800
I don't have time to take care of this right now, but just skimming over it,
I think I should be able to automate this. Thanks much. I'll let you know
how it turns out.
Just so you know why I need this.....
We are not in a position to visit the machines. The machines will be moved
a few at time into an OU to which I want to apply the power settings
automatically. The reason for this is that we need to do remote
adminstration for migration to new machines, so these machines will need to
stay awake, even if they are laptops running on batteries. After a day or
two, the machines will be pulled off the network and retired.
"George Yin(MSFT)" wrote:
Hello Baboon,.
Sorry for the delay.
I have done some research, and found this requirement may not be resolved
by using group policy. However, I would like to share the following
information with you and hope it is helpful.
Analysis:
====================
Note: You can skip this Analysis section to directly check the suggestions
below. The analysis section is just for your reference.
1. The Power Options setting are mainly saved in the follow registry keys:
[HKEY_CURRENT_USER\Control Panel\PowerCfg]
[HKEY_USERS\.DEFAULT\ Control Panel\PowerCfg]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls
Folder\PowerCfg]
2. Which configuration of Power Scheme does our computer use when no user
logs on?
We have already known that when a use logs on the computer, the settings
saved in the user's key ([HKEY_CURRENT_USER\Control Panel\PowerCfg]) will
be involved. However, if the computer is started up and no user logs on,
which configuration does the computer use?
Based on my research, the Default system profile setting
([HKEY_USERS\.DEFAULT\ Control Panel\PowerCfg]) will be referred.
3. What will our settings be after we log off and then log on use another
account?
If we make two different configurations on these two accounts, we will see
different settings after we log on with another account.
Steps I used:
====================
IMPORTANT NOTE:
1. The method in this section is not an official solution, although it
worked in my test machine. I just listed it here for your reference and
cannot guarantee it will work in any scenario. Thanks for your
understanding.
2. Please perform full backup, and verify the steps in several test
machines first before using it in the product environment.
3. You may still use the previous script for normal logon users.
For your information, I used the following steps in my test machine and
they worked well:
1. On one computer, configure the power settings with administrative
privilege.
2. Open the Registry Editor, then export [HKEY_CURRENT_USER\Control
Panel\PowerCfg] to a reg file.
3. Right click this .reg file, and click Edit. Replace the
"HKEY_CURRENT_USER\" with "HKEY_USERS\.DEFAULT\"
4. Add a line of "[-HKEY_USERS\.DEFAULT\ Control Panel\PowerCfg]" after
"Windows Registry Editor version 5.00". This is to delete the previous
[HKEY_USERS\.DEFAULT\ Control Panel\PowerCfg]. Then the first several lines
in the file should look like:
Windows Registry Editor version 5.00
[-HKEY_USERS\.DEFAULT\ Control Panel\PowerCfg]
[HKEY_USERS\.DEFAULT\ Control Panel\PowerCfg]
"CurrentPowerPolicy"="your number"
Please note, these is a blank line between these sentences, and must be
several blank line at the end of the file.
For more details, please refer to:
How to add, modify, or delete registry subkeys and values by using a
registration entries (.reg) file:
http://support.microsoft.com/kb/310516/en-us
5. Save this .reg file and then import this registry in the same computer
by double-clicking it.
Note: Using the file on a different computer may cause unexpected issues.
If anything is unclear, please feel free to let me know.
I look forward to your reply. Thank you!
Sincerely,
George Yin
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- RE: Batch File using Powercfg.exe Won't Run
- From: George Yin(MSFT)
- RE: Batch File using Powercfg.exe Won't Run
- References:
- Batch File using Powercfg.exe Won't Run
- From: Baboon
- RE: Batch File using Powercfg.exe Won't Run
- From: George Yin(MSFT)
- RE: Batch File using Powercfg.exe Won't Run
- From: Baboon
- RE: Batch File using Powercfg.exe Won't Run
- From: George Yin(MSFT)
- Batch File using Powercfg.exe Won't Run
- Prev by Date: Re: Hide Computers from Network Neighborhood
- Next by Date: Unable to install GPMC on Vista
- Previous by thread: RE: Batch File using Powercfg.exe Won't Run
- Next by thread: RE: Batch File using Powercfg.exe Won't Run
- Index(es):
Relevant Pages
|