-
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
116 additions
and
39 deletions.
There are no files selected for viewing
45 changes: 25 additions & 20 deletions
45
src/playbook/Executables/AtlasDesktop/2. Drivers/Run Update Drivers.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
@echo off | ||
set "script=%windir%\AtlasModules\Scripts\ScriptWrappers\UpdateDrivers.ps1" | ||
|
||
if not exist "%script%" ( | ||
echo Script not found: "%script%" | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
whoami /user | find /i "S-1-5-18" > nul 2>&1 || ( | ||
call RunAsTI.cmd "%~f0" %* | ||
exit /b | ||
) | ||
|
||
@REM The "echo Y" is to bypass the NuGet installation user prompt. | ||
@REM If there's a better way, feel free to PR. | ||
echo Y | powershell -ExecutionPolicy Bypass -NoProfile -File "%script%" | ||
|
||
pause | ||
exit /b 0 | ||
@echo off | ||
set "script=C:\Users\rad\Downloads\UpdateDrivers.ps1" | ||
|
||
set "___args="%~f0" %*" | ||
fltmc > nul 2>&1 || ( | ||
echo Administrator privileges are required. | ||
powershell -c "Start-Process -Verb RunAs -FilePath 'cmd' -ArgumentList """/c $env:___args"""" 2> nul || ( | ||
echo You must run this script as admin. | ||
if "%*"=="" pause | ||
exit /b 1 | ||
) | ||
exit /b | ||
) | ||
|
||
if not exist "%script%" ( | ||
echo Script not found: "%script%" | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
powershell -ExecutionPolicy Bypass -NoProfile -File "%script%" | ||
|
||
echo. | ||
pause > null | ||
exit /b 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters