.
This commit is contained in:
92
b_power.bat
92
b_power.bat
@ -1,8 +1,88 @@
|
|||||||
|
@echo off
|
||||||
|
call C:\Scripts\wLocal\localENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
echo "START: %~n0"
|
||||||
|
|
||||||
powercfg /change monitor-timeout-ac 0
|
|
||||||
powercfg /change monitor-timeout-dc 0
|
|
||||||
powercfg /change disk-timeout-ac 0
|
|
||||||
powercfg /change disk-timeout-dc 0
|
|
||||||
powercfg /change standby-timeout-ac 0
|
|
||||||
powercfg /change standby-timeout-dc 0
|
|
||||||
|
|
||||||
|
@REM set variables to ensure they are set,
|
||||||
|
@REM POWERCFG 0 - no change
|
||||||
|
@REM POWERCFG 1 - change profiles
|
||||||
|
|
||||||
|
set ZUPER=0
|
||||||
|
set POWERCFG=0
|
||||||
|
|
||||||
|
@REM if "%USERNAME%" == "zuper" (
|
||||||
|
@REM echo "Found user %USERNAME%"
|
||||||
|
@REM echo "Not setting up POWERCFG for %USERNAME%"
|
||||||
|
@REM set ZUPER=1
|
||||||
|
@REM )
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SERVER" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SERVER2" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SURGERY1" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SURGERY2" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SURGERY3" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "SURGERY4" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "RECEPTION1" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "RECEPTION2" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "RECEPTION3" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%check_computername%" EQU "RECEPTION4" (
|
||||||
|
set POWERCFG=1
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM if [%ZUPER%] == [1] (
|
||||||
|
@REM echo "Not installing printers"
|
||||||
|
@REM ) else (
|
||||||
|
if [%POWERCFG%] == [0] (
|
||||||
|
echo "Reset power profiles"
|
||||||
|
powercfg /change monitor-timeout-ac 0
|
||||||
|
)
|
||||||
|
|
||||||
|
if [%POWERCFG%] == [1] (
|
||||||
|
echo "Disabling power profiles"
|
||||||
|
powercfg /change monitor-timeout-ac 0
|
||||||
|
powercfg /change monitor-timeout-dc 0
|
||||||
|
powercfg /change disk-timeout-ac 0
|
||||||
|
powercfg /change disk-timeout-dc 0
|
||||||
|
powercfg /change standby-timeout-ac 0
|
||||||
|
powercfg /change standby-timeout-dc 0
|
||||||
|
)
|
||||||
|
@REM if [%POWERCFG%] == [2] (
|
||||||
|
@REM echo "Installing Zebra"
|
||||||
|
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
|
||||||
|
@REM )
|
||||||
|
@REM if [%POWERCFG%] == [3] (
|
||||||
|
@REM echo "Installing Brother and Zebra"
|
||||||
|
@REM %EXE% -ExecutionPolicy Bypass -File %BROTHERPS%
|
||||||
|
@REM %EXE% -ExecutionPolicy Bypass -File %ZEBRAPS%
|
||||||
|
@REM )
|
||||||
|
@REM )
|
||||||
|
|
||||||
|
echo "FINISHED: %~n0"
|
||||||
Reference in New Issue
Block a user