Update Enable GamesDows v2.bat

This commit is contained in:
jazir5 2024-10-12 21:52:57 -07:00 committed by GitHub
parent de90b6b003
commit dbf70ac5cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,17 +23,19 @@ SET "STEAM_PATH=C:\Program Files (x86)\Steam\Steam.exe -bigpicture -nobootstrapu
echo Creating LaunchSteamAsAdmin.vbs script
echo Creating LaunchSteamAsAdmin.vbs script
:: Create VBScript to launch Steam as admin and set the shell to Steam
(
echo Set WshShell = CreateObject^("WScript.Shell"^)
echo Set WshShell = CreateObject("WScript.Shell")
echo ' Run REG ADD command to set the shell to Steam
echo WshShell.Run "cmd /c REG ADD 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' /v Shell /t REG_SZ /d '!STEAM_PATH!' /f", 0, True
echo WshShell.Run "cmd /c REG ADD ""HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"" /v Shell /t REG_SZ /d ""%STEAM_PATH%"" /f", 0, True
echo ' Launch Steam with elevated privileges
echo Set objShell = CreateObject^("Shell.Application"^)
echo objShell.ShellExecute "!STEAM_PATH!", "", "", "runas", 1
echo Set objShell = CreateObject("Shell.Application")
echo objShell.ShellExecute "%STEAM_PATH%", "", "", "runas", 1
echo Set WshShell = Nothing
echo Set objShell = Nothing
) > "!ADMIN_VBS_PATH!"
) > "%ADMIN_VBS_PATH%"
if %errorlevel% neq 0 (
echo Error creating LaunchSteamAsAdmin.vbs
pause