运行这个程序后,电脑没网,诊断为:以太网没有有效ip配置
^%1 mshta vbscript:Create0bject("Shell. Application"). ShellExecute( "cmd. exe ","/c% "sO ::","" ," runas" ,1)
(window. close)&&exit
@echo off
set "sd=d:\test"
cd/d "%sd%"
for /r %%a in (*. exe) do (
netsh advfirewall firewall del rule name="%%~nxa">nul 2>nul
netsh advfirewall firewall add rule name="%%"nxa"program=%%a action=block dir=out>nul
echo;阻止%%^nx|a联网
)
pause
^%1 mshta vbscript:Create0bject("Shell. Application"). ShellExecute( "cmd. exe ","/c% "sO ::","" ," runas" ,1)
(window. close)&&exit
@echo off
set "sd=d:\test"
cd/d "%sd%"
for /r %%a in (*. exe) do (
netsh advfirewall firewall del rule name="%%~nxa">nul 2>nul
netsh advfirewall firewall add rule name="%%"nxa"program=%%a action=block dir=out>nul
echo;阻止%%^nx|a联网
)
pause