6 Commits
v10 ... v11

Author SHA1 Message Date
jazir5
88d9e2972a Update Enable GamesDows Playnite.bat 2025-03-05 22:25:03 -08:00
jazir5
cb9218a3d0 Update Enable GamesDows Steam V3.bat 2025-03-05 22:23:39 -08:00
jazir5
24a9f0e798 Update Enable GamesDows Steam V3.bat 2025-03-05 22:21:10 -08:00
jazir5
f98ba713bd Create steam.manifest 2025-03-05 22:13:28 -08:00
jazir5
89f4b71825 Delete manifests directory 2025-03-05 22:13:14 -08:00
jazir5
785a97b697 Create steam.manifest 2025-03-05 22:12:38 -08:00
3 changed files with 60 additions and 37 deletions

View File

@@ -1,17 +1,27 @@
@echo off @echo off
SETLOCAL EnableExtensions :: Self-elevating Admin script
@echo off :: This script will automatically request admin rights if not running as admin
echo Checking for administrative privileges
net session >nul 2>&1 :: Check for admin rights and self-elevate if needed
if %errorlevel% neq 0 ( >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
echo ==================================================== if '%errorlevel%' NEQ '0' (
echo This script must be run with administrative privileges. echo Requesting administrative privileges...
echo Please right-click on the script and select "Run as administrator." goto UACPrompt
echo ==================================================== ) else (
pause goto GotAdmin
exit /b
) )
: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"
echo Setting Playnite as default shell echo Setting Playnite as default shell
echo Set Playnite as the default shell echo Set Playnite as the default shell

View File

@@ -1,17 +1,31 @@
@echo off :: Self-elevating Admin script
SETLOCAL EnableExtensions EnableDelayedExpansion :: This script will automatically request admin rights if not running as admin
echo Checking for administrative privileges
net session >nul 2>&1 rem Check for admin rights and self-elevate if needed
if %errorlevel% neq 0 ( >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
echo ==================================================== if '%errorlevel%' NEQ '0' (
echo This script must be run with administrative privileges. echo Requesting administrative privileges...
echo Please right-click on the script and select "Run as administrator." goto UACPrompt
echo ==================================================== ) else (
pause goto GotAdmin
exit /b
) )
: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 Setting Steam Big Picture as default shell
echo Set Steam Big Picture as the default shell echo Set Steam Big Picture as the default shell
SET "KEY_NAME=HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" SET "KEY_NAME=HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
SET "VALUE_NAME=Shell" SET "VALUE_NAME=Shell"
@@ -23,22 +37,11 @@ SET "STEAM_FOLDER=C:\Program Files (x86)\Steam"
SET "SCRIPT_NAME=DelayedExplorerStart.bat" SET "SCRIPT_NAME=DelayedExplorerStart.bat"
SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%" SET "SCRIPT_PATH=%STEAM_FOLDER%\%SCRIPT_NAME%"
SET "EXPLORER_PATH=C:\Windows\explorer.exe" SET "EXPLORER_PATH=C:\Windows\explorer.exe"
SET "MANIFEST_PATH=%STEAM_PATH%.manifest" SET "STEAM_EXE=C:\Program Files (x86)\Steam\Steam.exe"
SET "MANIFEST_PATH=%STEAM_EXE%.manifest"
:: Create the manifest file to force admin privileges for Steam echo Copying pre-created manifest file...
echo Creating manifest file for Steam to run as admin... copy "%~dp0steam.manifest" "%MANIFEST_PATH%" >nul 2>&1
(
echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^>
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^>
echo ^<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"^>
echo ^<security^>
echo ^<requestedPrivileges^>
echo ^<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/^>
echo ^</requestedPrivileges^>
echo ^</security^>
echo ^</trustInfo^>
echo ^</assembly^>
) > "%MANIFEST_PATH%"
echo Creating DelayedExplorerStart.bat script echo Creating DelayedExplorerStart.bat script

10
steam.manifest Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>