<
批处理 bat 管理员身份运行
>
上一篇

学习笔记 Swagger
下一篇

学习笔记 Log4j 和 log4j2 + springboot

方式1, powershell 测试有效

(cd /d "%~dp0")&&(NET FILE||(powershell start-process -FilePath '%0' -verb runas)&&(exit /B)) >NUL 2>&1

方式2, cmd 测试有效

%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit

方式3, 测试未通过

%1 mshta vbscript:CreateObject("WScript.Shell").Run("%~n0 ::",0,FALSE)(window.close)&&exit
Top
Foot