diff --git a/Enable GamesDows Playnite no splashscreen disabled welcome UI.bat b/Enable GamesDows Playnite no splashscreen disabled welcome UI.bat index 5cc2a08..e7d5ea0 100644 --- a/Enable GamesDows Playnite no splashscreen disabled welcome UI.bat +++ b/Enable GamesDows Playnite no splashscreen disabled welcome UI.bat @@ -7,11 +7,13 @@ 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 --hidesplashscreen" +SET "PLAYNITE_PATH=%PLAYNITE_FOLDER%\Playnite.FullscreenApp.exe --hidesplashscreen" REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f powercfg -h off +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableFirstLogonAnimation /t REG_DWORD /d 0 /f + @echo off SETLOCAL EnableExtensions EnableDelayedExpansion @@ -34,20 +36,17 @@ echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v She 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 NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%PLAYNITE_PATH%" /f +echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows\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 %VBS_PATH% echo Set WshShell = CreateObject("WScript.Shell") > "%VBS_PATH%" -echo WshShell.Run chr(34)^&"%SCRIPT_PATH%"^&chr(34), 0, True >> "%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 @@ -112,6 +111,86 @@ 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. +:: Begin new code to create startup task for SetDisableLogonUI + +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 ^ +echo ^ +echo ^ +echo ^2020-01-01T00:00:00^ +echo ^SYSTEM^ +echo ^Run SetDisableLogonUI.bat at startup.^ +echo ^ +echo ^ +echo ^ +echo ^true^ +echo ^ +echo ^ +echo ^ +echo ^ +echo ^SYSTEM +echo ^HighestAvailable^ +echo ^ +echo ^ +echo ^ +echo ^IgnoreNew^ +echo ^false^ +echo ^false^ +echo ^true^ +echo ^true^ +echo ^false^ +echo ^ +echo ^true^ +echo ^false^ +echo ^ +echo ^true^ +echo ^false^ +echo ^false^ +echo ^PT72H^ +echo ^7^ +echo ^ +echo ^ +echo ^ +echo ^wscript.exe^ +echo ^"%VBS_DISABLE_LOGON_UI_PATH%"^ +echo ^ +echo ^ +echo ^ +) > "%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 + +:: End new code + echo Disable the boot UI bcdedit.exe -set {globalsettings} bootuxdisabled on