让bat批处理以管理员权限运行的实现方法
在bat代码的最开始添加如下指令:
@echo off %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0"
扫描二维码推送至手机访问
在bat代码的最开始添加如下指令:
@echo off %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0"
扫描二维码推送至手机访问