mirror of
https://github.com/jazir555/GamesDows.git
synced 2025-06-03 06:07:22 +02:00
Update Enable GamesDows Steam V3.bat
This commit is contained in:
parent
24a9f0e798
commit
cb9218a3d0
@ -1,17 +1,31 @@
|
||||
@echo off
|
||||
SETLOCAL EnableExtensions EnableDelayedExpansion
|
||||
echo Checking for administrative privileges
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo ====================================================
|
||||
echo This script must be run with administrative privileges.
|
||||
echo Please right-click on the script and select "Run as administrator."
|
||||
echo ====================================================
|
||||
pause
|
||||
exit /b
|
||||
:: 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=HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
|
||||
SET "VALUE_NAME=Shell"
|
||||
|
Loading…
x
Reference in New Issue
Block a user