Add Windows post installation scripts

This commit is contained in:
Johan 2024-08-29 10:04:12 +02:00
parent ac171bd009
commit 6915def40a
2 changed files with 28 additions and 0 deletions

View File

@ -68,6 +68,13 @@ echo Disabling password complexity.
secedit /configure /db "%windir%\security\local.sdb" /cfg "%cd%\secconfig.cfg" >nul
del secconfig.cfg
choice /C yn /M "Switch to classic context menus?"
if %ERRORLEVEL% EQU 1 (
echo Switching to classic context menus.
REG ADD HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /F >nul 2>&1
taskkill /F /IM explorer.exe & start explorer
)
echo.
echo All done!
popd

View File

@ -0,0 +1,21 @@
@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