You are on page 1of 1

@echo off

:: BatchGotAdmin
:------------------------------------REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system
"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%tem
p%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:-------------------------------------echo off
sc stop Audiosrv
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\IDT\Apo\LFX\LineOut\plugins\SRS /v "load" /t
REG_DWORD /d 00000000 /f
sc start Audiosrv
:--------------------------------------------------------------------------------------------------:change the file path here
START /WAIT /D "C:\Program Files\Need For Speed Rivals\Need for Speed Rivals\" N
FS14.exe
:--------------------------------------------------------------------------------------------------ECHO Waiting for NFS Rivals To finish
echo off
sc stop Audiosrv
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\IDT\Apo\LFX\LineOut\plugins\SRS /v "load" /t
REG_DWORD /d 00000001 /f
sc start Audiosrv
:-----------------------------------------------------------------------------------:Nawas's Method If you post it somewhere else please put the credits where it be
longs
:-------------------------------------------------------------------------------------

You might also like