我写了如下两个BAT文件:1.bat和2.bat,用于禁用当前网卡启用另一网卡(双网卡、外网和内网),但觉得两个文件太麻烦,每次切换时都要点两次,希望执行一下就启用其中一个网卡,禁用另外一个网卡,再执行以下就反向执行。能否将下面两个BAT文件合二为一,或者不用Devcon.exe命令,用其它更好的写法。请高手赐教。
===========================
1.bat (开启B网卡禁用A网卡)
Echo off
devcon enable *DEV_1019*
::DEV_1019是A网卡
devcon disable *DEV_8139*
::DEV_8139是B网卡
===========================
2.bat (开启A网卡禁用B网卡)
Echo off
devcon disable *DEV_1019*
devcon enable *DEV_8139*
===========================
===========================
1.bat (开启B网卡禁用A网卡)
Echo off
devcon enable *DEV_1019*
::DEV_1019是A网卡
devcon disable *DEV_8139*
::DEV_8139是B网卡
===========================
2.bat (开启A网卡禁用B网卡)
Echo off
devcon disable *DEV_1019*
devcon enable *DEV_8139*
===========================
