mirror of
https://github.com/jazir555/GamesDows.git
synced 2025-08-13 00:19:18 +02:00
Update Enable GamesDows v2 NEW OCT-12-2024.bat
This commit is contained in:
@@ -25,19 +25,17 @@ echo Creating LaunchSteamAsAdmin.vbs script
|
|||||||
|
|
||||||
:: Create VBScript to launch Steam as admin and set the shell to Steam
|
:: Create VBScript to launch Steam as admin and set the shell to Steam
|
||||||
(
|
(
|
||||||
echo Set WshShell = CreateObject("WScript.Shell")
|
' Define Steam path (adjust if different)
|
||||||
echo ' Run REG ADD command to set the shell to Steam
|
steamPath = "C:\Program Files (x86)\Steam\Steam.exe"
|
||||||
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
|
' Define arguments for Steam (optional)
|
||||||
echo Set objShell = CreateObject("Shell.Application")
|
steamArguments = "-bigpicture -nobootstrapupdate -skipinitialbootstrap -skipverifyfiles"
|
||||||
echo objShell.ShellExecute "%STEAM_PATH%", "", "", "runas", 1
|
|
||||||
echo Set WshShell = Nothing
|
' Execute PowerShell command to launch Steam with elevated privileges
|
||||||
echo Set objShell = Nothing
|
CreateObject("WScript.Shell").Run "powershell -ExecutionPolicy Bypass -NoProfile -Verb RunAs -command \"" & steamPath & " " & steamArguments & "\"", 0, True
|
||||||
) > "%ADMIN_VBS_PATH%"
|
|
||||||
if %errorlevel% neq 0 (
|
' Exit the script after launching Steam
|
||||||
echo Error creating LaunchSteamAsAdmin.vbs
|
WScript.Quit
|
||||||
pause
|
|
||||||
exit /b 1
|
|
||||||
)
|
)
|
||||||
|
|
||||||
echo Creating RunBatchSilently.vbs script
|
echo Creating RunBatchSilently.vbs script
|
||||||
|
Reference in New Issue
Block a user