Echo off
Netsh interface IP Set Address "本地连接" Static 192.168.1.203 255.255.255.0 192.168.1.1 1
Netsh interface IP Set dns "本地连接" static 192.168.1.1 primary
Echo changed ip to office 192.168.1.203 press any key ,go on
Pause
@Echo off
Netsh interface IP Set Address "本地连接" Static 192.168.0.203 255.255.255.0 192.168.0.1 1
Netsh interface IP Set dns "本地连接" static 192.168.0.1 primary
Echo changed ip to home 192.168.0.203 press any key ,go on
Pause
本文提供了一个简单的批处理脚本示例,用于快速更改计算机上的IP地址设置。通过使用netsh命令,脚本能够将本地连接的IP地址在办公室和家庭网络配置之间进行切换。
474

被折叠的 条评论
为什么被折叠?



