This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
userspace:windows_power_management [2013/10/21 09:23] bobzbobz created |
userspace:windows_power_management [2014/01/28 12:25] bobzbobz |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Windows Power Management (create powerplan) ====== | ====== Windows Power Management (create powerplan) ====== | ||
+ | //Scripts and Guide by Soren Birk// | ||
+ | This package is for changing when the Windows computer turns off the display/ | ||
+ | |||
+ | **Tested With:** | ||
+ | * OPSI 4.0.2.4 | ||
+ | * Winst 4.11.3.3 | ||
+ | * Windows 7, 32 and 64-Bit | ||
+ | |||
+ | **Instructions: | ||
+ | * Use **powercfg** to edit the power settings - see powercfg /? for more info. | ||
+ | * Possible values to edit with the **-change** parameter: | ||
+ | * -monitor-timeout-ac //minutes// | ||
+ | * -monitor-timeout-dc //minutes// | ||
+ | * -disk-timeout-ac //minutes// | ||
+ | * -disk-timeout-dc //minutes// | ||
+ | * -standby-timeout-ac //minutes// | ||
+ | * -standby-timeout-dc //minutes// | ||
+ | * -hibernate-timeout-ac //minutes// | ||
+ | * -hibernate-timeout-dc //minutes// | ||
+ | |||
+ | **Tree:** | ||
+ | < | ||
+ | CLIENT_DATA | ||
+ | └ setup.ins | ||
+ | </ | ||
+ | |||
+ | //The script featured here will change the monitor timeout to 30 mins and set standby timeout to 0 (disabled).// | ||
+ | |||
+ | ==== setup.ins ==== | ||
+ | <code winst> | ||
+ | [Actions] | ||
+ | DefVar $shut_off_screen$ | ||
+ | DefVar $standby$ | ||
+ | |||
+ | Set $shut_off_screen$ = GetProductProperty(" | ||
+ | Set $standby$ = GetProductProperty(" | ||
+ | |||
+ | Message " | ||
+ | winbatch_powersave | ||
+ | |||
+ | |||
+ | [Winbatch_powersave] | ||
+ | powercfg -change -monitor-timeout-ac $shut_off_screen$ | ||
+ | powercfg -change -standby-timeout-ac $standby$ | ||
+ | </ | ||
+ | |||
+ | ==== control-file ==== | ||
+ | < | ||
+ | [Package] | ||
+ | version: 1 | ||
+ | depends: | ||
+ | incremental: | ||
+ | |||
+ | [Product] | ||
+ | type: localboot | ||
+ | id: powersaveoptions | ||
+ | name: Powersave Options | ||
+ | description: | ||
+ | advice: | ||
+ | version: 0 | ||
+ | priority: 0 | ||
+ | licenseRequired: | ||
+ | productClasses: | ||
+ | setupScript: | ||
+ | uninstallScript: | ||
+ | updateScript: | ||
+ | alwaysScript: | ||
+ | onceScript: | ||
+ | customScript: | ||
+ | userLoginScript: | ||
+ | |||
+ | [ProductProperty] | ||
+ | type: unicode | ||
+ | name: shut_off_screen | ||
+ | multivalue: False | ||
+ | editable: True | ||
+ | description: | ||
+ | values: [" | ||
+ | default: [" | ||
+ | |||
+ | [ProductProperty] | ||
+ | type: unicode | ||
+ | name: standby | ||
+ | multivalue: False | ||
+ | editable: True | ||
+ | description: | ||
+ | values: [" | ||
+ | default: [" | ||
+ | </ |