Merge branch 'main' of ssh://mint.nopenso.com:3022/spongle/wBase
This commit is contained in:
83
b_power.bat
83
b_power.bat
@ -1,83 +0,0 @@
|
|||||||
@echo on
|
|
||||||
call C:\Scripts\wLocal\localENV.bat
|
|
||||||
@REM xxxxxxx
|
|
||||||
echo "START: %~n0"
|
|
||||||
|
|
||||||
|
|
||||||
@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 "desktop-rgubu4k" (
|
|
||||||
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 -restoredefaultschemes
|
|
||||||
)
|
|
||||||
|
|
||||||
if [%POWERCFG%] == [1] (
|
|
||||||
echo "Disabling power profiles"
|
|
||||||
powercfg /q SCHEME_CURRENT > C:\Scripts\pbefore.txt
|
|
||||||
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
|
|
||||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATLEVELCRIT 90
|
|
||||||
powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONCRIT 3
|
|
||||||
powercfg /q SCHEME_CURRENT > C:\Scripts\pafter.txt
|
|
||||||
)
|
|
||||||
@REM )
|
|
||||||
|
|
||||||
echo "FINISHED: %~n0"
|
|
||||||
Reference in New Issue
Block a user