Table of Contents

Windows Power Management (create powerplan)

Scripts and Guide by Soren Birk

This package is for changing when the Windows computer turns off the display/enters standby.

Tested With:

Instructions:

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

[Actions]
DefVar $shut_off_screen$
DefVar $standby$
 
Set $shut_off_screen$ = GetProductProperty("shut_off_screen", "30")
Set $standby$ = GetProductProperty("standby", "0")
 
Message "Settings for Power Management is being changed"
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: False

[Product]
type: localboot
id: powersaveoptions
name: Powersave Options
description: Control the Windows Powersave options
advice: 
version: 0
priority: 0
licenseRequired: False
productClasses: 
setupScript: setup.ins
uninstallScript: 
updateScript: 
alwaysScript: 
onceScript: 
customScript: 
userLoginScript: 

[ProductProperty]
type: unicode
name: shut_off_screen
multivalue: False
editable: True
description: When should the screen shut off?
values: ["0", "120", "15", "30", "60"]
default: ["30"]

[ProductProperty]
type: unicode
name: standby
multivalue: False
editable: True
description: When should the PC enter standby?
values: ["0", "120", "15", "30", "60"]
default: ["0"]