mirror of
https://github.com/jazir555/GamesDows.git
synced 2025-06-03 06:07:22 +02:00
Update Enable GamesDows Playnite.bat
This commit is contained in:
parent
bd73881d7a
commit
8ac1b1f33a
@ -1,9 +1,9 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
SETLOCAL EnableExtensions
|
||||
|
||||
echo Setting Playnite as default shell
|
||||
|
||||
SET "KEY_NAME=HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
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"
|
||||
@ -14,6 +14,9 @@ SET "EXPLORER_PATH=C:\Windows\explorer.exe"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
echo Create the DelayedExplorerStart.bat script in the Playnite folder
|
||||
@ -23,11 +26,11 @@ 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 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 "HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
|
||||
@ -36,6 +39,7 @@ echo %VBS_PATH%
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
|
||||
rem Create VBScript to run the batch file silently
|
||||
@echo off
|
||||
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%"
|
||||
@ -93,10 +97,10 @@ echo ^</Task^>
|
||||
) > "%XML_PATH%"
|
||||
|
||||
echo Delete the existing scheduled task if it exists
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f /ru "%USERNAME%"
|
||||
schtasks /delete /tn "RunDelayedExplorerStart" /f
|
||||
|
||||
echo Create the scheduled task using the XML file
|
||||
schtasks /create /tn "RunDelayedExplorerStart" /xml "%XML_PATH%" /ru "%USERNAME%"
|
||||
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.
|
||||
@ -107,7 +111,7 @@ 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
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user