@ECHO OFF setlocal EnableDelayedExpansion title 添加服务配置 PUSHD %~DP0 & cd /d "%~dp0" %1 %2 mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :runas","","runas",1)(window.close)&goto :eof :runas ::填写自己的脚本 cmd /k "xxx.exe --urls=http://*:80" echo 执行完毕,任意键退出 pause >nul exit
标签:goto,批处理,runas,cmd,程序,管理员 From: https://www.cnblogs.com/lecone/p/16623919.html