Batch File or script to change reg value - how to set reg values from GP?


  • Hi,

     How are you? May I ask how to write a script to change the value in regedit?

    Issue: Every time my computer goes to sleep, it wakes up with 640x800 resolution.


    1. Path is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration

    2. Change Value under: NOEDID_864545_52RD2FGR2F_32FG22R_3ER3SE^43RSF4TGFGDG546F\00\00 (640) (800)

    Change to (1920) (1200)

    So now what if we have 200 of these computers and different monitors, how do we go about generating a script to detect and change these values?

    Greatly appreciated!

    Thank you


    Monday, January 11, 2016 6:53 PM


  • Assuming solving the root issue is off the table, your request is twofold:

    1) How to attach a task to a wakeup event:


    2) How to set a registry key with PowerShell


    A few other thoughs

    • A system GPO won't apply in a timely manner, so i wouldn't bother with that
    • be sure to set the execution policy on your client machines and/or sign your PowerShell script

    Mike Crowley | MVP
    My Blog -- Baseline Technologies

    Tuesday, January 12, 2016 1:55 AM

All replies