让bat双击即可“以管理员身份运行”

把以下代码写在BAT开头。

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

你可能感兴趣的:(桌面运维)