%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
2021年1月9日補充
如果遇到有文件夾名稱有空格的情況下,可以將 %~s0 改為 ""%~s0"" 以支持路徑中有空格后無法正確執行的問題。
也就是 %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c ""%~s0"" ::","","runas",1)(window.close)&&exit