batch 每次以管理员身份运行

首行添加代码:

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

Was this article helpful?

Related Articles