1.自动以管理员打开:
将这句话放到bat文件的开头即可
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit cd /d "%~dp0"
2.开机自启
复制要执行的bat文件的快捷方式到 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup 文件夹中;