Batch Script

Here is the small batch script:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Powercfg.exe /CREATE "myPowerScheme"
Powercfg.exe /CHANGE "myPowerScheme" /monitor-timeout-dc 20
Powercfg.exe /CHANGE "myPowerScheme" /monitor-timeout-ac 20
Powercfg.exe /CHANGE "myPowerScheme" /disk-timeout-dc 0
Powercfg.exe /CHANGE "myPowerScheme" /disk-timeout-ac 0
Powercfg.exe /CHANGE "myPowerScheme" /standby-timeout-dc 0
Powercfg.exe /CHANGE "myPowerScheme" /standby-timeout-ac 0
Powercfg.exe /CHANGE "myPowerScheme" /hibernate-timeout-dc 0
Powercfg.exe /CHANGE "myPowerScheme" /hibernate-timeout-ac 0
Powercfg.exe /SETACTIVE "myPowerScheme"

Here I just want the monitor to turn off automatically after 20 minutes.

VBS Integration

For those who want to integrate it into the VBS script:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
'*****************************************************************************
'### Fonction powermgmt ###
'crée un nouveau schema de gestion d'alimentation et l'applique à l'aide de l'éxecution d'un fichier batch
'Syntaxe : powermgmt
Function powermgmt

   Set objFSO = CreateObject("Scripting.FileSystemObject")
   Set WshShell = CreateObject("wscript.shell")
   WshShell.run "energy_save.bat", SH_WIDE

End Function
'*****************************************************************************

Last updated 05 May 2008, 09:09 CEST. history