Group Policy control Win7 Power Options

Source: Internet
Author: User

Group Policy control Win7 Power Options

Attached: More series visit Guo Zhengyuan Blog list

    1. Background

A unit project implementation in the user reflects Win7 no screen saver, but in order to promote corporate image in the early stages of the project set up a unified screen saver policy (through the AD domain policy, through the script to the local C-Drive screen saver files, and then designated Screensavers for local files, 10 minutes after the screensaver enabled) after the problem reflected after the investigation, The policy is configured correctly, the terminal receives the normal, the XP terminal screensaver is normal, the Win7 terminal screensaver does not take effect;

    1. Investigation

Win7 Terminal Execution Rsop.msc View policy received normal, terminal no operation in the case of waiting for 10 minutes to find no screen saver and display a black screen, the preliminary judgement of the black screen to shut down, or read the local screensaver file failed to test the normal domain user access to the local screensaver file is normal, check the terminal Power Options power off the display for 10 minutes, also That is, the terminal just to start the screensaver when the display is turned off, resulting in screen saver failure is not the screensaver itself, the first thought of the first solution to change the screen saver time is 8 minutes, with the user after the user Request screen saver time must be greater than or equal to 10 minutes;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8C/0B/wKiom1hf2wmz6eolAAAl4i4R9vQ657.png "/>

    1. Solve

By discussing the need for power options for all terminals in this unit to turn off the monitor time item to 15 minutes, the first idea is to configure through the domain policy, the query Discovery Domain Policy does not provide this option, the Windows system-level configuration is actually in the configuration registry file, You can understand that the registry is a configuration database file for Windows systems, so when you encounter a configuration that cannot be implemented through a template in a domain policy, the client registry is changed through the startup scripting policy in the domain policy;

STEP1: Verify that the registry key for the display is turned off

Changes are made to the registry every time a project configuration is changed in the operating system, so the registry key method for closing the monitor is obtained by first fully exporting the Win7 Terminal Registry (regedit is entered in the run, and the export is right-selected at the top computer). Then change the time configuration for the Closed monitor (Control Panel > Power Options > Change plan Settings), export the registry again after the change is complete, and compare the results of the two exports with the text comparison tool to Filtered to discover that the Acsettingindex item was changed to turn off display time for configuration items (10-minute hexadecimal value of 00000258, 15-minute hexadecimal value of 00000384);

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8C/07/wKioL1hf2wmDbgA6AAESFTlphqI250.png "/>

In the registry query the above two acsettingindex location, found after the right-click on the parent directory to select Export;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8C/0B/wKiom1hf2wrTRd8qAAE1uh-C3V0918.png "/>

After exporting the Acsettingindex registry in 2 locations (suffix. reg), use Notepad to open the following (if the Win7 system used in the factory is not the same version, the Acsettingindex location may be different);

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8C/07/wKioL1hf2wvyj0AoAAOWE8-ewOI817.png "/>

STEP2: Writing a change registry key script

Merge the two reg files from the previous step together and rename them to Powercu.reg (name-free customization) with Notepad open as follows;

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8C/0B/wKiom1hf2wyTDaBgAAJDZvRcypw940.png "/>

Create a new Group Policy in AD, named Win7 power Supply (each Group Policy has a corresponding shared folder, where the shared folder is

\\test.com\sysvol\test.com\policies\{97ca604d-4faf-9ffc-4366aaec84f}\machine\scripts\startup\

Copy the Powercu.reg file from the previous step to the folder), and then add the following script to the boot script policy, and then distribute the policy to all terminals.

@echo off

echo%processor_architecture% | Findstr >nul

If ERRORLEVEL 1 goto end

If exist C:\PowerCu.reg goto end

Copy \\lyaec.com\sysvol\test.com\policies\{97ca604d-4faf-9ffc-4366aaec84f}\machine\scripts\startup\powercu.reg C :\

REGEDIT/S C:\PowerCu.reg

: End

Exit

The script has the following meanings

echo%processor_architecture% | Findstr >nul

If ERRORLEVEL 1 goto end

Check the system version, if it is 32-bit (XP) will jump directly (goto end) is no longer executed, because XP screensavers can be used, if not 32 bits (Win7) continue to perform the next step;

If exist C:\PowerCu.reg goto end

If the Powercu.reg is already present in the C drive and the registry has already been executed, avoid repeating the execution directly, and no longer proceed to the next step;

Copy \\test.com\sysvol\test.com\policies\{97ca604d-4faf-9ffc-4366aaec84f}\machine\scripts\startup\powercu.reg C :\

Copy the Powercu.reg file to the local C packing directory if there is no powercu.reg instruction in the C drive or if the last policy was not executed successfully.

REGEDIT/S C:\PowerCu.reg

Powercu.reg file to execute C packing directory

: End

Exit

Exit script


This article from "Guo Zhengyuan" blog, declined reprint!

Group Policy control Win7 Power Options

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.