bat脚本中以管理员权限执行命令

在bat脚本文件第一行加上下面命令:

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

posted @ 2019-03-29 14:30  tiancixiong  阅读(70)  评论(0)    收藏  举报