Cool Solutions

ZCM Windows XP Power Scheme Distribution



By:

September 16, 2010 2:44 pm

Reads:5,043

Comments:2

Score:5

Problem:
Some of our machine images didn’t have the proper power scheme configured before they were rolled out. In some cases it’s easier to re-image the machine, but in other cases like this one, it was better to find a solution where we could push power settings out to all our workstations to confirm they are setup properly.

Solution:
I searched the web high and low to find a power scheme solution that we could distribute to multiple users easily. The problem is that each user has their own dynamic registry entry for their power settings. This would be a difficult task at best to figure out each user string on each computer. You can’t use powercfg.exe to accomplish this directly since it only works on a per user basis, and limited users cannot change their power settings. When you run powercfg.exe with Administrative privileges, it only changes the power scheme for the Administrator.

I finally found a website that did almost exactly what I needed. I’d like to thank Jon Giffard for this entry in his blog that gave me the solution:

https://jgiffard.wordpress.com/2010/01/05/19/

or Cool Solution here:

http://www.novell.com/communities/node/9460/power-management-zenworks-configuration-management

“Just to be clear, MSFT decided that power management should be stored for each individual user and then didn’t allow them to change it. Square that circle.”

So, it was ZCM to the rescue!

The Fix:
You can utilize a Microsoft tool, SubInACL, to change the registry rights on the power schemes. I put the following ZCM bundle together with the help from Jon’s blog.

Create a new ZCM MSI Bundle with the following:

  1. Install SubInACL
  2. Change rights to the power settings in the registry (so users can temporarily access the power settings).
  3. Run powercfg script as the user to change the settings to the desired scheme.
  4. Change rights to the power settings in the registry back to read only (so users can’t mess with it).

Details:

  1. Create a new ZCM MSI Bundle
  2. Install SubInACL from http://download.microsoft.com/download/1/7/d/17d82b72-bc6a-4dc8-bfaa-98b37b22b367/subinacl.msi
  3. I used 3 separate batch scripts since you have to run the 2nd script as the user.
  4. General_1.png

    Script01 Contents:

    @echo on
    cd "%ProgramFiles%\Windows Resource Kits\Tools"
    subinacl.exe /noverbose /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg" /grant=users

    Script02 Contents: (While creating the script in ZCM, be sure to go to “More Options,” and run as a User!

    @echo on
    %SYSTEMROOT%\system32\powercfg.exe /setactive "Always On"

    Script2User_0_0.png

    Script03 Contents:
    @echo on
    cd "%ProgramFiles%\Windows Resource Kits\Tools"
    subinacl.exe /noverbose /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg" /revoke=users
    subinacl.exe /noverbose /subkeyreg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg" /grant=users=R

    Conclusion:
    Test this on a test PC before you roll out to the rest of your production workstations to avoid any serious blunders. Then you can login as a limited user and ensure your power scheme is configured properly. After testing, you can then roll this out to the production dynamic “Windows XP Workstations” device group.

    Final_1.png

1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5)
You need to be a registered member to rate this post.
Loading ... Loading ...

Tags:
Categories: Uncategorized

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

2 Comments

  1. By:mfinn

    If all users on a given computer need the same settings, you can use powercfg as an administrator and then copy that profile to the “default user profile” before creating users. Then when anyone logs in, they’ll get the settings that were saved, along with any other helpful changes, browser home pages, bookmarks, etc.

    • By:bfrancom

      Thanks for the tip! While copying the profile with desired settings is the ideal way, there were a few PC’s rolled out (with users created via ZCM DLU Policy) before we caught the problem. This cool solution can help in these rare cases.

Comment

RSS