-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunMe.bat
More file actions
46 lines (41 loc) · 1.45 KB
/
Copy pathRunMe.bat
File metadata and controls
46 lines (41 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
REM ============================================================
REM SecureBootCertFix - One-Click Launcher (Auto Admin)
REM ============================================================
REM This batch file automatically requests administrator rights
REM and runs the PowerShell script.
REM ============================================================
REM Check for admin rights
net session >nul 2>&1
if %errorLevel% == 0 (
goto :RunScript
) else (
goto :RequestAdmin
)
:RequestAdmin
echo Requesting administrator privileges...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
:RunScript
echo.
echo ================================================================
echo SecureBootCertFix - Windows Secure Boot Certificate Updater
echo ================================================================
echo.
echo Running with administrator privileges...
echo.
REM Run PowerShell script with bypass execution policy
powershell.exe -ExecutionPolicy Bypass -NoProfile -File "%~dp0Update-SecureBootCert.ps1"
if %errorlevel% equ 0 (
echo.
echo ================================================================
echo Update process finished.
echo ================================================================
) else (
echo.
echo ================================================================
echo Update process ABORTED or FAILED.
echo ================================================================
)
echo.
pause