Docs/Windows/PostInstall/vm-client.bat
2024-08-29 10:04:12 +02:00

22 lines
517 B
Batchfile

@echo off
net session >nul 2>&1 || (
powershell -c "start cmd -ArgumentList '/c call """%~f0""" %*' -verb runas" >nul 2>&1 || echo This script needs administrative privileges
exit /b
)
pushd %~d0%~p0
choice /C yn /M "Disable powersave features?"
if %ERRORLEVEL% EQU 1 (
echo Disabling powersave features.
powercfg.exe -change -monitor-timeout-ac 0
powercfg.exe -change -disk-timeout-ac 0
powercfg.exe -change -standby-timeout-ac 0
powercfg.exe -change -hibernate-timeout-ac 0
)
echo.
echo All done!
popd