mirror of
https://github.com/jazir555/GamesDows.git
synced 2025-07-31 18:36:46 +02:00
Compare commits
112 Commits
v3
...
5fbc1a7289
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5fbc1a7289 | ||
![]() |
e336917efe | ||
![]() |
4cfff373ae | ||
![]() |
500dc18195 | ||
![]() |
6a61614fda | ||
![]() |
1f90ed4f37 | ||
![]() |
76b2da4f4a | ||
![]() |
3b6380fc57 | ||
![]() |
795cfbd882 | ||
![]() |
92279a8c5f | ||
![]() |
6e9011d6e1 | ||
![]() |
4f56f0b449 | ||
![]() |
e37ad764b0 | ||
![]() |
f3e0cf3cc2 | ||
![]() |
77afb2305d | ||
![]() |
ad942f7f03 | ||
![]() |
82ac91aa93 | ||
![]() |
2da8409230 | ||
![]() |
914a1ae8fb | ||
![]() |
917afd33f8 | ||
![]() |
a11955f8a9 | ||
![]() |
f4d69421c6 | ||
![]() |
2d36db3103 | ||
![]() |
d7cf5e95bc | ||
![]() |
cf4e3284da | ||
![]() |
97bbc26c2e | ||
![]() |
fca65f1a62 | ||
![]() |
875f667410 | ||
![]() |
3d58f278b7 | ||
![]() |
1de7f3c6e2 | ||
![]() |
8a16f59b56 | ||
![]() |
afd9656cdc | ||
![]() |
708eac735b | ||
![]() |
f245601338 | ||
![]() |
c23d3c88a6 | ||
![]() |
dc186e1204 | ||
![]() |
b3ef7114eb | ||
![]() |
c8d0ab3466 | ||
![]() |
8d62bc7ceb | ||
![]() |
67411c509f | ||
![]() |
cc16ee178e | ||
![]() |
37bce0d585 | ||
![]() |
c870f8a933 | ||
![]() |
45865b853e | ||
![]() |
d7b2aa4c49 | ||
![]() |
b18d42276e | ||
![]() |
c63185f418 | ||
![]() |
e2242d8284 | ||
![]() |
2291bdafa5 | ||
![]() |
c92d5746b9 | ||
![]() |
e31ea766b5 | ||
![]() |
f1b608d877 | ||
![]() |
662eb8c44b | ||
![]() |
abcd3c1291 | ||
![]() |
d2efec66ee | ||
![]() |
3c54357006 | ||
![]() |
68ad30c54f | ||
![]() |
0434362240 | ||
![]() |
7a4a865ce6 | ||
![]() |
bb4356bd78 | ||
![]() |
c39efe5acc | ||
![]() |
03cf4a7e19 | ||
![]() |
214f2ddd5f | ||
![]() |
a343a75727 | ||
![]() |
3c5fa4470d | ||
![]() |
066442d06b | ||
![]() |
49d03bbf40 | ||
![]() |
9c3d8d9873 | ||
![]() |
c6578858b4 | ||
![]() |
b1fadcb75c | ||
![]() |
21b4f88b73 | ||
![]() |
a9d823886a | ||
![]() |
78bfcaf6e8 | ||
![]() |
761f4f96ef | ||
![]() |
80d8e1b07f | ||
![]() |
dd5ffaaa12 | ||
![]() |
5e2176cc70 | ||
![]() |
178e7d764a | ||
![]() |
32a945108e | ||
![]() |
2206427fc0 | ||
![]() |
3530bd99d2 | ||
![]() |
29063d35a7 | ||
![]() |
53b847c5d6 | ||
![]() |
587344fdab | ||
![]() |
2b9537a3bf | ||
![]() |
7ae63de542 | ||
![]() |
363a5cc146 | ||
![]() |
3574869815 | ||
![]() |
dbf70ac5cc | ||
![]() |
de90b6b003 | ||
![]() |
5f0e56eb72 | ||
![]() |
9a595fe614 | ||
![]() |
78280a8c45 | ||
![]() |
90cff698cf | ||
![]() |
454b1ffc91 | ||
![]() |
109dc96d2b | ||
![]() |
8f96b0c52b | ||
![]() |
319aec8fc4 | ||
![]() |
600e1cce1d | ||
![]() |
83d13a66f6 | ||
![]() |
ebd529a9cc | ||
![]() |
87798b29c0 | ||
![]() |
22abf65260 | ||
![]() |
bcb5839474 | ||
![]() |
3296053603 | ||
![]() |
e298bafedf | ||
![]() |
8fef80a5eb | ||
![]() |
00e1dee1ce | ||
![]() |
c5b1597401 | ||
![]() |
8cda0e813f | ||
![]() |
3201aec7a0 | ||
![]() |
d045eec2ed |
BIN
BlackOverlay.exe
Normal file
BIN
BlackOverlay.exe
Normal file
Binary file not shown.
179
Disable Gamesdows V3 for the VBS as shell version.bat
Normal file
179
Disable Gamesdows V3 for the VBS as shell version.bat
Normal file
@@ -0,0 +1,179 @@
|
||||
@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
|
99
Disable Welcome UI new commands yet to test
Normal file
99
Disable Welcome UI new commands yet to test
Normal file
@@ -0,0 +1,99 @@
|
||||
@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
|
92
Disable Welcome UI reversion
Normal file
92
Disable Welcome UI reversion
Normal file
@@ -0,0 +1,92 @@
|
||||
@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
|
151
Enable GamesDows (functional on VMs).bat
Normal file
151
Enable GamesDows (functional on VMs).bat
Normal file
@@ -0,0 +1,151 @@
|
||||
@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 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
|
||||
|
||||
echo Registry modifications are complete.
|
||||
echo Steam Big Picture set as default shell.
|
||||
echo Automatic logon enabled.
|
||||
echo Boot UI disabled.
|
||||
|
||||
pause
|
||||
|
150
Enable GamesDows Original
Normal file
150
Enable GamesDows Original
Normal file
@@ -0,0 +1,150 @@
|
||||
@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
|
150
Enable GamesDows Playnite V3 Hidden Welcome UI new.bat
Normal file
150
Enable GamesDows Playnite V3 Hidden Welcome UI new.bat
Normal file
@@ -0,0 +1,150 @@
|
||||
@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
|
149
Enable GamesDows Playnite V3 no welcome ui.bat
Normal file
149
Enable GamesDows Playnite V3 no welcome ui.bat
Normal file
@@ -0,0 +1,149 @@
|
||||
@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
|
@@ -0,0 +1,234 @@
|
||||
@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
|
170
Enable GamesDows Steam V4 testing.bat
Normal file
170
Enable GamesDows Steam V4 testing.bat
Normal file
@@ -0,0 +1,170 @@
|
||||
@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
|
@@ -6,7 +6,7 @@ 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"
|
||||
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
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ 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 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
|
||||
@@ -56,7 +56,7 @@ 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 ^<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^>
|
||||
@@ -180,9 +180,6 @@ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Mem
|
||||
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.
|
192
Enable GamesDows V2
Normal file
192
Enable GamesDows V2
Normal file
@@ -0,0 +1,192 @@
|
||||
@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
|
231
Enable GamesDows v2 NEW OCT-12-2024.bat
Normal file
231
Enable GamesDows v2 NEW OCT-12-2024.bat
Normal file
@@ -0,0 +1,231 @@
|
||||
@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
|
169
GamesDows Prevent Steam from stealing focus
Normal file
169
GamesDows Prevent Steam from stealing focus
Normal file
@@ -0,0 +1,169 @@
|
||||
@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
|
0
Gamesdows no welcome screen.bat
Normal file
0
Gamesdows no welcome screen.bat
Normal file
44
Re-Enable Auto-Sign In.bat
Normal file
44
Re-Enable Auto-Sign In.bat
Normal file
@@ -0,0 +1,44 @@
|
||||
@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.
|
33
RevertAutomaticLogonSettings.bat
Normal file
33
RevertAutomaticLogonSettings.bat
Normal file
@@ -0,0 +1,33 @@
|
||||
@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.
|
94
Test commands for disabling welcome ui
Normal file
94
Test commands for disabling welcome ui
Normal file
@@ -0,0 +1,94 @@
|
||||
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
|
162
Unmodified UI Hidden Enable GamesDows Playnite V3.bat
Normal file
162
Unmodified UI Hidden Enable GamesDows Playnite V3.bat
Normal file
@@ -0,0 +1,162 @@
|
||||
@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
|
105
buildexe.bat
Normal file
105
buildexe.bat
Normal file
@@ -0,0 +1,105 @@
|
||||
#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;
|
||||
}
|
134
disable gamesdows-test-patch.bat
Normal file
134
disable gamesdows-test-patch.bat
Normal file
@@ -0,0 +1,134 @@
|
||||
@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
|
BIN
exe/BlackOverlay.exe
Normal file
BIN
exe/BlackOverlay.exe
Normal file
Binary file not shown.
105
exe/buildexe.bat
Normal file
105
exe/buildexe.bat
Normal file
@@ -0,0 +1,105 @@
|
||||
#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;
|
||||
}
|
121
exe/installexebuilddependencies.bat
Normal file
121
exe/installexebuilddependencies.bat
Normal file
@@ -0,0 +1,121 @@
|
||||
@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
|
112
gamesdows playnite v4 no welcome ui
Normal file
112
gamesdows playnite v4 no welcome ui
Normal file
@@ -0,0 +1,112 @@
|
||||
@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
|
144
installbuildtoolsdependencies.bat
Normal file
144
installbuildtoolsdependencies.bat
Normal file
@@ -0,0 +1,144 @@
|
||||
@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%
|
||||
)
|
27
installsteam.bat
Normal file
27
installsteam.bat
Normal file
@@ -0,0 +1,27 @@
|
||||
@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
|
68
installvisualstudiocommunity.bat
Normal file
68
installvisualstudiocommunity.bat
Normal file
@@ -0,0 +1,68 @@
|
||||
@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.
|
182
testupdateforpassforsteam.bat
Normal file
182
testupdateforpassforsteam.bat
Normal file
@@ -0,0 +1,182 @@
|
||||
:: 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
|
176
testupdateforplaynite.bat
Normal file
176
testupdateforplaynite.bat
Normal file
@@ -0,0 +1,176 @@
|
||||
@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 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 "%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