绿色包保存
This commit is contained in:
18
build/NPQS9100.bat
Normal file
18
build/NPQS9100.bat
Normal file
@@ -0,0 +1,18 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
|
||||
REM 获取当前批处理文件所在目录
|
||||
cd /d "%~dp0"
|
||||
|
||||
REM 检查是否有管理员权限
|
||||
net session >nul 2>&1
|
||||
if %errorlevel% == 0 (
|
||||
REM 已有管理员权限,直接启动
|
||||
start "" "NPQS9100.exe"
|
||||
exit
|
||||
) else (
|
||||
REM 没有管理员权限,使用 PowerShell 以管理员身份启动(隐藏窗口)
|
||||
powershell -WindowStyle Hidden -Command "Start-Process '%~dp0NPQS9100.exe' -Verb RunAs"
|
||||
exit
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user