可以使用AutoIt的Run函数来执行命令行操作禁用和启用网卡。

禁用网卡:

Run(@ComSpec & ' /c netsh interface set interface "本地连接" admin=disable', "", @SW_HIDE)

其中,"本地连接"是网卡名称,可以根据实际情况修改。

启用网卡:

Run(@ComSpec & ' /c netsh interface set interface "本地连接" admin=enable', "", @SW_HIDE)

同样,"本地连接"是网卡名称,可根据实际情况修改。

AU3如何禁用网卡和启用网卡