runASadmin.bat

===================

%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
C:\Windows\System32\netsh.exe interface set interface "VMware Network Adapter VMnet8" disabled
C:\Windows\System32\netsh.exe interface set interface "VMware Network Adapter VMnet8" enabled

 

说明:此脚本自动重置一下vmnet8网卡。需要管理员权限。如果没有行一行,每次必须右键选“做为管理员运行”,加入第一行后,直接执行即为以administrator权限运行。

具体原理不清楚,在bat脚本第一行加入后就可以了。

posted on 2020-11-02 18:47  胡彼德  阅读(2277)  评论(0编辑  收藏  举报