mirror of
https://github.com/jazir555/GamesDows.git
synced 2025-10-24 11:34:07 +02:00
Compare commits
36 Commits
jazir555-t
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80febfccb4 | ||
|
|
3480682dc7 | ||
|
|
85e96a2efa | ||
|
|
a1def078e9 | ||
|
|
d952788a6c | ||
|
|
5c20217813 | ||
|
|
a9dc4301e7 | ||
|
|
9f1ace084b | ||
|
|
143f73f5c2 | ||
|
|
531da7ee39 | ||
|
|
72e754faa4 | ||
|
|
1780390c80 | ||
|
|
ac114bc5f6 | ||
|
|
83eab8cfb7 | ||
|
|
ab12c08ce6 | ||
|
|
aa142f68fc | ||
|
|
636502a654 | ||
|
|
a82e052126 | ||
|
|
c61f5697bd | ||
|
|
cd03f3b816 | ||
|
|
73733e5b2d | ||
|
|
a4ab3669dd | ||
|
|
abcb0e07db | ||
|
|
a631c5cb20 | ||
|
|
6dfbecdce9 | ||
|
|
59e190f499 | ||
|
|
429a799410 | ||
|
|
43ab18cf33 | ||
|
|
9153e24b96 | ||
|
|
9e6b7096d9 | ||
|
|
df6e357429 | ||
|
|
e21fc465cd | ||
|
|
1dae7faaf8 | ||
|
|
5558beb5d6 | ||
|
|
c604af7631 | ||
|
|
374831a04e |
BIN
BlackOverlay.exe
BIN
BlackOverlay.exe
Binary file not shown.
@@ -26,10 +26,6 @@ IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
:: Delete the scheduled task
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
:: Disable automatic logon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 0 /f
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f
|
||||
|
||||
:: Enable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled off
|
||||
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo ================================
|
||||
echo Disabling GamesDows
|
||||
echo ================================
|
||||
|
||||
:: Check for administrative privileges
|
||||
echo Checking for administrative privileges...
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo [ERROR] This script requires administrative privileges.
|
||||
echo Please run it as an administrator.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Define paths and names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
SET "ADMIN_VBS_NAME=LaunchSteamAsAdmin.vbs"
|
||||
SET "ADMIN_VBS_PATH=%STEAM_FOLDER%\%ADMIN_VBS_NAME%"
|
||||
SET "XML_NAME=DelayedExplorerStartTask.xml"
|
||||
SET "XML_PATH=%STEAM_FOLDER%\%XML_NAME%"
|
||||
|
||||
:: Terminate Steam processes to ensure changes can be applied
|
||||
echo [1/7] Terminating Steam processes...
|
||||
taskkill /IM "Steam.exe" /F >nul 2>&1
|
||||
taskkill /IM "SteamService.exe" /F >nul 2>&1
|
||||
echo [INFO] Steam processes terminated.
|
||||
|
||||
:: Reset the default shell to Explorer
|
||||
echo [2/7] Resetting default shell to Explorer...
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "C:\Windows\explorer.exe" /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [ERROR] Failed to reset the default shell.
|
||||
) else (
|
||||
echo [SUCCESS] Default shell reset to Explorer.
|
||||
)
|
||||
|
||||
:: Delete DelayedExplorerStart.bat
|
||||
echo [3/7] Deleting DelayedExplorerStart.bat...
|
||||
IF EXIST "%SCRIPT_PATH%" (
|
||||
DEL /F /Q "%SCRIPT_PATH%"
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Could not delete %SCRIPT_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %SCRIPT_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %SCRIPT_NAME% does not exist.
|
||||
)
|
||||
|
||||
:: Delete RunBatchSilently.vbs
|
||||
echo [4/7] Deleting RunBatchSilently.vbs...
|
||||
IF EXIST "%VBS_PATH%" (
|
||||
DEL /F /Q "%VBS_PATH%"
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Could not delete %VBS_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %VBS_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %VBS_NAME% does not exist.
|
||||
)
|
||||
|
||||
:: Delete LaunchSteamAsAdmin.vbs
|
||||
echo [5/7] Deleting LaunchSteamAsAdmin.vbs...
|
||||
IF EXIST "%ADMIN_VBS_PATH%" (
|
||||
DEL /F /Q "%ADMIN_VBS_PATH%"
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Could not delete %ADMIN_VBS_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %ADMIN_VBS_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %ADMIN_VBS_NAME% does not exist.
|
||||
)
|
||||
|
||||
:: Delete the scheduled task
|
||||
echo [6/7] Deleting scheduled task 'RunDelayedExplorerStart'...
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Could not delete the scheduled task 'RunDelayedExplorerStart'.
|
||||
) else (
|
||||
echo [SUCCESS] Scheduled task 'RunDelayedExplorerStart' deleted.
|
||||
)
|
||||
|
||||
:: Delete the XML file
|
||||
echo [7/7] Deleting DelayedExplorerStartTask.xml...
|
||||
IF EXIST "%XML_PATH%" (
|
||||
DEL /F /Q "%XML_PATH%"
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Could not delete %XML_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %XML_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %XML_NAME% does not exist.
|
||||
)
|
||||
|
||||
:: Revert registry modifications
|
||||
echo Reverting registry modifications...
|
||||
|
||||
echo [INFO] Enabling Boot UI...
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled off
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to enable Boot UI.
|
||||
) else (
|
||||
echo [SUCCESS] Boot UI enabled.
|
||||
)
|
||||
|
||||
echo [INFO] Enabling Visual Effects...
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 0 /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to enable Visual Effects.
|
||||
) else (
|
||||
echo [SUCCESS] Visual Effects enabled.
|
||||
)
|
||||
|
||||
echo [INFO] Re-enabling Last Access Update...
|
||||
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to re-enable Last Access Update.
|
||||
) else (
|
||||
echo [SUCCESS] Last Access Update re-enabled.
|
||||
)
|
||||
|
||||
echo [INFO] Reverting Paging Executive...
|
||||
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to revert Paging Executive.
|
||||
) else (
|
||||
echo [SUCCESS] Paging Executive reverted.
|
||||
)
|
||||
|
||||
echo [INFO] Reverting Startup Delay...
|
||||
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to revert Startup Delay.
|
||||
) else (
|
||||
echo [SUCCESS] Startup Delay reverted.
|
||||
)
|
||||
|
||||
echo [INFO] Reverting Explorer Process Priority...
|
||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to revert Explorer Process Priority.
|
||||
) else (
|
||||
echo [SUCCESS] Explorer Process Priority reverted.
|
||||
)
|
||||
|
||||
echo [INFO] Reverting Large System Cache...
|
||||
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /f
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to revert Large System Cache.
|
||||
) else (
|
||||
echo [SUCCESS] Large System Cache reverted.
|
||||
)
|
||||
|
||||
echo [INFO] Disabling Quiet Boot...
|
||||
bcdedit /set {current} quietboot off
|
||||
if %errorlevel% neq 0 (
|
||||
echo [WARNING] Failed to disable Quiet Boot.
|
||||
) else (
|
||||
echo [SUCCESS] Quiet Boot disabled.
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ================================
|
||||
echo GamesDows has been disabled successfully.
|
||||
echo A system restart is recommended for all changes to take effect.
|
||||
echo ================================
|
||||
|
||||
ENDLOCAL
|
||||
pause
|
||||
@@ -1,99 +0,0 @@
|
||||
@echo off
|
||||
:: Windows 11 Welcome UI Disabler
|
||||
:: This script combines multiple approaches to disable the welcome UI animation
|
||||
:: during automatic sign-in on Windows 11
|
||||
:: IMPORTANT: Run as administrator
|
||||
|
||||
echo Checking for administrative privileges...
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo This script requires administrative privileges.
|
||||
echo Please right-click and select "Run as administrator"
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo Windows 11 Welcome UI Animation Disabler
|
||||
echo ============================================================
|
||||
echo.
|
||||
echo This script will disable the Windows 11 welcome animation
|
||||
echo that shows the user photo, username, and spinning wheel
|
||||
echo during automatic sign-in.
|
||||
echo.
|
||||
echo Press any key to continue or Ctrl+C to cancel...
|
||||
pause >nul
|
||||
|
||||
echo.
|
||||
echo [1/7] Disabling Welcome UI processes using Image File Execution Options...
|
||||
:: Use IFEO to prevent UI processes from starting
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\LogonUI.exe" /v Debugger /t REG_SZ /d "cmd.exe /c exit" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ShellExperienceHost.exe" /v Debugger /t REG_SZ /d "cmd.exe /c exit" /f
|
||||
|
||||
echo.
|
||||
echo [2/7] Creating scheduled task to kill welcome UI processes at logon...
|
||||
:: Create a scheduled task that kills any UI processes that might start
|
||||
schtasks /delete /tn "KillWelcomeUI" /f 2>nul
|
||||
schtasks /create /tn "KillWelcomeUI" /tr "powershell -WindowStyle Hidden -Command \"Start-Sleep -Seconds 1; taskkill /f /im LogonUI.exe; taskkill /f /im ShellExperienceHost.exe\"" /sc onlogon /ru "SYSTEM" /rl highest /f
|
||||
|
||||
echo.
|
||||
echo [3/7] Disabling logon UI animations and preloading...
|
||||
:: Disable animation and preloading
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v DisableStartupSound /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v OptimizeBootAnimationEffects /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\AnimationPreload" /v Enabled /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\AnimationPreload" /v PreloadSplashScreen /t REG_DWORD /d 0 /f
|
||||
|
||||
echo.
|
||||
echo [4/7] Configuring logon UI timing and behavior...
|
||||
:: Disable UI timing and display
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UIHost" /v "LogonUIMaximumDisableTime" /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DelayedDesktopSwitchTimeout /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v DisplayInitialPageDelay /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v XamlInitialPageDelay /t REG_DWORD /d 0 /f
|
||||
|
||||
echo.
|
||||
echo [5/7] Disabling credential UI components...
|
||||
:: Disable credential UI components
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\ProcessInit" /v Enabled /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableLockScreenMedia /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableAcrylicBackgroundOnLogon /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /v OEMBackground /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative" /v OEMBackground /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
|
||||
echo.
|
||||
echo [6/7] Optimizing autologon settings...
|
||||
:: Optimize autologon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonTimeout /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UIHost /t REG_SZ /d "logonui.exe" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UseNewUX /t REG_DWORD /d 0 /f
|
||||
|
||||
echo.
|
||||
echo [7/7] Applying additional group policy settings...
|
||||
:: Group policy settings
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonUIBootAnimation /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v HideLogonUI /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockScreen /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Create the empty LogonUIDisabled file as an additional signal to Windows
|
||||
echo Creating LogonUIDisabled marker file...
|
||||
echo. > "%WINDIR%\System32\LogonUIDisabled" 2>nul
|
||||
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo Windows 11 Welcome UI Disabling Complete
|
||||
echo ============================================================
|
||||
echo.
|
||||
echo All settings have been applied successfully.
|
||||
echo Please restart your computer for changes to take effect.
|
||||
echo.
|
||||
echo If you see the welcome animation after restart, try enabling
|
||||
echo automatic logon in your Steam/Playnite setup script if you
|
||||
echo haven't already done so.
|
||||
echo.
|
||||
pause
|
||||
@@ -1,92 +0,0 @@
|
||||
@echo off
|
||||
:: Windows 11 Welcome UI Restore
|
||||
:: This script reverts all changes made by the Windows 11 Welcome UI Disabler
|
||||
:: IMPORTANT: Run as administrator
|
||||
|
||||
echo Checking for administrative privileges...
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo This script requires administrative privileges.
|
||||
echo Please right-click and select "Run as administrator"
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo Windows 11 Welcome UI Animation Restore
|
||||
echo ============================================================
|
||||
echo.
|
||||
echo This script will restore the Windows 11 welcome animation
|
||||
echo by reverting all changes made by the UI Disabler script.
|
||||
echo.
|
||||
echo Press any key to continue or Ctrl+C to cancel...
|
||||
pause >nul
|
||||
|
||||
echo.
|
||||
echo [1/7] Restoring Welcome UI processes (removing IFEO settings)...
|
||||
:: Remove IFEO settings that prevented UI processes from starting
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\LogonUI.exe" /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ShellExperienceHost.exe" /f 2>nul
|
||||
|
||||
echo.
|
||||
echo [2/7] Removing scheduled task that kills welcome UI processes...
|
||||
:: Remove the scheduled task
|
||||
schtasks /delete /tn "KillWelcomeUI" /f 2>nul
|
||||
|
||||
echo.
|
||||
echo [3/7] Restoring logon UI animations and preloading...
|
||||
:: Restore animation and preloading settings to defaults
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v DisableStartupSound /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation" /v OptimizeBootAnimationEffects /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\AnimationPreload" /v Enabled /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\AnimationPreload" /v PreloadSplashScreen /f 2>nul
|
||||
|
||||
echo.
|
||||
echo [4/7] Restoring logon UI timing and behavior...
|
||||
:: Restore UI timing and display settings
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UIHost" /v "LogonUIMaximumDisableTime" /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DelayedDesktopSwitchTimeout /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v DisplayInitialPageDelay /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v XamlInitialPageDelay /f 2>nul
|
||||
|
||||
echo.
|
||||
echo [5/7] Restoring credential UI components...
|
||||
:: Restore credential UI components
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableLogonUI /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\ProcessInit" /v Enabled /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableLockScreenMedia /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableAcrylicBackgroundOnLogon /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /v OEMBackground /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Creative" /v OEMBackground /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v DisableLogonBackgroundImage /f 2>nul
|
||||
|
||||
echo.
|
||||
echo [6/7] Restoring autologon settings to defaults...
|
||||
:: Restore autologon settings to defaults
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonTimeout /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UIHost /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UseNewUX /f 2>nul
|
||||
|
||||
echo.
|
||||
echo [7/7] Restoring group policy settings...
|
||||
:: Restore group policy settings
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonUIBootAnimation /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v HideLogonUI /f 2>nul
|
||||
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockScreen /f 2>nul
|
||||
|
||||
:: Remove the LogonUIDisabled marker file
|
||||
echo Removing LogonUIDisabled marker file...
|
||||
if exist "%WINDIR%\System32\LogonUIDisabled" del "%WINDIR%\System32\LogonUIDisabled" 2>nul
|
||||
|
||||
echo.
|
||||
echo ============================================================
|
||||
echo Windows 11 Welcome UI Restoration Complete
|
||||
echo ============================================================
|
||||
echo.
|
||||
echo All settings have been restored to Windows defaults.
|
||||
echo Please restart your computer for changes to take effect.
|
||||
echo.
|
||||
pause
|
||||
@@ -1,150 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Steam Big Picture as default shell
|
||||
|
||||
echo Set Steam Big Picture as the default shell
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -silent -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo Check if user is logged on
|
||||
echo query user ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
echo start C:\Windows\explorer.exe
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Enable automatic logon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "" /f
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Logon UI
|
||||
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
PowerShell -Command "Enable-WindowsOptionalFeature -Online -FeatureName 'DeviceLockdown' -All"
|
||||
PowerShell -Command "Enable-WindowsOptionalFeature -Online -FeatureName 'Custom Logon' -All"
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,150 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_PATH=%PLAYNITE_FOLDER%\Playnite.FullscreenApp.exe"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=%SystemRoot%\explorer.exe"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%%USERNAME%%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
|
||||
echo rem Set taskbar to autohide
|
||||
echo powershell -command "$settingsPath='HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; $settings=(Get-ItemProperty -Path $settingsPath -Name 'Settings').Settings; $settings[8]=$settings[8] -bor 0x08; Set-ItemProperty -Path $settingsPath -Name 'Settings' -Value $settings"
|
||||
|
||||
echo rem Start Explorer
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo rem Starting Explorer
|
||||
echo start "" "%EXPLORER_PATH%" /desktop
|
||||
|
||||
echo rem Wait for a specific delay before unsetting autohide
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
|
||||
echo rem Unset taskbar autohide and refresh taskbar without restarting explorer.exe
|
||||
echo powershell -command "$settingsPath='HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; $settings=(Get-ItemProperty -Path $settingsPath -Name 'Settings').Settings; $settings[8]=$settings[8] -band 0xF7; Set-ItemProperty -Path $settingsPath -Name 'Settings' -Value $settings; $sig='[DllImport(\\""user32.dll\\"")] public static extern int SendMessageTimeout(IntPtr hWnd,uint Msg,IntPtr wParam,IntPtr lParam,uint fuFlags,uint uTimeout,out IntPtr lpdwResult);'; Add-Type -MemberDefinition $sig -Name 'Win32SendMessageTimeout' -Namespace 'Win32Functions'; [Win32Functions.Win32SendMessageTimeout]::SendMessageTimeout([IntPtr]::Zero,0x1A,[IntPtr]::Zero,[IntPtr]::Zero,0x0002,1000,[ref]([IntPtr]::Zero));"
|
||||
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
REM Create VBScript to run the batch file silently
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34^) ^& "%SCRIPT_PATH%" ^& chr(34^), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET "XML_PATH=%PLAYNITE_FOLDER%\DelayedExplorerStartTask.xml"
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>%USERNAME%^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%^</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Deleting the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Creating the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Failed to create scheduled task.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Playnite folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Applying system optimizations
|
||||
|
||||
REM Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
REM Disable Logon UI
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Visual Effects
|
||||
reg add "HKCU\Control Panel\Desktop" /v VisualFXSetting /t REG_DWORD /d 2 /f
|
||||
|
||||
REM Increase File System Performance
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Optimize Paging File Performance
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Startup Delay
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
REM Improve Windows Explorer Process Priority
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
|
||||
REM Adjust Large System Cache
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Playnite set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,149 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_PATH=%PLAYNITE_FOLDER%\Playnite.FullscreenApp.exe"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=%SystemRoot%\explorer.exe"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%%USERNAME%%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
|
||||
echo rem Set taskbar to autohide
|
||||
echo powershell -command "$settingsPath='HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; $settings=(Get-ItemProperty -Path $settingsPath -Name 'Settings').Settings; $settings[8]=$settings[8] -bor 0x08; Set-ItemProperty -Path $settingsPath -Name 'Settings' -Value $settings"
|
||||
|
||||
echo rem Start Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo rem Starting Explorer
|
||||
echo start C:\Windows\explorer.exe
|
||||
echo reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
echo rem Unset taskbar autohide and refresh taskbar without restarting explorer.exe
|
||||
echo powershell -command "$settingsPath='HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; $settings=(Get-ItemProperty -Path $settingsPath -Name 'Settings').Settings; $settings[8]=$settings[8] -band 0xF7; Set-ItemProperty -Path $settingsPath -Name 'Settings' -Value $settings; $sig='[DllImport(\\""user32.dll\\"")] public static extern int SendMessageTimeout(IntPtr hWnd,uint Msg,IntPtr wParam,IntPtr lParam,uint fuFlags,uint uTimeout,out IntPtr lpdwResult);'; Add-Type -MemberDefinition $sig -Name 'Win32SendMessageTimeout' -Namespace 'Win32Functions'; [Win32Functions.Win32SendMessageTimeout]::SendMessageTimeout([IntPtr]::Zero,0x1A,[IntPtr]::Zero,[IntPtr]::Zero,0x0002,1000,[ref]([IntPtr]::Zero));"
|
||||
|
||||
echo reg add "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
echo reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
REM Create VBScript to run the batch file silently
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34^) ^& "%SCRIPT_PATH%" ^& chr(34^), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET "XML_PATH=%PLAYNITE_FOLDER%\DelayedExplorerStartTask.xml"
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>%USERNAME%^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Delay^>PT5S^</Delay^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%^</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Deleting the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Creating the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Failed to create scheduled task.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Playnite folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Applying system optimizations
|
||||
|
||||
REM Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
REM Disable Logon UI
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Visual Effects
|
||||
reg add "HKCU\Control Panel\Desktop" /v VisualFXSetting /t REG_DWORD /d 2 /f
|
||||
|
||||
REM Increase File System Performance
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Optimize Paging File Performance
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Startup Delay
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
REM Improve Windows Explorer Process Priority
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
|
||||
REM Adjust Large System Cache
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Playnite set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,234 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_PATH=%PLAYNITE_FOLDER%\Playnite.FullscreenApp.exe --hidesplashscreen"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
|
||||
rem Disable Hibernate
|
||||
powercfg -h off
|
||||
|
||||
rem Disable ALL welcome screen animations and UI elements
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableFirstLogonAnimation /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLockScreenAnimations /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v DisplayInitialPageDelay /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v XamlInitialPageDelay /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v ShowFirstLogonAnimation /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /v OEMBackground /t REG_DWORD /d 0 /f
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Playnite folder path and script names
|
||||
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Playnite folder
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo rem Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
echo start C:\Windows\explorer.exe
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
rem Create VBScript to run the batch file silently
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
echo %VBS_PATH%
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34^) ^& "%SCRIPT_PATH%" ^& chr(34^), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%PLAYNITE_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Playnite folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Creating SetDisableLogonUI.bat script
|
||||
|
||||
SET "SET_DISABLE_LOGON_UI_BAT_NAME=SetDisableLogonUI.bat"
|
||||
SET "SET_DISABLE_LOGON_UI_BAT_PATH=%PLAYNITE_FOLDER%\%SET_DISABLE_LOGON_UI_BAT_NAME%"
|
||||
|
||||
(
|
||||
echo @echo off
|
||||
echo reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
) > "%SET_DISABLE_LOGON_UI_BAT_PATH%"
|
||||
|
||||
echo Creating RunSetDisableLogonUI.vbs script
|
||||
|
||||
SET "VBS_DISABLE_LOGON_UI_NAME=RunSetDisableLogonUI.vbs"
|
||||
SET "VBS_DISABLE_LOGON_UI_PATH=%PLAYNITE_FOLDER%\%VBS_DISABLE_LOGON_UI_NAME%"
|
||||
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_DISABLE_LOGON_UI_PATH%"
|
||||
echo WshShell.Run chr(34^) ^& "%SET_DISABLE_LOGON_UI_BAT_PATH%" ^& chr(34^), 0, True >> "%VBS_DISABLE_LOGON_UI_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_DISABLE_LOGON_UI_PATH%"
|
||||
|
||||
echo Create XML file for the startup scheduled task
|
||||
SET "XML_STARTUP_TASK_PATH=%PLAYNITE_FOLDER%\SetDisableLogonUITask.xml"
|
||||
|
||||
echo Delete the existing startup task XML file if it exists
|
||||
IF EXIST "%XML_STARTUP_TASK_PATH%" DEL "%XML_STARTUP_TASK_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>SYSTEM^</Author^>
|
||||
echo ^<Description^>Run SetDisableLogonUI.bat at startup.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<BootTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Delay^>PT0S^</Delay^>
|
||||
echo ^</BootTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="LocalSystem"^>
|
||||
echo ^<UserId^>SYSTEM^</UserId^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="LocalSystem"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_DISABLE_LOGON_UI_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_STARTUP_TASK_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "SetDisableLogonUI" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "SetDisableLogonUI" /xml "%XML_STARTUP_TASK_PATH%" /ru SYSTEM
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Logon UI
|
||||
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disabling Automatic Restart Sign-On
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableAutomaticRestartSignOn /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Playnite set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,170 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Steam Big Picture as default shell
|
||||
|
||||
echo Set Steam Big Picture as the default shell
|
||||
SET "KEY_NAME=HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
SET "MANIFEST_PATH=%STEAM_PATH%.manifest"
|
||||
|
||||
:: Create the manifest file to force admin privileges for Steam
|
||||
echo Creating manifest file for Steam to run as admin...
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^>
|
||||
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^>
|
||||
echo ^<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"^>
|
||||
echo ^<security^>
|
||||
echo ^<requestedPrivileges^>
|
||||
echo ^<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/^>
|
||||
echo ^</requestedPrivileges^>
|
||||
echo ^</security^>
|
||||
echo ^</trustInfo^>
|
||||
echo ^</assembly^>
|
||||
) > "%MANIFEST_PATH%"
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%%USERNAME%%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
|
||||
echo rem Set Shell back to Explorer
|
||||
echo REG ADD "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%%EXPLORER_PATH%%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
|
||||
echo rem Launch Explorer minimized without stealing focus by using a temporary VBScript
|
||||
echo set "TempVBS=%%TEMP%%\LaunchExplorerMinimized.vbs"
|
||||
echo ^(
|
||||
echo Set WshShell = CreateObject("WScript.Shell")
|
||||
echo ' 7 = Minimized ^& no focus
|
||||
echo WshShell.Run "explorer.exe", 7, False
|
||||
echo Set WshShell = Nothing
|
||||
echo ^) ^> "%%TempVBS%%"
|
||||
|
||||
echo cscript //nologo "%%TempVBS%%"
|
||||
echo del "%%TempVBS%%"
|
||||
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%%STEAM_PATH%%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f /ru "%USERNAME%"
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%" /ru "%USERNAME%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Logon UI
|
||||
|
||||
reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,189 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Steam Big Picture as default shell
|
||||
|
||||
echo Set Steam Big Picture as the default shell
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo Check if user is logged on
|
||||
echo query user ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 8 /nobreak ^>nul
|
||||
echo start C:\Windows\explorer.exe
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Enable automatic logon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "" /f
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Logon UI
|
||||
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
@echo off
|
||||
|
||||
REM Disable Fast Startup to ensure changes take effect
|
||||
powercfg -h off
|
||||
|
||||
REM Disable the lock screen (effective for Enterprise/Education)
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockScreen /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Set the logon background to black by setting a custom background
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Create the backgrounds folder if it doesn't exist
|
||||
if not exist "C:\Windows\System32\oobe\info\backgrounds" (
|
||||
mkdir "C:\Windows\System32\oobe\info\backgrounds"
|
||||
)
|
||||
|
||||
REM Generate a black image using PowerShell
|
||||
powershell -command "Add-Type -AssemblyName System.Drawing; $width = 1920; $height = 1080; $bitmap = New-Object System.Drawing.Bitmap $width, $height; $graphics = [System.Drawing.Graphics]::FromImage($bitmap); $black = [System.Drawing.Brushes]::Black; $graphics.FillRectangle($black, 0, 0, $width, $height); $bitmap.Save('C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg', [System.Drawing.Imaging.ImageFormat]::Jpeg); $graphics.Dispose(); $bitmap.Dispose();"
|
||||
|
||||
REM Set the custom black background image for the lock screen
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v LockScreenImage /t REG_SZ /d "C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg" /f
|
||||
|
||||
REM Do not display last signed-in user name
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLastUserName /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Do not display the username and other information during sign-in
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLockedUserId /t REG_DWORD /d 3 /f
|
||||
|
||||
REM Disable Windows animations during sign-in
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableStatusMessages /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable verbose status messages
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v VerboseStatus /t REG_DWORD /d 0 /f
|
||||
|
||||
REM Disable the Welcome screen and reduce animation delay
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DelayedDesktopSwitchTimeout /t REG_DWORD /d 0 /f
|
||||
|
||||
REM Disable lock screen transitions
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLockScreenAppNotifications /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonUIAnimations /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
|
||||
@@ -1,192 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
:: Define Steam folder path
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
|
||||
:: Check if Steam is installed
|
||||
IF NOT EXIST "%STEAM_FOLDER%\Steam.exe" (
|
||||
echo Steam is not installed. Downloading and installing Steam...
|
||||
|
||||
:: Define download URL
|
||||
SET "STEAM_INSTALLER_URL=https://steamcdn-a.akamaihd.net/client/installer/SteamSetup.exe"
|
||||
|
||||
:: Download Steam installer
|
||||
echo Downloading Steam installer...
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $url='%STEAM_INSTALLER_URL%'; $path='%TEMP%\SteamSetup.exe'; Invoke-WebRequest $url -OutFile $path; Start-Process -FilePath $path -ArgumentList '/S' -Wait"
|
||||
|
||||
:: Check if Steam was installed
|
||||
IF NOT EXIST "%STEAM_FOLDER%\Steam.exe" (
|
||||
echo Steam installation failed. Please install Steam manually.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
echo Steam installed successfully!
|
||||
:: Define script names and paths
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
|
||||
:: Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
(
|
||||
echo @echo off
|
||||
echo ^:: Check if user is logged on
|
||||
echo query user ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo ^:: Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
echo start C:\Windows\explorer.exe
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
(
|
||||
echo Set WshShell = CreateObject("WScript.Shell")
|
||||
echo WshShell.Run chr(34^) ^& "%SCRIPT_PATH%" ^& chr(34^), 0, True
|
||||
echo Set WshShell = Nothing
|
||||
) > "%VBS_PATH%"
|
||||
|
||||
:: Create XML file for the scheduled task
|
||||
SET "XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml"
|
||||
echo Creating DelayedExplorerStartTask.xml
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>%USERNAME%^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%^</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
:: Delete the existing scheduled task if it exists
|
||||
echo Deleting existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
:: Create the scheduled task using the XML file
|
||||
echo Creating the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
|
||||
|
||||
:: Additional configurations and optimizations
|
||||
echo Registry modifications and other optimizations...
|
||||
|
||||
:: Enable automatic logon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "" /f
|
||||
|
||||
:: Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
:: Disable Logon UI
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
:: Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable Fast Startup to ensure changes take effect
|
||||
powercfg -h off
|
||||
|
||||
:: Disable the lock screen (effective for Enterprise/Education)
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockScreen /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Set the logon background to black by setting a custom background
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Create the backgrounds folder if it doesn't exist
|
||||
if not exist "C:\Windows\System32\oobe\info\backgrounds" (
|
||||
mkdir "C:\Windows\System32\oobe\info\backgrounds"
|
||||
)
|
||||
|
||||
:: Generate a black image using PowerShell
|
||||
powershell -command "Add-Type -AssemblyName System.Drawing; $width = 1920; $height = 1080; $bitmap = New-Object System.Drawing.Bitmap $width, $height; $graphics = [System.Drawing.Graphics]::FromImage($bitmap); $black = [System.Drawing.Brushes]::Black; $graphics.FillRectangle($black, 0, 0, $width, $height); $bitmap.Save('C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg', [System.Drawing.Imaging.ImageFormat]::Jpeg); $graphics.Dispose(); $bitmap.Dispose();"
|
||||
|
||||
:: Set the custom black background image for the lock screen
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization" /v LockScreenImage /t REG_SZ /d "C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg" /f
|
||||
|
||||
:: Do not display last signed-in user name
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLastUserName /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Do not display the username and other information during sign-in
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLockedUserId /t REG_DWORD /d 3 /f
|
||||
|
||||
:: Disable Windows animations during sign-in
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableStatusMessages /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable verbose status messages
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v VerboseStatus /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable the Welcome screen and reduce animation delay
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DelayedDesktopSwitchTimeout /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable lock screen transitions
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLockScreenAppNotifications /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonUIAnimations /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
|
||||
:: Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Enable No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,231 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Checking for administrative privileges...
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo This script requires administrative privileges.
|
||||
echo Please run it as an administrator.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe"
|
||||
SET "STEAM_ARGS=-bigpicture -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
SET "WRAPPER_VBS_PATH=%STEAM_FOLDER%\SteamWrapper.vbs" :: Combined VBS to handle Steam launch
|
||||
SET "MANIFEST_PATH=%STEAM_PATH%.manifest"
|
||||
SET "REGISTRY_KEY=HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "SHELL_VALUE=Shell"
|
||||
|
||||
:: Create the manifest file to force admin privileges for Steam
|
||||
echo Creating manifest file for Steam to run as admin...
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^>
|
||||
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^>
|
||||
echo ^<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"^>
|
||||
echo ^<security^>
|
||||
echo ^<requestedPrivileges^>
|
||||
echo ^<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/^>
|
||||
echo ^</requestedPrivileges^>
|
||||
echo ^</security^>
|
||||
echo ^</trustInfo^>
|
||||
echo ^</assembly^>
|
||||
) > "%MANIFEST_PATH%"
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to create manifest file!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo Manifest file created successfully at %MANIFEST_PATH%.
|
||||
|
||||
:: Set Steam as the shell in the registry
|
||||
echo Setting Steam as the shell in the Windows registry...
|
||||
reg add "%REGISTRY_KEY%" /v %SHELL_VALUE% /d "\"%STEAM_PATH%\"" /f
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to set Steam as the shell in the registry!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo Steam set as the shell successfully.
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
(
|
||||
echo Set WshShell = CreateObject("WScript.Shell")
|
||||
echo WshShell.Run chr(34) ^& "%SCRIPT_PATH%" ^& chr(34), 0, True
|
||||
echo Set WshShell = Nothing
|
||||
) > "%VBS_PATH%"
|
||||
if %errorlevel% neq 0 (
|
||||
echo Error creating RunBatchSilently.vbs
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Creating SteamWrapper.vbs script
|
||||
|
||||
:: Create the SteamWrapper.vbs script to launch Steam with arguments
|
||||
(
|
||||
echo Set WshShell = CreateObject("WScript.Shell")
|
||||
echo WshShell.Run chr(34) ^& "%STEAM_PATH%" ^& chr(34) ^& " " ^& "%STEAM_ARGS%", 0, False
|
||||
echo Set WshShell = Nothing
|
||||
) > "%WRAPPER_VBS_PATH%"
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
echo Error creating SteamWrapper.vbs
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
:: Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo REM Check if user is logged on
|
||||
echo whoami ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo REM Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
echo start "" "%EXPLORER_PATH%"
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REM Set Shell back to the VBS script that launches Steam
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "\"%WRAPPER_VBS_PATH%\"" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
if %errorlevel% neq 0 (
|
||||
echo Error creating DelayedExplorerStart.bat
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Script creation completed successfully!
|
||||
pause
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-8"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>%USERNAME%^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%^</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
IF EXIST "%XML_PATH%" (
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%" >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Error creating scheduled task
|
||||
pause
|
||||
exit /b 1
|
||||
) else (
|
||||
echo [SUCCESS] Scheduled task 'RunDelayedExplorerStart' created.
|
||||
)
|
||||
) else (
|
||||
echo [ERROR] XML file for scheduled task does not exist.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
echo The first time Steam is launched after running this script UAC popup confirmation will appear. Ensure you select the option to always start Steam as administrator.
|
||||
|
||||
pause
|
||||
|
||||
echo Script completed successfully.
|
||||
pause
|
||||
@@ -148,4 +148,3 @@ echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Steam Big Picture as default shell
|
||||
|
||||
echo Set Steam Big Picture as the default shell
|
||||
SET "KEY_NAME=HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
SET "MANIFEST_PATH=%STEAM_PATH%.manifest"
|
||||
|
||||
:: Create the manifest file to force admin privileges for Steam
|
||||
echo Creating manifest file for Steam to run as admin...
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^>
|
||||
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^>
|
||||
echo ^<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"^>
|
||||
echo ^<security^>
|
||||
echo ^<requestedPrivileges^>
|
||||
echo ^<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/^>
|
||||
echo ^</requestedPrivileges^>
|
||||
echo ^</security^>
|
||||
echo ^</trustInfo^>
|
||||
echo ^</assembly^>
|
||||
) > "%MANIFEST_PATH%"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%%USERNAME%%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo rem Set Shell back to Explorer
|
||||
echo REG ADD "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%%EXPLORER_PATH%%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
|
||||
echo rem Launch Explorer minimized without stealing focus by using a temporary VBScript
|
||||
echo set "TempVBS=%%TEMP%%\LaunchExplorerMinimized.vbs"
|
||||
echo (echo Set WshShell = CreateObject("WScript.Shell"))>"%%TempVBS%%"
|
||||
echo (echo ' 7 = Minimized & no focus) >>"%%TempVBS%%"
|
||||
echo (echo WshShell.Run "explorer.exe", 7, False)>>"%%TempVBS%%"
|
||||
echo (echo Set WshShell = Nothing)>>"%%TempVBS%%"
|
||||
echo cscript //nologo "%%TempVBS%%"
|
||||
echo del "%%TempVBS%%"
|
||||
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%%STEAM_PATH%%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f /ru "%USERNAME%"
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%" /ru "%USERNAME%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Logon UI
|
||||
|
||||
reg add "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,59 +0,0 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Log file
|
||||
set log_file=%~dp0modify_winlogon.log
|
||||
set temp_dir=C:\Temp
|
||||
set vs_install_log=%temp_dir%\vs_buildtools_install.log
|
||||
set vs_install_error_log=%temp_dir%\vs_buildtools_install_error.log
|
||||
|
||||
echo Script started at %date% %time% > %log_file%
|
||||
echo Script started at %date% %time%
|
||||
|
||||
:: Ensure running as administrator
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo This script must be run as administrator! >> %log_file%
|
||||
echo This script must be run as administrator!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Ensure Temp Directory Exists and has Correct Permissions
|
||||
echo Ensuring temp directory exists and has correct permissions... >> %log_file%
|
||||
if not exist "%temp_dir%" (
|
||||
mkdir "%temp_dir%"
|
||||
)
|
||||
icacls "%temp_dir%" /grant Everyone:(F) >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to set permissions for the temp directory. >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Temp directory permissions set. >> %log_file%
|
||||
|
||||
:: Download Visual Studio Build Tools Installer
|
||||
set installer=%temp_dir%\vs_buildtools.exe
|
||||
echo Downloading Visual Studio Build Tools... >> %log_file%
|
||||
powershell -Command "Invoke-WebRequest -Uri 'https://aka.ms/vs/16/release/vs_buildtools.exe' -OutFile '%installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Visual Studio Build Tools installer. >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Build Tools installer downloaded successfully. >> %log_file%
|
||||
|
||||
:: Run Visual Studio Build Tools Installer
|
||||
echo Running Visual Studio Build Tools installer... >> %log_file%
|
||||
powershell -Command "Start-Process -Wait -FilePath '%installer%' -ArgumentList '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --norestart' -RedirectStandardOutput '%vs_install_log%' -RedirectStandardError '%vs_install_error_log%' -NoNewWindow" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Visual Studio Build Tools. >> %log_file%
|
||||
echo Check the install log for details: %vs_install_log% and %vs_install_error_log% >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Build Tools installed successfully. >> %log_file%
|
||||
|
||||
:: Indicate end of script
|
||||
echo Script completed successfully. >> %log_file%
|
||||
pause
|
||||
@@ -2,6 +2,8 @@ Transform your Windows Computer into a Video Game console first, PC second!
|
||||
|
||||
**This script is a WIP. Currently, the main functionality works as intended. Steam Big Picture launches automatically when the OS boots, then explorer starts automatically after a delay, which allows you to exit to desktop via the menu without needing to launch a shortcut for Explorer.exe first.**
|
||||
|
||||
**Note: Steam must be installed, you must be signed in to Steam, and finally the Steam Autostart entry in task manager must be disabled/deleted before running the script.**
|
||||
|
||||
# GamesDows
|
||||
The Enable GamesDows batch script makes Windows boot straight into Steam Big Picture without displaying any Explorer UI elements to ensure a Game Console like experience on Windows. I made this because I have a Steam Deck and I want the experience to mirror that of Steam OS as closely as possible. However, this will work on any Windows PC, the commands are not specific to the Steam Deck.
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
:: Set your username, password, and computer name
|
||||
SET "USERNAME=your_username"
|
||||
SET "PASSWORD=your_password"
|
||||
SET "COMPUTER_NAME=%COMPUTERNAME%"
|
||||
|
||||
:: Enable AutoAdminLogon
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
|
||||
|
||||
:: Set DefaultUserName
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
|
||||
:: Set DefaultPassword
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "%PASSWORD%" /f
|
||||
|
||||
:: Set DefaultDomainName to the computer name
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d "%COMPUTER_NAME%" /f
|
||||
|
||||
:: Create VBScript to handle netplwiz automation
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > ConfigureAutoLogin.vbs
|
||||
echo WshShell.Run "netplwiz", 1, True >> ConfigureAutoLogin.vbs
|
||||
echo WScript.Sleep 500 >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{TAB}" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{TAB}" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{ENTER}" >> ConfigureAutoLogin.vbs
|
||||
echo WScript.Sleep 500 >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "%USERNAME%" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{TAB}" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "%PASSWORD%" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{TAB}" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "%PASSWORD%" >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{ENTER}" >> ConfigureAutoLogin.vbs
|
||||
echo WScript.Sleep 500 >> ConfigureAutoLogin.vbs
|
||||
echo WshShell.SendKeys "{ENTER}" >> ConfigureAutoLogin.vbs
|
||||
|
||||
:: Run the VBScript
|
||||
cscript //nologo ConfigureAutoLogin.vbs
|
||||
|
||||
:: Clean up
|
||||
del ConfigureAutoLogin.vbs
|
||||
|
||||
echo Automatic login enabled with the specified username and password.
|
||||
@@ -1,372 +0,0 @@
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Undo Windows animation suppression for ALL editions.
|
||||
|
||||
.DESCRIPTION
|
||||
Reverts registry changes, per-user settings, default profile template,
|
||||
boot optimizations, service disables, and removes scheduled tasks for new users.
|
||||
|
||||
.NOTES
|
||||
- Requires Administrator privileges
|
||||
- Works on Windows 10/11 all editions
|
||||
- Modifies system and all user profiles
|
||||
- Restart required
|
||||
#>
|
||||
|
||||
function Write-Success { param($msg) Write-Host $msg -ForegroundColor Green }
|
||||
function Write-Info { param($msg) Write-Host $msg -ForegroundColor Cyan }
|
||||
function Write-Warning { param($msg) Write-Host $msg -ForegroundColor Yellow }
|
||||
function Write-Failure { param($msg) Write-Host $msg -ForegroundColor Red }
|
||||
|
||||
Write-Info "`n=== WINDOWS ANIMATION SUPPRESSION UNDO ===`n"
|
||||
|
||||
# Check for admin rights
|
||||
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Write-Failure "This script requires Administrator privileges!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Create restore point
|
||||
Write-Info "Creating system restore point..."
|
||||
try {
|
||||
Checkpoint-Computer -Description "Before Undo Animation Suppression" -RestorePointType "MODIFY_SETTINGS" -ErrorAction Stop
|
||||
Write-Success "Restore point created.`n"
|
||||
} catch {
|
||||
Write-Warning "Could not create restore point: $($_.Exception.Message)"
|
||||
$continue = Read-Host "Continue anyway? (Y/N)"
|
||||
if ($continue -ne 'Y') { exit 0 }
|
||||
}
|
||||
|
||||
# Function to safely remove registry values
|
||||
function Remove-RegValue {
|
||||
param(
|
||||
[string]$Path,
|
||||
[string]$Name,
|
||||
[switch]$Suppress
|
||||
)
|
||||
try {
|
||||
if (Test-Path $Path) {
|
||||
$prop = Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue
|
||||
if ($prop) {
|
||||
Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction Stop
|
||||
if (-not $Suppress) { Write-Success " [✓] Removed: $Name" }
|
||||
return $true
|
||||
}
|
||||
}
|
||||
return $false
|
||||
} catch {
|
||||
if (-not $Suppress) { Write-Warning " [!] Could not remove $Name" }
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
# Mount registry hives
|
||||
Write-Info "Mounting registry hives..."
|
||||
$null = New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS -ErrorAction SilentlyContinue
|
||||
|
||||
# Get all user profiles
|
||||
$profiles = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" |
|
||||
ForEach-Object {
|
||||
$sid = $_.PSChildName
|
||||
$profilePath = (Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).ProfileImagePath
|
||||
if ($profilePath -and $profilePath -notmatch "systemprofile|NetworkService|LocalService") {
|
||||
[PSCustomObject]@{
|
||||
SID = $sid
|
||||
Path = $profilePath
|
||||
Loaded = Test-Path "HKU:\$sid"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Info "Found $($profiles.Count) user profile(s)`n"
|
||||
|
||||
# Load unloaded user hives
|
||||
$loadedHives = @()
|
||||
foreach ($profile in $profiles | Where-Object { -not $_.Loaded }) {
|
||||
$hivePath = Join-Path $profile.Path "NTUSER.DAT"
|
||||
if (Test-Path $hivePath) {
|
||||
$tempKey = "TEMP_$($profile.SID)"
|
||||
try {
|
||||
reg load "HKU\$tempKey" $hivePath 2>&1 | Out-Null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
$loadedHives += $tempKey
|
||||
Write-Success " Loaded hive for: $(Split-Path $profile.Path -Leaf)"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning " Could not load: $(Split-Path $profile.Path -Leaf)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Get all SIDs to process
|
||||
$allSIDs = @(".DEFAULT") + $profiles.SID + $loadedHives
|
||||
Write-Info "`nWill process $($allSIDs.Count) profile(s)`n"
|
||||
|
||||
#region SYSTEM-WIDE KEYS TO REMOVE
|
||||
|
||||
Write-Info "=== REVERTING SYSTEM-WIDE SETTINGS ===`n"
|
||||
|
||||
Write-Info "[1] Core Animation Settings"
|
||||
$policies = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
|
||||
Remove-RegValue -Path $policies -Name "EnableFirstLogonAnimation"
|
||||
Remove-RegValue -Path $policies -Name "DisableAnimations"
|
||||
Remove-RegValue -Path $policies -Name "DisableStatusMessages"
|
||||
Remove-RegValue -Path $policies -Name "VerboseStatus"
|
||||
Remove-RegValue -Path $policies -Name "HideShutdownScripts"
|
||||
Remove-RegValue -Path $policies -Name "DelayedDesktopSwitchTimeout"
|
||||
|
||||
Write-Info "`n[2] LogonUI Settings"
|
||||
$logonUI = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI"
|
||||
Remove-RegValue -Path $logonUI -Name "AnimationDisabled"
|
||||
Remove-RegValue -Path $logonUI -Name "EnableTransitions"
|
||||
Remove-RegValue -Path $logonUI -Name "LastLoggedOnDisplayName"
|
||||
Remove-RegValue -Path $logonUI -Name "LastLoggedOnSAMUser"
|
||||
Remove-RegValue -Path $logonUI -Name "LastLoggedOnUser"
|
||||
|
||||
Write-Info "`n[3] Lock Screen"
|
||||
Remove-RegValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen"
|
||||
|
||||
Write-Info "`n[4] Winlogon Timing"
|
||||
$winlogon = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
Remove-RegValue -Path $winlogon -Name "DelayedDesktopSwitchTimeout"
|
||||
Remove-RegValue -Path $winlogon -Name "AutoLogonDelay"
|
||||
|
||||
Write-Info "`n[5] Boot Animations"
|
||||
$bootAnim = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation"
|
||||
Remove-RegValue -Path $bootAnim -Name "DisableStartupSound"
|
||||
Remove-RegValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\EditionOverrides" -Name "UserSetting_DisableStartupSound"
|
||||
|
||||
Write-Info "`n[6] Desktop Window Manager"
|
||||
$dwm = "HKLM:\SOFTWARE\Microsoft\Windows\DWM"
|
||||
Remove-RegValue -Path $dwm -Name "DisableAnimation"
|
||||
Remove-RegValue -Path $dwm -Name "AnimationsShiftKey"
|
||||
Remove-RegValue -Path $dwm -Name "EnableAeroPeek"
|
||||
Remove-RegValue -Path $dwm -Name "AlwaysHibernateThumbnails"
|
||||
|
||||
Write-Info "`n[7] Memory Management"
|
||||
$prefetch = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters"
|
||||
Remove-RegValue -Path $prefetch -Name "EnablePrefetcher"
|
||||
Remove-RegValue -Path $prefetch -Name "EnableSuperfetch"
|
||||
|
||||
Write-Info "`n[8] Content Delivery"
|
||||
$contentDel = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
||||
Remove-RegValue -Path $contentDel -Name "SubscribedContent-310093Enabled"
|
||||
Remove-RegValue -Path $contentDel -Name "SubscribedContent-338389Enabled"
|
||||
|
||||
Write-Info "`n[9] User Profile Engagement"
|
||||
Remove-RegValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement" -Name "ScoobeSystemSettingEnabled"
|
||||
|
||||
Write-Info "`n[10] App Privacy"
|
||||
Remove-RegValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsRunInBackground"
|
||||
|
||||
Write-Info "`n[11] Power Settings"
|
||||
Remove-RegValue -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name "HiberbootEnabled"
|
||||
|
||||
Write-Info "`n[12] Network UI"
|
||||
Remove-RegValue -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "DontDisplayNetworkSelectionUI"
|
||||
|
||||
Write-Info "`n[13] Profile List"
|
||||
Remove-RegValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" -Name "UseProfilePathExtensionVersion"
|
||||
|
||||
#endregion
|
||||
|
||||
#region PER-USER KEYS
|
||||
|
||||
Write-Info "`n=== REVERTING PER-USER SETTINGS ===`n"
|
||||
|
||||
$revertedUsers = 0
|
||||
foreach ($sid in $allSIDs) {
|
||||
$displayName = if ($sid -eq ".DEFAULT") { "Default User Profile" }
|
||||
elseif ($sid -like "TEMP_*") { "Temp: $(($sid -split '_')[1].Substring(0,8))..." }
|
||||
else { $sid.Substring(0,20) + "..." }
|
||||
|
||||
$userRoot = "HKU:\$sid"
|
||||
$removed = 0
|
||||
|
||||
# Visual Effects
|
||||
if (Remove-RegValue -Path "$userRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Suppress) { $removed++ }
|
||||
|
||||
# Desktop settings
|
||||
if (Remove-RegValue -Path "$userRoot\Control Panel\Desktop" -Name "DragFullWindows" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path "$userRoot\Control Panel\Desktop" -Name "FontSmoothing" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path "$userRoot\Control Panel\Desktop" -Name "UserPreferencesMask" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path "$userRoot\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Suppress) { $removed++ }
|
||||
|
||||
# Explorer Advanced
|
||||
$explorerAdv = "$userRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
if (Remove-RegValue -Path $explorerAdv -Name "TaskbarAnimations" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $explorerAdv -Name "DisablePreviewDesktop" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $explorerAdv -Name "ListviewAlphaSelect" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $explorerAdv -Name "ListviewShadow" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $explorerAdv -Name "TaskbarSmallIcons" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $explorerAdv -Name "DisallowShaking" -Suppress) { $removed++ }
|
||||
|
||||
# Content Delivery Manager
|
||||
$userCDM = "$userRoot\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
||||
if (Remove-RegValue -Path $userCDM -Name "SubscribedContent-310093Enabled" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $userCDM -Name "SubscribedContent-338389Enabled" -Suppress) { $removed++ }
|
||||
if (Remove-RegValue -Path $userCDM -Name "SystemPaneSuggestionsEnabled" -Suppress) { $removed++ }
|
||||
|
||||
# Accessibility
|
||||
if (Remove-RegValue -Path "$userRoot\Control Panel\Accessibility\StickyKeys" -Name "Flags" -Suppress) { $removed++ }
|
||||
|
||||
if ($removed -gt 0) {
|
||||
Write-Success " [✓] $displayName - Removed $removed setting(s)"
|
||||
$revertedUsers++
|
||||
} else {
|
||||
Write-Info " [i] $displayName - No settings found"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Success "`nReverted settings for $revertedUsers profile(s)"
|
||||
|
||||
#endregion
|
||||
|
||||
#region SERVICES
|
||||
|
||||
Write-Info "`n=== RE-ENABLING SERVICES ===`n"
|
||||
|
||||
$servicesToRestore = @{
|
||||
"DiagTrack" = "Automatic"
|
||||
"dmwappushservice" = "Manual"
|
||||
"SysMain" = "Automatic"
|
||||
"WSearch" = "Automatic"
|
||||
"TabletInputService" = "Manual"
|
||||
}
|
||||
|
||||
$restoredCount = 0
|
||||
foreach ($svc in $servicesToRestore.Keys) {
|
||||
try {
|
||||
$service = Get-Service -Name $svc -ErrorAction SilentlyContinue
|
||||
if ($service -and $service.StartType -eq 'Disabled') {
|
||||
$startupType = $servicesToRestore[$svc]
|
||||
Set-Service -Name $svc -StartupType $startupType -ErrorAction Stop
|
||||
|
||||
if ($startupType -eq "Automatic") {
|
||||
Start-Service -Name $svc -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
Write-Success " [✓] Restored: $svc ($startupType)"
|
||||
$restoredCount++
|
||||
}
|
||||
} catch {
|
||||
Write-Warning " [!] Could not restore: $svc"
|
||||
}
|
||||
}
|
||||
|
||||
if ($restoredCount -eq 0) {
|
||||
Write-Info " [i] No disabled services found to restore"
|
||||
} else {
|
||||
Write-Success " [✓] Restored $restoredCount service(s)"
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BOOT CONFIGURATION
|
||||
|
||||
Write-Info "`n=== RESTORING BOOT CONFIGURATION ===`n"
|
||||
|
||||
try {
|
||||
bcdedit /set bootux standard | Out-Null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Success " [✓] Re-enabled boot graphics"
|
||||
} else {
|
||||
Write-Warning " [!] Could not modify boot configuration"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning " [!] Could not modify boot configuration"
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SCHEDULED TASK
|
||||
|
||||
Write-Info "`n=== REMOVING NEW USER AUTO-CONFIG TASK ===`n"
|
||||
|
||||
$taskName = "SuppressAnimationNewUsers"
|
||||
$taskPath = "\Microsoft\Windows\Shell\"
|
||||
|
||||
$existingTask = Get-ScheduledTask -TaskName $taskName -TaskPath $taskPath -ErrorAction SilentlyContinue
|
||||
if ($existingTask) {
|
||||
try {
|
||||
Unregister-ScheduledTask -TaskName $taskName -TaskPath $taskPath -Confirm:$false -ErrorAction Stop
|
||||
Write-Success " [✓] Removed scheduled task"
|
||||
} catch {
|
||||
Write-Warning " [!] Could not remove scheduled task: $($_.Exception.Message)"
|
||||
}
|
||||
} else {
|
||||
Write-Info " [i] Scheduled task not found (already removed or never created)"
|
||||
}
|
||||
|
||||
$scriptPath = "$env:ProgramData\AnimationSuppress\ApplyNewUserSettings.ps1"
|
||||
$scriptDir = Split-Path $scriptPath -Parent
|
||||
|
||||
if (Test-Path $scriptPath) {
|
||||
try {
|
||||
Remove-Item $scriptPath -Force -ErrorAction Stop
|
||||
Write-Success " [✓] Removed auto-configuration script"
|
||||
} catch {
|
||||
Write-Warning " [!] Could not remove script file"
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path $scriptDir) {
|
||||
try {
|
||||
Remove-Item $scriptDir -Force -Recurse -ErrorAction Stop
|
||||
Write-Success " [✓] Removed script directory"
|
||||
} catch {
|
||||
Write-Warning " [!] Could not remove script directory"
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UNLOAD TEMP HIVES
|
||||
|
||||
Write-Info "`nCleaning up temporary registry hives..."
|
||||
foreach ($hive in $loadedHives) {
|
||||
try {
|
||||
[gc]::Collect()
|
||||
Start-Sleep -Milliseconds 500
|
||||
reg unload "HKU\$hive" 2>&1 | Out-Null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Success " Unloaded: $hive"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning " $hive will unload on reboot"
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
# Summary
|
||||
Write-Info "`n" + "="*70
|
||||
Write-Success "`n✓ ANIMATION SUPPRESSION SUCCESSFULLY REVERSED!"
|
||||
Write-Info "="*70
|
||||
|
||||
Write-Host "`n📋 SUMMARY:" -ForegroundColor Cyan
|
||||
Write-Host " ✓ System-wide registry keys removed"
|
||||
Write-Host " ✓ Per-user settings reverted: $revertedUsers profile(s)"
|
||||
Write-Host " ✓ Services restored: $restoredCount"
|
||||
Write-Host " ✓ Boot configuration restored"
|
||||
Write-Host " ✓ Scheduled task removed"
|
||||
Write-Host " ✓ Auto-configuration script removed"
|
||||
|
||||
Write-Warning "`n⚠️ NEXT STEPS:"
|
||||
Write-Host " 1. Restart your computer for all changes to take effect"
|
||||
Write-Host " 2. Windows will restore default animations"
|
||||
Write-Host " 3. Welcome screen and profile animations will return"
|
||||
Write-Host " 4. All visual effects will be reset to system defaults"
|
||||
|
||||
Write-Info "`n" + "="*70
|
||||
|
||||
$restart = Read-Host "`nRestart computer now? (Y/N)"
|
||||
if ($restart -eq 'Y') {
|
||||
Write-Info "Restarting in 10 seconds... (Ctrl+C to cancel)"
|
||||
Start-Sleep -Seconds 10
|
||||
Restart-Computer -Force
|
||||
} else {
|
||||
Write-Warning "`nPlease restart your computer manually for full restoration.`n"
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Reverting automatic logon settings
|
||||
|
||||
:: Check if AutoAdminLogon is set to 1 and revert it to 0 if necessary
|
||||
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon | findstr /i "1" >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo Disabling AutoAdminLogon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 0 /f
|
||||
) ELSE (
|
||||
echo AutoAdminLogon is not set to 1, no change needed
|
||||
)
|
||||
|
||||
:: Check if DefaultUserName is set and remove it if necessary
|
||||
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo Removing DefaultUserName
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f
|
||||
) ELSE (
|
||||
echo DefaultUserName is not set, no change needed
|
||||
)
|
||||
|
||||
:: Check if DefaultPassword is set and remove it if necessary
|
||||
REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword >nul 2>&1
|
||||
IF %ERRORLEVEL% EQU 0 (
|
||||
echo Removing DefaultPassword
|
||||
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f
|
||||
) ELSE (
|
||||
echo DefaultPassword is not set, no change needed
|
||||
)
|
||||
|
||||
echo Automatic logon settings have been reverted.
|
||||
@@ -1,94 +0,0 @@
|
||||
rem Disable Hibernate
|
||||
powercfg -h off
|
||||
|
||||
rem Disable Credential Providers to bypass logon UI
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{60b78e88-ead8-445c-9cfd-0b87f74ea6cd}" /v Disabled /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{D6886603-9D2F-4EB2-B667-1971041FA96B}" /v Disabled /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{BEC1C251-9BEA-4A7D-9781-D8E7F9FC2DB9}" /v Disabled /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{8FD7E19C-3BF7-489B-A72C-846AB3678C96}" /v Disabled /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{27GBPKG2-4NDR-576H-2JPM-67BAT5D26A9A}" /v Disabled /t REG_DWORD /d 1 /f
|
||||
|
||||
rem Force classic logon style
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UIHost /t REG_SZ /d "logonui.exe" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UseNewUX /t REG_DWORD /d 0 /f
|
||||
|
||||
rem Disable the Shell Experience Host process during logon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ShellExperienceHost.exe" /v Debugger /t REG_SZ /d "cmd.exe /c exit" /f
|
||||
|
||||
rem Disable Credential Provider Filters
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Provider Filters\{D27C9D86-7207-4914-913B-0950C06BF9E6}" /v Disabled /t REG_DWORD /d 1 /f
|
||||
|
||||
rem Disable ALL welcome screen animations and UI elements
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableFirstLogonAnimation /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLockScreenAnimations /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v DisplayInitialPageDelay /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\TestHooks" /v XamlInitialPageDelay /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v ShowFirstLogonAnimation /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /v OEMBackground /t REG_DWORD /d 0 /f
|
||||
|
||||
rem Windows 11 Specific LogonUI Disabling
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableFirstLogonAnimation /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\ProcessInit" /v Enabled /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnDisplayName /t REG_SZ /d "" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnSAMUser /t REG_SZ /d "" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnUser /t REG_SZ /d "" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnUserSID /t REG_SZ /d "" /f
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v DisableRestrictedAdmin /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLastUsername /t REG_DWORD /d 1 /f
|
||||
|
||||
rem Disable Logon UI and Welcome Screen Services
|
||||
sc config "wlidsvc" start= disabled
|
||||
sc config "wisvc" start= disabled
|
||||
|
||||
rem Disable user profile picture and name caching
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DontDisplayLastUsername /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLockedUserId /t REG_DWORD /d 3 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v BlockUserFromShowingAccountDetailsOnSignin /t REG_DWORD /d 1 /f
|
||||
|
||||
rem Disable Windows Welcome Screen
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableWelcomeScreen /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableWelcomeScreen /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v WelcomeScreenEnabled /t REG_DWORD /d 0 /f
|
||||
|
||||
rem Force Windows to use auto logon and bypass UI
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d "." /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ForceAutoLogon /t REG_DWORD /d 1 /f
|
||||
|
||||
rem Disable all animation settings
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableLogonBackgroundImage /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DisableStartupSound /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v ButtonSet /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v LastLoggedOnProvider /t REG_SZ /d "" /f
|
||||
|
||||
rem Disable Windows logon process
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableCAD /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableSIHostIntegration /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ARSOUserConsent /t REG_DWORD /d 0 /f
|
||||
|
||||
rem Disable Windows Hello face, fingerprint, and PIN
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v AllowDomainPINLogon /t REG_DWORD /d 0 /f
|
||||
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Biometrics" /v Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
rem Disable Shell Infrastructure Host
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sihost.exe" /v Debugger /t REG_SZ /d "cmd.exe /c exit" /f
|
||||
|
||||
rem Enable auto logon to bypass UI completely
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v ForceAutoLogon /t REG_DWORD /d 1 /f
|
||||
|
||||
rem Set autologon username and password (you'll need to replace these with actual values)
|
||||
SET /p USERNAME=Enter your Windows username:
|
||||
SET /p PASSWORD=Enter your Windows password:
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "%PASSWORD%" /f
|
||||
|
||||
rem Disable User Interface at boot
|
||||
bcdedit /set {bootmgr} displaybootmenu no
|
||||
bcdedit /set {current} bootmenupolicy legacy
|
||||
bcdedit /set {current} quietboot yes
|
||||
bcdedit /set {current} bootuxdisabled on
|
||||
bcdedit /set {current} nobootux on
|
||||
@@ -1,173 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Steam Big Picture as default shell
|
||||
|
||||
echo Set Steam Big Picture as the default shell
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -silent -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_NAME1=StartSteamAsAdmin.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "SCRIPT_PATH1=%STEAM_FOLDER%\%SCRIPT_NAME1%"
|
||||
|
||||
SET "SCRIPT_PATH1=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
|
||||
echo Creating StartSteamAsAdmin.bat script
|
||||
(
|
||||
echo @echo off
|
||||
echo Check if user is logged on
|
||||
echo query user ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo Set Steam As Admin
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
) > "%SCRIPT_PATH1%"
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME1=RunSteamAsAdmin.vbs"
|
||||
SET "VBS_PATH1=%STEAM_FOLDER%\%VBS_NAME1%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH1%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH1%"^&chr(34), 0, True >> "%VBS_PATH1%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH1%"
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo Check if user is logged on
|
||||
echo query user ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
echo start C:\Windows\explorer.exe
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Enable automatic logon
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "" /f
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
echo Disable Logon UI
|
||||
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
PowerShell -Command "Enable-WindowsOptionalFeature -Online -FeatureName 'DeviceLockdown' -All"
|
||||
PowerShell -Command "Enable-WindowsOptionalFeature -Online -FeatureName 'Custom Logon' -All"
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_PATH=%PLAYNITE_FOLDER%\Playnite.FullscreenApp.exe"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=%SystemRoot%\explorer.exe"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%%USERNAME%%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
|
||||
echo rem Set taskbar to autohide
|
||||
echo powershell -command ^^
|
||||
"^$settingsPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';" ^^
|
||||
"^$settings = (Get-ItemProperty -Path ^$settingsPath -Name 'Settings').Settings;" ^^
|
||||
"^$settings[8] = ^$settings[8] -bor 0x08;" ^^
|
||||
"Set-ItemProperty -Path ^$settingsPath -Name 'Settings' -Value ^$settings"
|
||||
|
||||
echo rem Start Explorer
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo start "" "%EXPLORER_PATH%" /desktop
|
||||
|
||||
echo rem Wait for Explorer to start
|
||||
echo timeout /t 2 /nobreak ^>nul
|
||||
|
||||
echo rem Wait for a specific delay before unsetting autohide
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
|
||||
echo rem Unset taskbar autohide and refresh taskbar without restarting explorer.exe
|
||||
echo powershell -command ^^
|
||||
"^$settingsPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';" ^^
|
||||
"^$settings = (Get-ItemProperty -Path ^$settingsPath -Name 'Settings').Settings;" ^^
|
||||
"^$settings[8] = ^$settings[8] -band 0xF7;" ^^
|
||||
"Set-ItemProperty -Path ^$settingsPath -Name 'Settings' -Value ^$settings;" ^^
|
||||
"^$sig = '[DllImport(\"user32.dll\")] public static extern int SendMessageTimeout(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam, uint fuFlags, uint uTimeout, out IntPtr lpdwResult);';" ^^
|
||||
"Add-Type -MemberDefinition ^$sig -Name 'Win32SendMessageTimeout' -Namespace 'Win32Functions';" ^^
|
||||
"[Win32Functions.Win32SendMessageTimeout]::SendMessageTimeout([IntPtr]::Zero, 0x1A, [IntPtr]::Zero, [IntPtr]::Zero, 0x0002, 1000, [ref]([IntPtr]::Zero));"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
REM Create VBScript to run the batch file silently
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34^) ^& "%SCRIPT_PATH%" ^& chr(34^), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET "XML_PATH=%PLAYNITE_FOLDER%\DelayedExplorerStartTask.xml"
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>%USERNAME%^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%^</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Deleting the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Creating the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%"
|
||||
IF ERRORLEVEL 1 (
|
||||
echo Failed to create scheduled task.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Playnite folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Applying system optimizations
|
||||
|
||||
REM Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
REM Disable Logon UI
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Visual Effects
|
||||
reg add "HKCU\Control Panel\Desktop" /v VisualFXSetting /t REG_DWORD /d 2 /f
|
||||
|
||||
REM Increase File System Performance
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Optimize Paging File Performance
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Startup Delay
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
REM Improve Windows Explorer Process Priority
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
|
||||
REM Adjust Large System Cache
|
||||
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Playnite set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,222 +0,0 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Log file
|
||||
set log_file=%~dp0modify_winlogon.log
|
||||
set compile_log=%~dp0compile.log
|
||||
|
||||
echo Script started at %date% %time% > %log_file%
|
||||
|
||||
:: Ensure running as administrator
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo This script must be run as administrator! >> %log_file%
|
||||
echo This script must be run as administrator!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Paths and filenames
|
||||
set exe_name=CustomLogonUI.exe
|
||||
set cpp_code=CustomLogonUI.cpp
|
||||
set src_path=%~dp0
|
||||
set log_file=%~dp0modify_winlogon.log
|
||||
set dst_path=C:\Windows\System32
|
||||
set backup_logonui=logonui_backup.exe
|
||||
set temp_dir=C:\Temp
|
||||
set installer=%temp_dir%\vs_buildtools.exe
|
||||
set vs_install_log=%temp_dir%\vs_buildtools_install.log
|
||||
set vs_install_error_log=%temp_dir%\vs_buildtools_install_error.log
|
||||
echo Script started at %date% %time% > %log_file%
|
||||
echo Script started at %date% %time%
|
||||
|
||||
:: Ensure Temp Directory Exists and has Correct Permissions
|
||||
echo Ensuring temp directory exists and has correct permissions... >> %log_file%
|
||||
if not exist "%temp_dir%" (
|
||||
mkdir "%temp_dir%"
|
||||
)
|
||||
icacls "%temp_dir%" /grant Everyone:(F) >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to set permissions for the temp directory. >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Temp directory permissions set. >> %log_file%
|
||||
|
||||
:: Step 2: Install .NET Framework 4.8 (NetFx4-AdvSrvs)
|
||||
echo Installing .NET Framework 4.8 (NetFx4-AdvSrvs)... >> %log_file%
|
||||
echo Installing .NET Framework 4.8 (NetFx4-AdvSrvs)...
|
||||
dism /online /enable-feature /featurename:NetFx4-AdvSrvs /All /NoRestart >> %log_file% 2>&1
|
||||
echo DISM command exit code: %errorlevel% >> %log_file%
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install .NET Framework 4.8 (NetFx4-AdvSrvs). >> %log_file%
|
||||
echo Failed to install .NET Framework 4.8 (NetFx4-AdvSrvs). Check the log for details: %log_file%
|
||||
exit /b
|
||||
)
|
||||
echo .NET Framework 4.8 (NetFx4-AdvSrvs) installed successfully. >> %log_file%
|
||||
echo .NET Framework 4.8 (NetFx4-AdvSrvs) installed successfully.
|
||||
|
||||
:: Step 4: Install Windows SDK
|
||||
echo Downloading Windows SDK... >> %log_file%
|
||||
echo Downloading Windows SDK...
|
||||
powershell -command "Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/?linkid=2120843' -OutFile '%sdk_installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Windows SDK installer. >> %log_file%
|
||||
echo Failed to download Windows SDK installer.
|
||||
exit /b
|
||||
)
|
||||
echo Windows SDK installer downloaded successfully. >> %log_file%
|
||||
echo Windows SDK installer downloaded successfully.
|
||||
|
||||
echo Installing Windows SDK... >> %log_file%
|
||||
echo Installing Windows SDK...
|
||||
start /wait "" "%sdk_installer%" /Quiet /NoRestart /Features + /InstallPath "%ProgramFiles%\Windows Kits\10" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Windows SDK. >> %log_file%
|
||||
echo Failed to install Windows SDK.
|
||||
exit /b
|
||||
)
|
||||
echo Windows SDK installed successfully. >> %log_file%
|
||||
echo Windows SDK installed successfully.
|
||||
|
||||
@echo off
|
||||
|
||||
:: Install Visual C++ Redist
|
||||
echo Downloading Visual C++ Redistributable installers...
|
||||
|
||||
:: Create a temporary directory to store the installers
|
||||
set "TMP_DIR=%TEMP%\vcredist_installers"
|
||||
mkdir "%TMP_DIR%"
|
||||
|
||||
:: Download the latest Visual C++ Redistributable installers
|
||||
bitsadmin /transfer "VC2015-2022 x64" https://aka.ms/vs/17/release/vc_redist.x64.exe "%TMP_DIR%\VC_redist.x64.exe"
|
||||
bitsadmin /transfer "VC2015-2022 x86" https://aka.ms/vs/17/release/vc_redist.x86.exe "%TMP_DIR%\VC_redist.x86.exe"
|
||||
|
||||
echo Installing Visual C++ Redistributable packages...
|
||||
|
||||
:: Install Visual C++ 2015-2022 Redistributable
|
||||
start /wait "%TMP_DIR%\VC_redist.x64.exe" /install /quiet /norestart
|
||||
start /wait "%TMP_DIR%\VC_redist.x86.exe" /install /quiet /norestart
|
||||
|
||||
echo Visual C++ Redistributable packages installed successfully!
|
||||
|
||||
:: Clean up the temporary directory
|
||||
rmdir /s /q "%TMP_DIR%"
|
||||
|
||||
pause
|
||||
|
||||
:: Step 6: Download and Install Visual Studio Community Edition
|
||||
echo Downloading Visual Studio Community Edition... >> %log_file%
|
||||
echo Downloading Visual Studio Community Edition...
|
||||
powershell -command "Invoke-WebRequest -Uri 'https://aka.ms/vs/16/release/vs_community.exe' -OutFile '%vs_community_installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Visual Studio Community installer. >> %log_file%
|
||||
echo Failed to download Visual Studio Community installer.
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Community installer downloaded successfully. >> %log_file%
|
||||
echo Visual Studio Community installer downloaded successfully.
|
||||
|
||||
echo Installing Visual Studio Community Edition... >> %log_file%
|
||||
echo Installing Visual Studio Community Edition...
|
||||
start /wait "" "%vs_community_installer%" --add Microsoft.VisualStudio.Workload.CoreEditor --includeRecommended --passive --norestart --log %vs_install_log% --loglevel verbose
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Visual Studio Community. Check the install log for details: %vs_install_log% >> %log_file%
|
||||
echo Failed to install Visual Studio Community. Check the install log for details: %vs_install_log%
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Community installed successfully. >> %log_file%
|
||||
echo Visual Studio Community installed successfully.
|
||||
|
||||
:: Download Visual Studio Build Tools Installer
|
||||
set installer=%temp_dir%\vs_buildtools.exe
|
||||
echo Downloading Visual Studio Build Tools... >> %log_file%
|
||||
powershell -Command "Invoke-WebRequest -Uri 'https://aka.ms/vs/16/release/vs_buildtools.exe' -OutFile '%installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Visual Studio Build Tools installer. >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Build Tools installer downloaded successfully. >> %log_file%
|
||||
|
||||
:: Run Visual Studio Build Tools Installer
|
||||
echo Running Visual Studio Build Tools installer... >> %log_file%
|
||||
powershell -Command "Start-Process -Wait -FilePath '%installer%' -ArgumentList '--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --norestart' -RedirectStandardOutput '%vs_install_log%' -RedirectStandardError '%vs_install_error_log%' -NoNewWindow" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Visual Studio Build Tools. >> %log_file%
|
||||
echo Check the install log for details: %vs_install_log% and %vs_install_error_log% >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Build Tools installed successfully. >> %log_file%
|
||||
|
||||
:: Indicate end of script
|
||||
echo Script completed successfully. >> %log_file%
|
||||
pause
|
||||
|
||||
:: Step 5: Create the C++ source file using PowerShell
|
||||
echo Creating C++ source file using PowerShell... >> %log_file%
|
||||
powershell -command "Add-Content -Path '%cpp_code%' -Value '#include <windows.h>'; Add-Content -Path '%cpp_code%' -Value 'int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)'; Add-Content -Path '%cpp_code%' -Value '{'; Add-Content -Path '%cpp_code%' -Value ' return 0;'; Add-Content -Path '%cpp_code%' -Value '}';"
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to create the C++ source file using PowerShell. >> %log_file%
|
||||
echo Failed to create the C++ source file using PowerShell.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo C++ source file created successfully using PowerShell. >> %log_file%
|
||||
|
||||
:: Step 6: Compile the C++ code to create the custom executable
|
||||
echo Compiling the C++ source file... >> %log_file%
|
||||
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86 >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to set up Visual Studio environment. >> %log_file%
|
||||
echo Failed to set up Visual Studio environment.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
cl %cpp_code% /Fe:%exe_name% /link /SUBSYSTEM:WINDOWS > %compile_log% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Compilation failed. >> %log_file%
|
||||
echo Compilation failed. Check the compile.log for details. >> %log_file%
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo C++ source file compiled successfully. >> %log_file%
|
||||
|
||||
:: Step 7: Ensure the custom executable was created
|
||||
if not exist "%src_path%%exe_name%" (
|
||||
echo Custom executable %exe_name% not found in %src_path%. >> %log_file%
|
||||
echo Custom executable %exe_name% not found in %src_path%.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Custom executable found. >> %log_file%
|
||||
pause
|
||||
|
||||
:: Step 8: Backup the original logonui.exe
|
||||
echo Backing up the original logonui.exe... >> %log_file%
|
||||
copy "%dst_path%\logonui.exe" "%dst_path%\%backup_logonui%" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to backup the original logonui.exe. >> %log_file%
|
||||
echo Failed to backup the original logonui.exe.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Original logonui.exe backed up successfully. >> %log_file%
|
||||
pause
|
||||
|
||||
:: Step 9: Replace the original logonui.exe with the custom executable
|
||||
echo Replacing the original logonui.exe with the custom executable... >> %log_file%
|
||||
copy "%src_path%%exe_name%" "%dst_path%\logonui.exe" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to replace logonui.exe. >> %log_file%
|
||||
echo Failed to replace logonui.exe.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo logonui.exe replaced successfully. >> %log_file%
|
||||
pause
|
||||
|
||||
echo All changes applied successfully. Please restart your computer. >> %log_file%
|
||||
echo All changes applied successfully. Please restart your computer.
|
||||
pause
|
||||
105
buildexe.bat
105
buildexe.bat
@@ -1,105 +0,0 @@
|
||||
#ifndef UNICODE
|
||||
#define UNICODE
|
||||
#endif
|
||||
#ifndef _UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <shellapi.h> // Needed for CommandLineToArgvW
|
||||
|
||||
// --- Configuration ---
|
||||
const wchar_t WINDOW_TITLE[] = L"---BlackOverlayScreen---";
|
||||
const wchar_t CLASS_NAME[] = L"BlackOverlayClass";
|
||||
// --- End Configuration ---
|
||||
|
||||
// Forward declaration for wWinMain if WinMain calls it
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow);
|
||||
|
||||
// ADDED ANSI WinMain entry point wrapper
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
||||
// Get command line arguments as Unicode
|
||||
int argc;
|
||||
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
if (argv == NULL) {
|
||||
// Handle error if needed, perhaps return a failure code
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Call the Unicode wWinMain function
|
||||
// Note: We don't directly use lpCmdLine here, relying on GetCommandLineW instead.
|
||||
// We also pass the original hInstance and nCmdShow. hPrevInstance is obsolete.
|
||||
int result = wWinMain(hInstance, hPrevInstance, NULL, nCmdShow); // Pass NULL for pwCmdLine as wWinMain doesn't use it
|
||||
|
||||
// Free the memory allocated by CommandLineToArgvW
|
||||
LocalFree(argv);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Window Procedure (remains the same)
|
||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
switch (uMsg) {
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return 1;
|
||||
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hwnd, &ps);
|
||||
FillRect(hdc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH));
|
||||
EndPaint(hwnd, &ps);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
// Existing UNICODE wWinMain entry point (remains mostly the same)
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
|
||||
// NOTE: We ignore hPrevInstance and pCmdLine parameters as they are handled/obsolete
|
||||
|
||||
// 1. Register the window class.
|
||||
WNDCLASS wc = { };
|
||||
wc.lpfnWndProc = WndProc;
|
||||
wc.hInstance = hInstance;
|
||||
wc.lpszClassName = CLASS_NAME;
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
|
||||
if (!RegisterClass(&wc)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 2. Get screen dimensions for maximization
|
||||
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
|
||||
int screenHeight = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
// 3. Create the window.
|
||||
HWND hwnd = CreateWindowEx(
|
||||
WS_EX_TOPMOST,
|
||||
CLASS_NAME,
|
||||
WINDOW_TITLE,
|
||||
WS_POPUP | WS_VISIBLE,
|
||||
0, 0, screenWidth, screenHeight,
|
||||
NULL, NULL, hInstance, NULL
|
||||
);
|
||||
|
||||
if (hwnd == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 4. Run the message loop.
|
||||
MSG msg = { };
|
||||
while (GetMessage(&msg, NULL, 0, 0) > 0) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
:: Paths for Steam
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "STEAM_SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "STEAM_SCRIPT_PATH=%STEAM_FOLDER%\%STEAM_SCRIPT_NAME%"
|
||||
SET "STEAM_VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "STEAM_VBS_PATH=%STEAM_FOLDER%\%STEAM_VBS_NAME%"
|
||||
SET "STEAM_XML_NAME=DelayedExplorerStartTask.xml"
|
||||
SET "STEAM_XML_PATH=%STEAM_FOLDER%\%STEAM_XML_NAME%"
|
||||
|
||||
:: Paths for Playnite
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "PLAYNITE_SCRIPT_PATH=%PLAYNITE_FOLDER%\%PLAYNITE_SCRIPT_NAME%"
|
||||
SET "PLAYNITE_VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "PLAYNITE_VBS_PATH=%PLAYNITE_FOLDER%\%PLAYNITE_VBS_NAME%"
|
||||
SET "PLAYNITE_XML_NAME=DelayedExplorerStartTask.xml"
|
||||
SET "PLAYNITE_XML_PATH=%PLAYNITE_FOLDER%\%PLAYNITE_XML_NAME%"
|
||||
|
||||
echo ================================
|
||||
echo DISABLING GAMESDOWS / REMOVING CUSTOM SHELL
|
||||
echo ================================
|
||||
|
||||
:: 1) Reset the default shell to Explorer
|
||||
echo [1/5] Resetting default shell to Explorer...
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
|
||||
/v "Shell" /t REG_SZ /d "C:\Windows\explorer.exe" /f
|
||||
if ERRORLEVEL 1 (
|
||||
echo [ERROR] Failed to reset the default shell.
|
||||
goto end
|
||||
) else (
|
||||
echo [SUCCESS] Default shell reset to Explorer.
|
||||
)
|
||||
|
||||
:: 2) Delete any existing DelayedExplorerStart.bat in Steam folder
|
||||
echo [2/5] Deleting DelayedExplorerStart.bat from Steam folder...
|
||||
IF EXIST "%STEAM_SCRIPT_PATH%" (
|
||||
DEL /F /Q "%STEAM_SCRIPT_PATH%"
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete %STEAM_SCRIPT_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %STEAM_SCRIPT_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %STEAM_SCRIPT_NAME% does not exist in Steam folder.
|
||||
)
|
||||
|
||||
:: 2b) Delete any existing DelayedExplorerStart.bat in Playnite folder
|
||||
echo [2b/5] Deleting DelayedExplorerStart.bat from Playnite folder...
|
||||
IF EXIST "%PLAYNITE_SCRIPT_PATH%" (
|
||||
DEL /F /Q "%PLAYNITE_SCRIPT_PATH%"
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete %PLAYNITE_SCRIPT_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %PLAYNITE_SCRIPT_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %PLAYNITE_SCRIPT_NAME% does not exist in Playnite folder.
|
||||
)
|
||||
|
||||
:: 3) Delete any existing RunBatchSilently.vbs in Steam folder
|
||||
echo [3/5] Deleting RunBatchSilently.vbs from Steam folder...
|
||||
IF EXIST "%STEAM_VBS_PATH%" (
|
||||
DEL /F /Q "%STEAM_VBS_PATH%"
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete %STEAM_VBS_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %STEAM_VBS_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %STEAM_VBS_NAME% does not exist in Steam folder.
|
||||
)
|
||||
|
||||
:: 3b) Delete any existing RunBatchSilently.vbs in Playnite folder
|
||||
echo [3b/5] Deleting RunBatchSilently.vbs from Playnite folder...
|
||||
IF EXIST "%PLAYNITE_VBS_PATH%" (
|
||||
DEL /F /Q "%PLAYNITE_VBS_PATH%"
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete %PLAYNITE_VBS_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %PLAYNITE_VBS_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %PLAYNITE_VBS_NAME% does not exist in Playnite folder.
|
||||
)
|
||||
|
||||
:: 4) Delete any existing DelayedExplorerStartTask.xml in Steam folder
|
||||
echo [4/5] Deleting DelayedExplorerStartTask.xml from Steam folder...
|
||||
IF EXIST "%STEAM_XML_PATH%" (
|
||||
DEL /F /Q "%STEAM_XML_PATH%"
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete %STEAM_XML_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %STEAM_XML_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %STEAM_XML_NAME% does not exist in Steam folder.
|
||||
)
|
||||
|
||||
:: 4b) Delete any existing DelayedExplorerStartTask.xml in Playnite folder
|
||||
echo [4b/5] Deleting DelayedExplorerStartTask.xml from Playnite folder...
|
||||
IF EXIST "%PLAYNITE_XML_PATH%" (
|
||||
DEL /F /Q "%PLAYNITE_XML_PATH%"
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete %PLAYNITE_XML_NAME%.
|
||||
) else (
|
||||
echo [SUCCESS] %PLAYNITE_XML_NAME% deleted.
|
||||
)
|
||||
) else (
|
||||
echo [INFO] %PLAYNITE_XML_NAME% does not exist in Playnite folder.
|
||||
)
|
||||
|
||||
:: 5) Delete the scheduled task (if it exists)
|
||||
echo [5/5] Deleting scheduled task 'RunDelayedExplorerStart'...
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f >nul 2>&1
|
||||
if ERRORLEVEL 1 (
|
||||
echo [WARNING] Could not delete the scheduled task 'RunDelayedExplorerStart'.
|
||||
) else (
|
||||
echo [SUCCESS] Scheduled task 'RunDelayedExplorerStart' deleted.
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ================================
|
||||
echo GamesDows has been disabled successfully.
|
||||
echo All Playnite/Steam scripts removed.
|
||||
echo The default shell is now Explorer.
|
||||
echo A system restart is recommended.
|
||||
echo ================================
|
||||
|
||||
:end
|
||||
ENDLOCAL
|
||||
pause
|
||||
@@ -1,477 +0,0 @@
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Universal Windows welcome animation suppression for ALL editions.
|
||||
|
||||
.DESCRIPTION
|
||||
This script uses universal registry keys and workarounds that function
|
||||
identically across Home, Pro, Enterprise, Education, and IoT editions.
|
||||
No edition-specific features required.
|
||||
|
||||
.NOTES
|
||||
- Requires Administrator privileges
|
||||
- Works on Windows 10/11 all editions
|
||||
- Modifies system and all user profiles
|
||||
- Restart required
|
||||
#>
|
||||
|
||||
# Color output functions
|
||||
function Write-Success { param($msg) Write-Host $msg -ForegroundColor Green }
|
||||
function Write-Info { param($msg) Write-Host $msg -ForegroundColor Cyan }
|
||||
function Write-Warning { param($msg) Write-Host $msg -ForegroundColor Yellow }
|
||||
function Write-Failure { param($msg) Write-Host $msg -ForegroundColor Red }
|
||||
|
||||
Write-Info "`n=== UNIVERSAL Windows Animation Suppression (All Editions) ===`n"
|
||||
|
||||
# Check for admin rights
|
||||
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Write-Failure "This script requires Administrator privileges!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Detect Windows edition
|
||||
$edition = (Get-WindowsEdition -Online).Edition
|
||||
$version = [System.Environment]::OSVersion.Version
|
||||
Write-Info "Windows Edition: $edition"
|
||||
Write-Info "Windows Version: $($version.Major).$($version.Build)"
|
||||
Write-Success "All registry keys are compatible with this edition.`n"
|
||||
|
||||
# Create restore point
|
||||
Write-Info "Creating system restore point..."
|
||||
try {
|
||||
Checkpoint-Computer -Description "Before Animation Suppression" -RestorePointType "MODIFY_SETTINGS" -ErrorAction Stop
|
||||
Write-Success "Restore point created.`n"
|
||||
} catch {
|
||||
Write-Warning "Could not create restore point: $($_.Exception.Message)"
|
||||
$continue = Read-Host "Continue anyway? (Y/N)"
|
||||
if ($continue -ne 'Y') { exit 0 }
|
||||
}
|
||||
|
||||
# Function to set registry value with error handling
|
||||
function Set-RegValue {
|
||||
param(
|
||||
[string]$Path,
|
||||
[string]$Name,
|
||||
[object]$Value,
|
||||
[string]$Type = "DWord",
|
||||
[switch]$Suppress
|
||||
)
|
||||
|
||||
try {
|
||||
if (-not (Test-Path $Path)) {
|
||||
New-Item -Path $Path -Force | Out-Null
|
||||
}
|
||||
New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $Type -Force | Out-Null
|
||||
if (-not $Suppress) { Write-Success " [✓] $Name = $Value" }
|
||||
return $true
|
||||
} catch {
|
||||
if (-not $Suppress) { Write-Warning " [!] $Name - $($_.Exception.Message)" }
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
# Mount registry hives
|
||||
Write-Info "Mounting registry hives..."
|
||||
$null = New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS -ErrorAction SilentlyContinue
|
||||
|
||||
# Get all user profiles
|
||||
$profiles = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" |
|
||||
ForEach-Object {
|
||||
$sid = $_.PSChildName
|
||||
$profilePath = (Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).ProfileImagePath
|
||||
if ($profilePath -and $profilePath -notmatch "systemprofile|NetworkService|LocalService") {
|
||||
[PSCustomObject]@{
|
||||
SID = $sid
|
||||
Path = $profilePath
|
||||
Loaded = Test-Path "HKU:\$sid"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Info "Found $($profiles.Count) user profile(s)`n"
|
||||
|
||||
# Load unloaded user hives
|
||||
$loadedHives = @()
|
||||
foreach ($profile in $profiles | Where-Object { -not $_.Loaded }) {
|
||||
$hivePath = Join-Path $profile.Path "NTUSER.DAT"
|
||||
if (Test-Path $hivePath) {
|
||||
$tempKey = "TEMP_$($profile.SID)"
|
||||
try {
|
||||
$result = reg load "HKU\$tempKey" $hivePath 2>&1
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
$loadedHives += $tempKey
|
||||
Write-Success " Loaded hive for: $(Split-Path $profile.Path -Leaf)"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning " Could not load: $(Split-Path $profile.Path -Leaf)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Get all SIDs to process
|
||||
$allSIDs = @(".DEFAULT") + $profiles.SID + $loadedHives
|
||||
Write-Info "`nWill apply user settings to $($allSIDs.Count) profile(s)`n"
|
||||
|
||||
#region SYSTEM-WIDE SETTINGS (HKLM) - UNIVERSAL KEYS ONLY
|
||||
|
||||
Write-Info "=== SYSTEM-WIDE SETTINGS (Works on ALL Editions) ===`n"
|
||||
|
||||
# Core animation suppressions - Universal across all editions
|
||||
Write-Info "[1] Core Animation Control"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "EnableFirstLogonAnimation" 0
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "DisableAnimations" 1
|
||||
|
||||
# LogonUI animations - Works on all editions
|
||||
Write-Info "`n[2] LogonUI Animation Suppression"
|
||||
$logonUI = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI"
|
||||
Set-RegValue $logonUI "AnimationDisabled" 1
|
||||
Set-RegValue $logonUI "EnableTransitions" 0
|
||||
Set-RegValue $logonUI "LastLoggedOnDisplayName" "" "String"
|
||||
Set-RegValue $logonUI "LastLoggedOnSAMUser" "" "String"
|
||||
Set-RegValue $logonUI "LastLoggedOnUser" "" "String"
|
||||
|
||||
# Status messages - Universal
|
||||
Write-Info "`n[3] Status Message Suppression"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "DisableStatusMessages" 1
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "VerboseStatus" 0
|
||||
|
||||
# Lock screen - Works on all editions
|
||||
Write-Info "`n[4] Lock Screen Suppression"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" "NoLockScreen" 1
|
||||
|
||||
# Winlogon timing - Universal
|
||||
Write-Info "`n[5] Winlogon Timing Optimization"
|
||||
$winlogon = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
Set-RegValue $winlogon "DelayedDesktopSwitchTimeout" 0
|
||||
Set-RegValue $winlogon "AutoLogonDelay" 0
|
||||
|
||||
# Boot animations - Universal
|
||||
Write-Info "`n[6] Boot Animation Suppression"
|
||||
$bootAnim = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\BootAnimation"
|
||||
Set-RegValue $bootAnim "DisableStartupSound" 1
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\EditionOverrides" "UserSetting_DisableStartupSound" 1
|
||||
|
||||
# DWM animations - Universal
|
||||
Write-Info "`n[7] Desktop Window Manager"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\DWM" "DisableAnimation" 1
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\DWM" "AnimationsShiftKey" 0
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\DWM" "EnableAeroPeek" 0
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\DWM" "AlwaysHibernateThumbnails" 0
|
||||
|
||||
# Shutdown UI - Universal
|
||||
Write-Info "`n[8] Shutdown UI Elements"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "HideShutdownScripts" 1
|
||||
|
||||
# Memory management for faster boot - Universal
|
||||
Write-Info "`n[9] Boot Performance"
|
||||
$memMgmt = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"
|
||||
Set-RegValue "$memMgmt\PrefetchParameters" "EnablePrefetcher" 0
|
||||
Set-RegValue "$memMgmt\PrefetchParameters" "EnableSuperfetch" 0
|
||||
|
||||
# Shell optimization - Universal
|
||||
Write-Info "`n[10] Shell Launch Optimization"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" "Shell" "explorer.exe" "String"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "DelayedDesktopSwitchTimeout" 0
|
||||
|
||||
# Welcome experience - Universal
|
||||
Write-Info "`n[11] Welcome Experience Suppression"
|
||||
$contentDel = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
||||
Set-RegValue $contentDel "SubscribedContent-310093Enabled" 0
|
||||
Set-RegValue $contentDel "SubscribedContent-338389Enabled" 0
|
||||
|
||||
# User profile engagement - Universal
|
||||
Write-Info "`n[12] User Profile Engagement"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\UserProfileEngagement" "ScoobeSystemSettingEnabled" 0
|
||||
|
||||
#endregion
|
||||
|
||||
#region PER-USER SETTINGS - UNIVERSAL KEYS
|
||||
|
||||
Write-Info "`n=== PER-USER SETTINGS (All Users) ===`n"
|
||||
|
||||
foreach ($sid in $allSIDs) {
|
||||
$displayName = if ($sid -eq ".DEFAULT") { "Default User Profile" }
|
||||
elseif ($sid -like "TEMP_*") { "Temp: $(($sid -split '_')[1].Substring(0,8))..." }
|
||||
else { $sid.Substring(0,20) + "..." }
|
||||
|
||||
Write-Info "Configuring: $displayName"
|
||||
|
||||
$userRoot = "HKU:\$sid"
|
||||
|
||||
# Visual Effects - "Adjust for best performance" - Universal
|
||||
Set-RegValue "$userRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" "VisualFXSetting" 2 -Suppress
|
||||
|
||||
# Desktop settings - Universal
|
||||
$desktop = "$userRoot\Control Panel\Desktop"
|
||||
Set-RegValue $desktop "DragFullWindows" 0 "String" -Suppress
|
||||
Set-RegValue $desktop "FontSmoothing" 2 "String" -Suppress
|
||||
Set-RegValue $desktop "UserPreferencesMask" ([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00)) "Binary" -Suppress
|
||||
|
||||
# Window animations - Universal
|
||||
Set-RegValue "$userRoot\Control Panel\Desktop\WindowMetrics" "MinAnimate" 0 "String" -Suppress
|
||||
|
||||
# Explorer animations - Universal
|
||||
$explorerAdv = "$userRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-RegValue $explorerAdv "TaskbarAnimations" 0 -Suppress
|
||||
Set-RegValue $explorerAdv "DisablePreviewDesktop" 1 -Suppress
|
||||
Set-RegValue $explorerAdv "ListviewAlphaSelect" 0 -Suppress
|
||||
Set-RegValue $explorerAdv "ListviewShadow" 0 -Suppress
|
||||
Set-RegValue $explorerAdv "TaskbarSmallIcons" 1 -Suppress
|
||||
|
||||
# Content Delivery - Universal
|
||||
$userCDM = "$userRoot\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
||||
Set-RegValue $userCDM "SubscribedContent-310093Enabled" 0 -Suppress
|
||||
Set-RegValue $userCDM "SubscribedContent-338389Enabled" 0 -Suppress
|
||||
Set-RegValue $userCDM "SystemPaneSuggestionsEnabled" 0 -Suppress
|
||||
|
||||
# Disable animations in accessibility settings - Universal
|
||||
Set-RegValue "$userRoot\Control Panel\Accessibility\StickyKeys" "Flags" 506 "String" -Suppress
|
||||
|
||||
# Disable Aero Shake - Universal
|
||||
Set-RegValue $explorerAdv "DisallowShaking" 1 -Suppress
|
||||
|
||||
Write-Success " [✓] Configured $displayName"
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ADDITIONAL UNIVERSAL OPTIMIZATIONS
|
||||
|
||||
Write-Info "`n=== ADDITIONAL OPTIMIZATIONS ===`n"
|
||||
|
||||
# Disable services that delay logon - Universal
|
||||
Write-Info "[13] Optimizing Services"
|
||||
$servicesToDisable = @{
|
||||
"DiagTrack" = "Connected User Experiences and Telemetry"
|
||||
"dmwappushservice" = "WAP Push Message Routing"
|
||||
"SysMain" = "Superfetch"
|
||||
"WSearch" = "Windows Search (Indexing)"
|
||||
"TabletInputService" = "Touch Keyboard and Handwriting"
|
||||
}
|
||||
|
||||
$disabledCount = 0
|
||||
foreach ($svc in $servicesToDisable.Keys) {
|
||||
try {
|
||||
$service = Get-Service -Name $svc -ErrorAction SilentlyContinue
|
||||
if ($service) {
|
||||
if ($service.Status -eq 'Running') {
|
||||
Stop-Service -Name $svc -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
Set-Service -Name $svc -StartupType Disabled -ErrorAction Stop
|
||||
Write-Success " [✓] Disabled: $($servicesToDisable[$svc])"
|
||||
$disabledCount++
|
||||
}
|
||||
} catch {
|
||||
# Service may not exist on all systems or may be protected
|
||||
}
|
||||
}
|
||||
if ($disabledCount -eq 0) {
|
||||
Write-Info " [i] No optional services found to disable"
|
||||
} else {
|
||||
Write-Success " [✓] Successfully disabled $disabledCount service(s)"
|
||||
}
|
||||
|
||||
# Boot configuration - Universal
|
||||
Write-Info "`n[14] Boot Configuration"
|
||||
try {
|
||||
bcdedit /set bootux disabled | Out-Null
|
||||
Write-Success " [✓] Disabled boot graphics"
|
||||
} catch {
|
||||
Write-Warning " Could not modify boot configuration"
|
||||
}
|
||||
|
||||
# Disable background apps - Universal
|
||||
Write-Info "`n[15] Background Apps"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" "LetAppsRunInBackground" 2
|
||||
|
||||
# Fast startup interference - Universal
|
||||
Write-Info "`n[16] Power Settings"
|
||||
Set-RegValue "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" "HiberbootEnabled" 0
|
||||
|
||||
# Network optimization - Universal
|
||||
Write-Info "`n[17] Network Logon Optimization"
|
||||
Set-RegValue "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" "DontDisplayNetworkSelectionUI" 1
|
||||
|
||||
#endregion
|
||||
|
||||
#region NEW USER PROFILE MONITORING
|
||||
|
||||
Write-Info "`n=== NEW USER PROFILE AUTO-CONFIGURATION ===`n"
|
||||
|
||||
# Create scheduled task to apply settings to newly created profiles
|
||||
Write-Info "[18] Setting up Auto-Configuration for New Users"
|
||||
|
||||
$taskName = "SuppressAnimationNewUsers"
|
||||
$taskPath = "\Microsoft\Windows\Shell\"
|
||||
|
||||
# Check if task already exists
|
||||
$existingTask = Get-ScheduledTask -TaskName $taskName -TaskPath $taskPath -ErrorAction SilentlyContinue
|
||||
|
||||
if ($existingTask) {
|
||||
Write-Info " Removing existing task..."
|
||||
Unregister-ScheduledTask -TaskName $taskName -TaskPath $taskPath -Confirm:$false -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# PowerShell script that will run for new users
|
||||
$newUserScript = @'
|
||||
$userRoot = "HKCU:"
|
||||
|
||||
# Silent execution - no output
|
||||
function Set-RegValue {
|
||||
param($Path, $Name, $Value, $Type = "DWord")
|
||||
try {
|
||||
if (-not (Test-Path $Path)) { New-Item -Path $Path -Force | Out-Null }
|
||||
New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $Type -Force | Out-Null
|
||||
} catch {}
|
||||
}
|
||||
|
||||
# Apply all animation suppression settings
|
||||
Set-RegValue "$userRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" "VisualFXSetting" 2
|
||||
Set-RegValue "$userRoot\Control Panel\Desktop" "DragFullWindows" 0 "String"
|
||||
Set-RegValue "$userRoot\Control Panel\Desktop" "FontSmoothing" 2 "String"
|
||||
Set-RegValue "$userRoot\Control Panel\Desktop" "UserPreferencesMask" ([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00)) "Binary"
|
||||
Set-RegValue "$userRoot\Control Panel\Desktop\WindowMetrics" "MinAnimate" 0 "String"
|
||||
|
||||
$explorerAdv = "$userRoot\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
Set-RegValue $explorerAdv "TaskbarAnimations" 0
|
||||
Set-RegValue $explorerAdv "DisablePreviewDesktop" 1
|
||||
Set-RegValue $explorerAdv "ListviewAlphaSelect" 0
|
||||
Set-RegValue $explorerAdv "ListviewShadow" 0
|
||||
Set-RegValue $explorerAdv "TaskbarSmallIcons" 1
|
||||
Set-RegValue $explorerAdv "DisallowShaking" 1
|
||||
|
||||
$userCDM = "$userRoot\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
||||
Set-RegValue $userCDM "SubscribedContent-310093Enabled" 0
|
||||
Set-RegValue $userCDM "SubscribedContent-338389Enabled" 0
|
||||
Set-RegValue $userCDM "SystemPaneSuggestionsEnabled" 0
|
||||
|
||||
Set-RegValue "$userRoot\Control Panel\Accessibility\StickyKeys" "Flags" 506 "String"
|
||||
'@
|
||||
|
||||
# Save script to protected location
|
||||
$scriptPath = "$env:ProgramData\AnimationSuppress\ApplyNewUserSettings.ps1"
|
||||
$scriptDir = Split-Path $scriptPath -Parent
|
||||
|
||||
if (-not (Test-Path $scriptDir)) {
|
||||
New-Item -Path $scriptDir -ItemType Directory -Force | Out-Null
|
||||
}
|
||||
|
||||
$newUserScript | Out-File -FilePath $scriptPath -Encoding UTF8 -Force
|
||||
|
||||
# Set restrictive permissions on the script
|
||||
$acl = Get-Acl $scriptPath
|
||||
$acl.SetAccessRuleProtection($true, $false)
|
||||
$adminRule = New-Object System.Security.AccessControl.FileSystemAccessRule("BUILTIN\Administrators", "FullControl", "Allow")
|
||||
$systemRule = New-Object System.Security.AccessControl.FileSystemAccessRule("NT AUTHORITY\SYSTEM", "FullControl", "Allow")
|
||||
$acl.SetAccessRule($adminRule)
|
||||
$acl.SetAccessRule($systemRule)
|
||||
Set-Acl $scriptPath $acl
|
||||
|
||||
# Create scheduled task that runs at user logon
|
||||
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File `"$scriptPath`""
|
||||
$trigger = New-ScheduledTaskTrigger -AtLogOn
|
||||
$principal = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Users" -RunLevel Limited
|
||||
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Minutes 2)
|
||||
|
||||
try {
|
||||
Register-ScheduledTask -TaskName $taskName -TaskPath $taskPath -Action $action -Trigger $trigger -Principal $principal -Settings $settings -Force | Out-Null
|
||||
Write-Success " [✓] Auto-configuration task created"
|
||||
Write-Success " [✓] New users will automatically have animations suppressed"
|
||||
} catch {
|
||||
Write-Warning " [!] Could not create scheduled task: $($_.Exception.Message)"
|
||||
Write-Warning " [!] New users may need manual configuration"
|
||||
}
|
||||
|
||||
# Also set up CopyProfile for new users
|
||||
Write-Info "`n[19] Configuring Default User Profile Template"
|
||||
|
||||
# Ensure .DEFAULT hive has all settings
|
||||
$defaultSettings = @(
|
||||
@{Path="HKU:\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects"; Name="VisualFXSetting"; Value=2},
|
||||
@{Path="HKU:\.DEFAULT\Control Panel\Desktop"; Name="UserPreferencesMask"; Value=([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00)); Type="Binary"},
|
||||
@{Path="HKU:\.DEFAULT\Control Panel\Desktop\WindowMetrics"; Name="MinAnimate"; Value=0; Type="String"},
|
||||
@{Path="HKU:\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"; Name="TaskbarAnimations"; Value=0},
|
||||
@{Path="HKU:\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"; Name="SubscribedContent-310093Enabled"; Value=0}
|
||||
)
|
||||
|
||||
$defaultCount = 0
|
||||
foreach ($setting in $defaultSettings) {
|
||||
$params = @{
|
||||
Path = $setting.Path
|
||||
Name = $setting.Name
|
||||
Value = $setting.Value
|
||||
Suppress = $true
|
||||
}
|
||||
if ($setting.Type) { $params.Type = $setting.Type }
|
||||
|
||||
if (Set-RegValue @params) { $defaultCount++ }
|
||||
}
|
||||
Write-Success " [✓] Default profile template configured ($defaultCount settings)"
|
||||
|
||||
# Set system default for user profile creation
|
||||
Set-RegValue "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" "UseProfilePathExtensionVersion" 1 -Suppress
|
||||
|
||||
#endregion
|
||||
|
||||
# Unload temporary hives
|
||||
Write-Info "`nCleaning up temporary registry hives..."
|
||||
foreach ($hive in $loadedHives) {
|
||||
try {
|
||||
[gc]::Collect()
|
||||
Start-Sleep -Milliseconds 500
|
||||
reg unload "HKU\$hive" 2>&1 | Out-Null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Success " Unloaded: $hive"
|
||||
}
|
||||
} catch {
|
||||
Write-Warning " $hive will unload on reboot"
|
||||
}
|
||||
}
|
||||
|
||||
# Summary
|
||||
Write-Info "`n" + "="*70
|
||||
Write-Success "`n✓ UNIVERSAL SUPPRESSION COMPLETE!"
|
||||
Write-Info "="*70
|
||||
|
||||
Write-Host "`n📋 CONFIGURATION SUMMARY:" -ForegroundColor Cyan
|
||||
Write-Host " ✓ ALL registry keys are edition-agnostic"
|
||||
Write-Host " ✓ Works identically on: Home, Pro, Enterprise, Education, IoT"
|
||||
Write-Host " ✓ System-wide suppression: Applied"
|
||||
Write-Host " ✓ User profiles configured: $($allSIDs.Count)"
|
||||
Write-Host " ✓ Boot optimization: Applied"
|
||||
Write-Host " ✓ Services optimized: $disabledCount"
|
||||
Write-Host " ✓ New user auto-configuration: Active"
|
||||
Write-Host " ✓ Default profile template: Configured"
|
||||
|
||||
Write-Host "`n💡 WHAT TO EXPECT:" -ForegroundColor Green
|
||||
Write-Host " • No profile picture animation"
|
||||
Write-Host " • No username display animation"
|
||||
Write-Host " • No 'Welcome', 'Hi', or status messages"
|
||||
Write-Host " • Minimal/no spinning wheel"
|
||||
Write-Host " • Direct boot to desktop shell"
|
||||
Write-Host " • New users automatically configured"
|
||||
|
||||
Write-Warning "`n⚠️ IMPORTANT NOTES:"
|
||||
Write-Host " • Extremely fast SSDs may show brief (<100ms) wheel flash"
|
||||
Write-Host " • This is GPU/kernel handoff timing, not a configuration issue"
|
||||
Write-Host " • All user-controllable animations are suppressed"
|
||||
Write-Host " • New profiles created after this script will be auto-configured"
|
||||
Write-Host " • Scheduled task runs at each user logon (low overhead)"
|
||||
Write-Host " • Restart required for full effect"
|
||||
|
||||
Write-Success "`n✅ TESTED ON:"
|
||||
Write-Host " • Windows 10 Home, Pro, Enterprise (1809+)"
|
||||
Write-Host " • Windows 11 Home, Pro, Enterprise (21H2+)"
|
||||
|
||||
Write-Info "`n" + "="*70
|
||||
|
||||
$restart = Read-Host "`nRestart computer now to apply changes? (Y/N)"
|
||||
if ($restart -eq 'Y') {
|
||||
Write-Info "Restarting in 10 seconds... (Ctrl+C to cancel)"
|
||||
Start-Sleep -Seconds 10
|
||||
Restart-Computer -Force
|
||||
} else {
|
||||
Write-Warning "`nRestart your computer manually for all changes to take effect."
|
||||
Write-Info "You can re-run this script anytime - it's safe to execute multiple times.`n"
|
||||
}
|
||||
Binary file not shown.
105
exe/buildexe.bat
105
exe/buildexe.bat
@@ -1,105 +0,0 @@
|
||||
#ifndef UNICODE
|
||||
#define UNICODE
|
||||
#endif
|
||||
#ifndef _UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <shellapi.h> // Needed for CommandLineToArgvW
|
||||
|
||||
// --- Configuration ---
|
||||
const wchar_t WINDOW_TITLE[] = L"---BlackOverlayScreen---";
|
||||
const wchar_t CLASS_NAME[] = L"BlackOverlayClass";
|
||||
// --- End Configuration ---
|
||||
|
||||
// Forward declaration for wWinMain if WinMain calls it
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow);
|
||||
|
||||
// ADDED ANSI WinMain entry point wrapper
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
|
||||
// Get command line arguments as Unicode
|
||||
int argc;
|
||||
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
if (argv == NULL) {
|
||||
// Handle error if needed, perhaps return a failure code
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Call the Unicode wWinMain function
|
||||
// Note: We don't directly use lpCmdLine here, relying on GetCommandLineW instead.
|
||||
// We also pass the original hInstance and nCmdShow. hPrevInstance is obsolete.
|
||||
int result = wWinMain(hInstance, hPrevInstance, NULL, nCmdShow); // Pass NULL for pwCmdLine as wWinMain doesn't use it
|
||||
|
||||
// Free the memory allocated by CommandLineToArgvW
|
||||
LocalFree(argv);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Window Procedure (remains the same)
|
||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
switch (uMsg) {
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
return 0;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return 1;
|
||||
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint(hwnd, &ps);
|
||||
FillRect(hdc, &ps.rcPaint, (HBRUSH)GetStockObject(BLACK_BRUSH));
|
||||
EndPaint(hwnd, &ps);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
// Existing UNICODE wWinMain entry point (remains mostly the same)
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow) {
|
||||
// NOTE: We ignore hPrevInstance and pCmdLine parameters as they are handled/obsolete
|
||||
|
||||
// 1. Register the window class.
|
||||
WNDCLASS wc = { };
|
||||
wc.lpfnWndProc = WndProc;
|
||||
wc.hInstance = hInstance;
|
||||
wc.lpszClassName = CLASS_NAME;
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
|
||||
if (!RegisterClass(&wc)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 2. Get screen dimensions for maximization
|
||||
int screenWidth = GetSystemMetrics(SM_CXSCREEN);
|
||||
int screenHeight = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
// 3. Create the window.
|
||||
HWND hwnd = CreateWindowEx(
|
||||
WS_EX_TOPMOST,
|
||||
CLASS_NAME,
|
||||
WINDOW_TITLE,
|
||||
WS_POPUP | WS_VISIBLE,
|
||||
0, 0, screenWidth, screenHeight,
|
||||
NULL, NULL, hInstance, NULL
|
||||
);
|
||||
|
||||
if (hwnd == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 4. Run the message loop.
|
||||
MSG msg = { };
|
||||
while (GetMessage(&msg, NULL, 0, 0) > 0) {
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
:: ==========================================================================
|
||||
:: Script to Install C++ Build Dependencies (MinGW-w64 via Chocolatey)
|
||||
:: Requires Administrator privileges and Internet connection.
|
||||
:: Handles potential non-fatal warnings from choco install for mingw.
|
||||
:: ==========================================================================
|
||||
|
||||
:: Check for Admin privileges
|
||||
echo Checking for administrative privileges...
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo ERROR: This script requires administrative privileges.
|
||||
echo Please right-click and select "Run as administrator".
|
||||
pause
|
||||
goto :EOF
|
||||
) else (
|
||||
echo Running with administrative privileges.
|
||||
)
|
||||
echo.
|
||||
|
||||
:: Define Variables
|
||||
SET "CHOCO_INSTALL_CMD=Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
|
||||
SET "MINGW_PACKAGE=mingw"
|
||||
SET "INSTALL_ATTEMPTED=0"
|
||||
|
||||
:: --- Step 1: Check/Install Chocolatey ---
|
||||
echo Checking for Chocolatey installation...
|
||||
choco -? >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo Chocolatey not found. Attempting to install...
|
||||
echo This requires PowerShell and an internet connection.
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "%CHOCO_INSTALL_CMD%"
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: Chocolatey installation failed. Please check your internet connection
|
||||
echo and PowerShell execution policy settings. Manual installation may be required.
|
||||
echo Visit https://chocolatey.org/install for instructions.
|
||||
pause
|
||||
goto :EOF
|
||||
) ELSE (
|
||||
echo Chocolatey installation appears successful.
|
||||
echo NOTE: You might need to open a NEW command prompt for choco to be fully available in PATH.
|
||||
echo Running 'refreshenv' command now to attempt immediate PATH refresh...
|
||||
refreshenv
|
||||
REM Small delay to allow environment refresh
|
||||
timeout /t 3 /nobreak >nul
|
||||
)
|
||||
) ELSE (
|
||||
echo Chocolatey is already installed.
|
||||
)
|
||||
echo.
|
||||
|
||||
:: Verify Choco again after potential install/refresh
|
||||
choco -? >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: Chocolatey command is still not available after installation attempt.
|
||||
echo Please open a new Administrator command prompt and try running this script again,
|
||||
echo or install MinGW manually.
|
||||
pause
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
:: --- Step 2: Check/Install MinGW-w64 ---
|
||||
echo Checking if '%MINGW_PACKAGE%' package is installed via Chocolatey...
|
||||
choco list --local-only --exact "%MINGW_PACKAGE%" | findstr /B /C:"%MINGW_PACKAGE%" >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo '%MINGW_PACKAGE%' package not found or check failed. Attempting to install/ensure...
|
||||
SET "INSTALL_ATTEMPTED=1"
|
||||
choco install %MINGW_PACKAGE% --yes --force --no-progress
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo WARNING: 'choco install %MINGW_PACKAGE%' finished with a non-zero exit code.
|
||||
echo This might be due to non-fatal warnings (like missing old paths).
|
||||
echo Continuing to verification step, but check output above carefully.
|
||||
REM Do not exit here, let the g++ check be the final arbiter
|
||||
) ELSE (
|
||||
echo 'choco install %MINGW_PACKAGE%' command completed successfully (Exit Code 0).
|
||||
)
|
||||
echo Running 'refreshenv' command to attempt PATH update...
|
||||
refreshenv
|
||||
REM Small delay to allow environment refresh
|
||||
timeout /t 3 /nobreak >nul
|
||||
) ELSE (
|
||||
echo '%MINGW_PACKAGE%' package appears to be already installed.
|
||||
)
|
||||
echo.
|
||||
|
||||
:: --- Step 3: Verify g++ availability ---
|
||||
echo Verifying g++ command availability...
|
||||
where g++ >nul 2>&1
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo ERROR: 'g++' command was not found in the current PATH even after installation attempt/check.
|
||||
IF "!INSTALL_ATTEMPTED!"=="1" (
|
||||
echo Possible causes:
|
||||
echo - The 'mingw' package installation truly failed despite reporting success internally. Check logs.
|
||||
echo - The PATH environment variable hasn't updated in this session yet.
|
||||
) ELSE (
|
||||
echo Possible cause: The PATH environment variable hasn't updated in this session yet.
|
||||
)
|
||||
echo.
|
||||
echo IMPORTANT: Please CLOSE this window and open a NEW Administrator
|
||||
echo command prompt. Then try running the build script.
|
||||
pause
|
||||
goto :EOF
|
||||
) ELSE (
|
||||
echo Verification successful: 'g++' command found in PATH:
|
||||
where g++
|
||||
echo.
|
||||
echo ==========================================================================
|
||||
echo Build Dependency Installation/Verification Complete!
|
||||
echo ==========================================================================
|
||||
echo MinGW-w64 (containing g++) should be ready.
|
||||
IF "!INSTALL_ATTEMPTED!"=="1" (
|
||||
echo NOTE: If the build script still fails, ensure you run it from a NEW command prompt.
|
||||
)
|
||||
echo.
|
||||
)
|
||||
|
||||
pause
|
||||
ENDLOCAL
|
||||
goto :EOF
|
||||
@@ -1,112 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
REM Set Playnite as the default shell
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_PATH=%PLAYNITE_FOLDER%\Playnite.FullscreenApp.exe --hidesplashscreen"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
|
||||
echo Defining script names and paths
|
||||
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=%SystemRoot%\explorer.exe"
|
||||
|
||||
SET "DISABLE_LOGON_UI_BAT=SetDisableLogonUI.bat"
|
||||
SET "DISABLE_LOGON_UI_BAT_PATH=%PLAYNITE_FOLDER%\%DISABLE_LOGON_UI_BAT%"
|
||||
|
||||
SET "VBS_DISABLE_LOGON_UI=SetDisableLogonUI.vbs"
|
||||
SET "VBS_DISABLE_LOGON_UI_PATH=%PLAYNITE_FOLDER%\%VBS_DISABLE_LOGON_UI%"
|
||||
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
|
||||
REM Ensure the Playnite folder exists
|
||||
IF NOT EXIST "%PLAYNITE_FOLDER%" (
|
||||
MKDIR "%PLAYNITE_FOLDER%"
|
||||
)
|
||||
|
||||
echo Creating SetDisableLogonUI.bat script
|
||||
|
||||
(
|
||||
echo @echo off
|
||||
echo reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" ^
|
||||
/v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
echo rem Clean up
|
||||
echo del "%DISABLE_LOGON_UI_BAT_PATH%"
|
||||
echo del "%VBS_DISABLE_LOGON_UI_PATH%"
|
||||
) > "%DISABLE_LOGON_UI_BAT_PATH%"
|
||||
|
||||
echo Creating SetDisableLogonUI.vbs script
|
||||
|
||||
(
|
||||
echo Set WshShell = CreateObject("WScript.Shell")
|
||||
echo WshShell.Run chr(34^) ^& "%DISABLE_LOGON_UI_BAT_PATH%" ^& chr(34^), 0, True
|
||||
echo Set WshShell = Nothing
|
||||
) > "%VBS_DISABLE_LOGON_UI_PATH%"
|
||||
|
||||
echo Creating scheduled task to set DisableLogonUI at startup
|
||||
|
||||
schtasks /create /tn "SetDisableLogonUI" /sc onstart /rl highest /ru SYSTEM ^
|
||||
/tr "wscript.exe \"%VBS_DISABLE_LOGON_UI_PATH%\"" /f
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo rem Set Shell back to Explorer
|
||||
echo REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
echo start "" "%EXPLORER_PATH%"
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
echo rem Set Shell back to Playnite
|
||||
echo REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
(
|
||||
echo Set WshShell = CreateObject("WScript.Shell")
|
||||
echo WshShell.Run chr(34^) ^& "%SCRIPT_PATH%" ^& chr(34^), 0, True
|
||||
echo Set WshShell = Nothing
|
||||
) > "%VBS_PATH%"
|
||||
|
||||
echo Creating scheduled task to run DelayedExplorerStart.bat at logon
|
||||
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /sc onlogon /rl highest ^
|
||||
/tr "wscript.exe \"%VBS_PATH%\"" /f
|
||||
|
||||
echo Applying system optimizations
|
||||
|
||||
REM Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
REM Disable Logon UI (already being set via startup script)
|
||||
REM reg add "%KEY_NAME%" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Enabling AutoAdminLogon
|
||||
reg add "%KEY_NAME%" /v AutoAdminLogon /t REG_SZ /d "1" /f
|
||||
reg add "%KEY_NAME%" /v DefaultUserName /t REG_SZ /d "%USERNAME%" /f
|
||||
reg add "%KEY_NAME%" /v DefaultPassword /t REG_SZ /d "" /f
|
||||
|
||||
echo Disabling Automatic Restart Sign-On
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" ^
|
||||
/v DisableAutomaticRestartSignOn /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Additional optimizations can be added here
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Playnite set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,144 +0,0 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Log file
|
||||
set log_file=%~dp0modify_winlogon.log
|
||||
set compile_log=%~dp0compile.log
|
||||
|
||||
echo Script started at %date% %time% > %log_file%
|
||||
|
||||
:: Ensure running as administrator
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo This script must be run as administrator! >> %log_file%
|
||||
echo This script must be run as administrator!
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Paths and filenames
|
||||
set exe_name=CustomLogonUI.exe
|
||||
set cpp_code=CustomLogonUI.cpp
|
||||
set src_path=%~dp0
|
||||
set dst_path=C:\Windows\System32
|
||||
set backup_logonui=logonui_backup.exe
|
||||
set temp_dir=C:\Temp
|
||||
set installer=%temp_dir%\vs_buildtools.exe
|
||||
|
||||
:: Step 1: Ensure Temp Directory Exists and has Correct Permissions
|
||||
echo Ensuring temp directory exists and has correct permissions... >> %log_file%
|
||||
if not exist "%temp_dir%" (
|
||||
mkdir "%temp_dir%"
|
||||
)
|
||||
icacls "%temp_dir%" /grant Everyone:(F) >> %log_file% 2>&1
|
||||
echo Temp directory permissions set. >> %log_file%
|
||||
|
||||
:: Step 4: Install Windows SDK
|
||||
echo Downloading Windows SDK... >> %log_file%
|
||||
echo Downloading Windows SDK...
|
||||
powershell -command "Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/?linkid=2120843' -OutFile '%sdk_installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Windows SDK installer. >> %log_file%
|
||||
echo Failed to download Windows SDK installer.
|
||||
exit /b
|
||||
)
|
||||
echo Windows SDK installer downloaded successfully. >> %log_file%
|
||||
echo Windows SDK installer downloaded successfully.
|
||||
|
||||
echo Installing Windows SDK... >> %log_file%
|
||||
echo Installing Windows SDK...
|
||||
start /wait "" "%sdk_installer%" /Quiet /NoRestart /Features + /InstallPath "%ProgramFiles%\Windows Kits\10" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Windows SDK. >> %log_file%
|
||||
echo Failed to install Windows SDK.
|
||||
exit /b
|
||||
)
|
||||
echo Windows SDK installed successfully. >> %log_file%
|
||||
echo Windows SDK installed successfully.
|
||||
|
||||
@echo off
|
||||
|
||||
:: Install Visual C++ Redist
|
||||
echo Downloading Visual C++ Redistributable installers...
|
||||
|
||||
:: Create a temporary directory to store the installers
|
||||
set "TMP_DIR=%TEMP%\vcredist_installers"
|
||||
mkdir "%TMP_DIR%"
|
||||
|
||||
:: Download the latest Visual C++ Redistributable installers
|
||||
bitsadmin /transfer "VC2015-2022 x64" https://aka.ms/vs/17/release/vc_redist.x64.exe "%TMP_DIR%\VC_redist.x64.exe"
|
||||
bitsadmin /transfer "VC2015-2022 x86" https://aka.ms/vs/17/release/vc_redist.x86.exe "%TMP_DIR%\VC_redist.x86.exe"
|
||||
|
||||
echo Installing Visual C++ Redistributable packages...
|
||||
|
||||
:: Install Visual C++ 2015-2022 Redistributable
|
||||
start /wait "%TMP_DIR%\VC_redist.x64.exe" /install /quiet /norestart
|
||||
start /wait "%TMP_DIR%\VC_redist.x86.exe" /install /quiet /norestart
|
||||
|
||||
echo Visual C++ Redistributable packages installed successfully!
|
||||
|
||||
:: Clean up the temporary directory
|
||||
rmdir /s /q "%TMP_DIR%"
|
||||
|
||||
pause
|
||||
|
||||
:: Step 6: Download and Install Visual Studio Community Edition
|
||||
echo Downloading Visual Studio Community Edition... >> %log_file%
|
||||
echo Downloading Visual Studio Community Edition...
|
||||
powershell -command "Invoke-WebRequest -Uri 'https://aka.ms/vs/16/release/vs_community.exe' -OutFile '%vs_community_installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Visual Studio Community installer. >> %log_file%
|
||||
echo Failed to download Visual Studio Community installer.
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Community installer downloaded successfully. >> %log_file%
|
||||
echo Visual Studio Community installer downloaded successfully.
|
||||
|
||||
echo Installing Visual Studio Community Edition... >> %log_file%
|
||||
echo Installing Visual Studio Community Edition...
|
||||
start /wait "" "%vs_community_installer%" --add Microsoft.VisualStudio.Workload.CoreEditor --includeRecommended --passive --norestart --log %vs_install_log% --loglevel verbose
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Visual Studio Community. Check the install log for details: %vs_install_log% >> %log_file%
|
||||
echo Failed to install Visual Studio Community. Check the install log for details: %vs_install_log%
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Community installed successfully. >> %log_file%
|
||||
echo Visual Studio Community installed successfully.
|
||||
|
||||
:: Step 2: Install .NET Framework 4.8 (NetFx4-AdvSrvs)
|
||||
echo Installing .NET Framework 4.8 (NetFx4-AdvSrvs)... >> %log_file%
|
||||
echo Installing .NET Framework 4.8 (NetFx4-AdvSrvs)...
|
||||
dism /online /enable-feature /featurename:NetFx4-AdvSrvs /All /NoRestart >> %log_file% 2>&1
|
||||
echo DISM command exit code: %errorlevel% >> %log_file%
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install .NET Framework 4.8 (NetFx4-AdvSrvs). >> %log_file%
|
||||
echo Failed to install .NET Framework 4.8 (NetFx4-AdvSrvs). Check the log for details: %log_file%
|
||||
exit /b
|
||||
)
|
||||
echo .NET Framework 4.8 (NetFx4-AdvSrvs) installed successfully. >> %log_file%
|
||||
echo .NET Framework 4.8 (NetFx4-AdvSrvs) installed successfully.
|
||||
|
||||
:: Step 3: Check for Visual Studio Build Tools
|
||||
echo Checking for Visual Studio Build Tools... >> %log_file%
|
||||
reg query "HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Visual Studio Build Tools not found. Downloading... >> %log_file%
|
||||
powershell -command "Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile %installer%" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Visual Studio Build Tools installer. >> %log_file%
|
||||
echo Failed to download Visual Studio Build Tools installer.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Running Visual Studio Build Tools installer... >> %log_file%
|
||||
start /wait "" "%installer%" --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --passive --norestart >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Visual Studio Build Tools. >> %log_file%
|
||||
echo Failed to install Visual Studio Build Tools.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Build Tools installed successfully. >> %log_file%
|
||||
) else (
|
||||
echo Visual Studio Build Tools are already installed. >> %log_file%
|
||||
)
|
||||
@@ -1,27 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
:: Define Steam folder path
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
|
||||
:: Check if Steam is installed
|
||||
IF NOT EXIST "%STEAM_FOLDER%\Steam.exe" (
|
||||
echo Steam is not installed. Downloading and installing Steam...
|
||||
|
||||
:: Define download URL
|
||||
SET "STEAM_INSTALLER_URL=https://steamcdn-a.akamaihd.net/client/installer/SteamSetup.exe"
|
||||
|
||||
:: Download Steam installer
|
||||
echo Downloading Steam installer...
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $url='https://steamcdn-a.akamaihd.net/client/installer/SteamSetup.exe'; $path='%TEMP%\SteamSetup.exe'; Invoke-WebRequest $url -OutFile $path; Start-Process -FilePath $path -ArgumentList '/S' -Wait"
|
||||
|
||||
:: Check if Steam was installed
|
||||
IF NOT EXIST "%STEAM_FOLDER%\Steam.exe" (
|
||||
echo Steam installation failed. Please install Steam manually.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
echo Steam installed successfully!
|
||||
pause
|
||||
@@ -1,68 +0,0 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Log file
|
||||
set log_file=%~dp0modify_winlogon.log
|
||||
set compile_log=%~dp0compile.log
|
||||
set temp_dir=C:\Temp
|
||||
set vs_install_log=%temp_dir%\vs_buildtools_install.log
|
||||
set vs_community_installer=%temp_dir%\vs_community.exe
|
||||
|
||||
echo Script started at %date% %time% > %log_file%
|
||||
echo Script started at %date% %time%
|
||||
|
||||
:: Ensure running as administrator
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo This script must be run as administrator! >> %log_file%
|
||||
echo This script must be run as administrator!
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Paths and filenames
|
||||
set exe_name=CustomLogonUI.exe
|
||||
set cpp_code=CustomLogonUI.cpp
|
||||
set src_path=%~dp0
|
||||
set dst_path=C:\Windows\System32
|
||||
set backup_logonui=logonui_backup.exe
|
||||
set installer=%temp_dir%\vs_buildtools.exe
|
||||
|
||||
:: Step 1: Ensure Temp Directory Exists and has Correct Permissions
|
||||
echo Ensuring temp directory exists and has correct permissions... >> %log_file%
|
||||
echo Ensuring temp directory exists and has correct permissions...
|
||||
if not exist "%temp_dir%" (
|
||||
mkdir "%temp_dir%"
|
||||
)
|
||||
icacls "%temp_dir%" /grant Everyone:(F) >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to set permissions for the temp directory. >> %log_file%
|
||||
echo Failed to set permissions for the temp directory.
|
||||
exit /b
|
||||
)
|
||||
echo Temp directory permissions set. >> %log_file%
|
||||
echo Temp directory permissions set.
|
||||
|
||||
|
||||
|
||||
:: Step 6: Download and Install Visual Studio Community Edition
|
||||
echo Downloading Visual Studio Community Edition... >> %log_file%
|
||||
echo Downloading Visual Studio Community Edition...
|
||||
powershell -command "Invoke-WebRequest -Uri 'https://aka.ms/vs/16/release/vs_community.exe' -OutFile '%vs_community_installer%'" >> %log_file% 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to download Visual Studio Community installer. >> %log_file%
|
||||
echo Failed to download Visual Studio Community installer.
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Community installer downloaded successfully. >> %log_file%
|
||||
echo Visual Studio Community installer downloaded successfully.
|
||||
|
||||
echo Installing Visual Studio Community Edition... >> %log_file%
|
||||
echo Installing Visual Studio Community Edition...
|
||||
start /wait "" "%vs_community_installer%" --add Microsoft.VisualStudio.Workload.CoreEditor --includeRecommended --passive --norestart --log %vs_install_log% --loglevel verbose
|
||||
if %errorlevel% neq 0 (
|
||||
echo Failed to install Visual Studio Community. Check the install log for details: %vs_install_log% >> %log_file%
|
||||
echo Failed to install Visual Studio Community. Check the install log for details: %vs_install_log%
|
||||
exit /b
|
||||
)
|
||||
echo Visual Studio Community installed successfully. >> %log_file%
|
||||
echo Visual Studio Community installed successfully.
|
||||
@@ -1,182 +0,0 @@
|
||||
:: Self-elevating Admin script
|
||||
:: This script will automatically request admin rights if not running as admin
|
||||
|
||||
rem Check for admin rights and self-elevate if needed
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else (
|
||||
goto GotAdmin
|
||||
)
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
"%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
|
||||
:GotAdmin
|
||||
if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
echo Running with administrative privileges...
|
||||
echo Setting Steam Big Picture as default shell
|
||||
|
||||
|
||||
echo Set Steam Big Picture as the default shell
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
|
||||
echo Define the default Steam folder path and script names
|
||||
SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
SET "STEAM_EXE=C:\Program Files (x86)\Steam\Steam.exe"
|
||||
SET "MANIFEST_PATH=%STEAM_EXE%.manifest"
|
||||
|
||||
echo Copying pre-created manifest file...
|
||||
copy "%~dp0steam.manifest" "%MANIFEST_PATH%" >nul 2>&1
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Steam folder
|
||||
(
|
||||
echo @echo off
|
||||
echo Check if user is logged on
|
||||
echo whoami ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
echo powershell -WindowStyle Hidden -NoProfile -Command "Start-Process explorer.exe"
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%STEAM_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%STEAM_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%" /ru "%USERNAME%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Steam folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
- echo Disable Logon UI
|
||||
-
|
||||
- reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
+ echo Checking for a blank password on %USERNAME%…
|
||||
+ net user %USERNAME% > "%temp%\uinfo.txt"
|
||||
+ findstr /R /C:"Password required *No" "%temp%\uinfo.txt" >nul
|
||||
+ if %ERRORLEVEL%==0 (
|
||||
+ echo → No password detected: disabling Logon UI (auto‐shell mode)
|
||||
+ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" `
|
||||
+ /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
+ ) else (
|
||||
+ echo → Password detected: re‑enabling Logon UI for secure logon
|
||||
+ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" `
|
||||
+ /v DisableLogonUI /t REG_DWORD /d 0 /f
|
||||
+ )
|
||||
+ del "%temp%\uinfo.txt"
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
@@ -1,176 +0,0 @@
|
||||
@echo off
|
||||
:: Self-elevating Admin script
|
||||
:: This script will automatically request admin rights if not running as admin
|
||||
|
||||
:: Check for admin rights and self-elevate if needed
|
||||
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
|
||||
if '%errorlevel%' NEQ '0' (
|
||||
echo Requesting administrative privileges...
|
||||
goto UACPrompt
|
||||
) else (
|
||||
goto GotAdmin
|
||||
)
|
||||
|
||||
:UACPrompt
|
||||
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
|
||||
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
|
||||
"%temp%\getadmin.vbs"
|
||||
exit /B
|
||||
|
||||
:GotAdmin
|
||||
if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
|
||||
pushd "%CD%"
|
||||
CD /D "%~dp0"
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
echo Set Playnite as the default shell
|
||||
SET "KEY_NAME=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
SET "PLAYNITE_FOLDER=%LOCALAPPDATA%\Playnite"
|
||||
SET "PLAYNITE_PATH=%LOCALAPPDATA%\Playnite\Playnite.FullscreenApp.exe"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
SET "SCRIPT_NAME=DelayedExplorerStart.bat"
|
||||
SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Playnite folder
|
||||
(
|
||||
echo @echo off
|
||||
echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%USERNAME%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
echo rem Set Shell back to Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo timeout /t 20 /nobreak ^>nul
|
||||
echo start "" "%EXPLORER_PATH%"
|
||||
echo timeout /t 10 /nobreak ^>nul
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
echo %VBS_PATH%
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
:: Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%"
|
||||
echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%VBS_PATH%"
|
||||
echo Set WshShell = Nothing >> "%VBS_PATH%"
|
||||
|
||||
echo Create XML file for the scheduled task
|
||||
SET XML_PATH=%PLAYNITE_FOLDER%\DelayedExplorerStartTask.xml
|
||||
|
||||
echo Delete the existing XML file if it exists
|
||||
IF EXIST "%XML_PATH%" DEL "%XML_PATH%"
|
||||
|
||||
(
|
||||
echo ^<?xml version="1.0" encoding="UTF-16"?^>
|
||||
echo ^<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"^>
|
||||
echo ^<RegistrationInfo^>
|
||||
echo ^<Date^>2020-01-01T00:00:00^</Date^>
|
||||
echo ^<Author^>"%USERNAME%"^</Author^>
|
||||
echo ^<Description^>Run DelayedExplorerStart.bat at logon.^</Description^>
|
||||
echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
echo ^<Principal id="Author"^>
|
||||
echo ^<UserId^>%USERNAME%</UserId^>
|
||||
echo ^<LogonType^>InteractiveToken^</LogonType^>
|
||||
echo ^<RunLevel^>HighestAvailable^</RunLevel^>
|
||||
echo ^</Principal^>
|
||||
echo ^</Principals^>
|
||||
echo ^<Settings^>
|
||||
echo ^<MultipleInstancesPolicy^>IgnoreNew^</MultipleInstancesPolicy^>
|
||||
echo ^<DisallowStartIfOnBatteries^>false^</DisallowStartIfOnBatteries^>
|
||||
echo ^<StopIfGoingOnBatteries^>false^</StopIfGoingOnBatteries^>
|
||||
echo ^<AllowHardTerminate^>true^</AllowHardTerminate^>
|
||||
echo ^<StartWhenAvailable^>true^</StartWhenAvailable^>
|
||||
echo ^<RunOnlyIfNetworkAvailable^>false^</RunOnlyIfNetworkAvailable^>
|
||||
echo ^<IdleSettings^>
|
||||
echo ^<StopOnIdleEnd^>true^</StopOnIdleEnd^>
|
||||
echo ^<RestartOnIdle^>false^</RestartOnIdle^>
|
||||
echo ^</IdleSettings^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Hidden^>false^</Hidden^>
|
||||
echo ^<WakeToRun^>false^</WakeToRun^>
|
||||
echo ^<ExecutionTimeLimit^>PT72H^</ExecutionTimeLimit^>
|
||||
echo ^<Priority^>7^</Priority^>
|
||||
echo ^</Settings^>
|
||||
echo ^<Actions Context="Author"^>
|
||||
echo ^<Exec^>
|
||||
echo ^<Command^>wscript.exe^</Command^>
|
||||
echo ^<Arguments^>"%VBS_PATH%"^</Arguments^>
|
||||
echo ^</Exec^>
|
||||
echo ^</Actions^>
|
||||
echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f /ru "%USERNAME%"
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%" /ru "%USERNAME%"
|
||||
|
||||
echo Delayed Explorer start script and VBScript created in Playnite folder.
|
||||
echo Scheduled Task added to run the script at logon.
|
||||
echo XML file for Scheduled Task created.
|
||||
|
||||
echo Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
- echo Disable Logon UI
|
||||
-
|
||||
- reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
+ echo Checking for a blank password on %USERNAME%…
|
||||
+ net user %USERNAME% > "%temp%\uinfo.txt"
|
||||
+ findstr /R /C:"Password required *No" "%temp%\uinfo.txt" >nul
|
||||
+ if %ERRORLEVEL%==0 (
|
||||
+ echo → No password detected: disabling Logon UI (auto‐shell mode)
|
||||
+ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" `
|
||||
+ /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
+ ) else (
|
||||
+ echo → Password detected: re‑enabling Logon UI for secure logon
|
||||
+ reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" `
|
||||
+ /v DisableLogonUI /t REG_DWORD /d 0 /f
|
||||
+ )
|
||||
+ del "%temp%\uinfo.txt"
|
||||
|
||||
echo Disable Visual Effects
|
||||
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v VisualEffects /t REG_DWORD /d 3 /f
|
||||
|
||||
echo Increase File System Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v NtfsDisableLastAccessUpdate /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Optimize Paging File Performance
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Disable Startup Delay
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /t REG_DWORD /d 0 /f
|
||||
|
||||
echo Improve Windows Explorer Process Priority
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\explorer.exe\PerfOptions" /v CpuPriorityClass /t REG_DWORD /d 3 /f
|
||||
echo Adjust Large System Cache
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v LargeSystemCache /t REG_DWORD /d 1 /f
|
||||
echo Enabling No GUI Boot
|
||||
bcdedit /set {current} quietboot on
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Playnite set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user