简体   繁体   English

如何使用批处理命令在WinXP上停止我的网络连接?

[英]How to stop my network connection on WinXP using batch command?

for example, if I want to stop "lan connection 1" in my control pannel, I usually right click it in my control panel and disable it. 例如,如果要在控制面板中停止“局域网连接1”,通常会在控制面板中右键单击它并禁用它。 Now I want to write a script to disable and enable those connections. 现在,我想编写一个脚本来禁用和启用这些连接。 How can I do it?? 我该怎么做??

Thank you very much 非常感谢你

I googled for you: 我为您搜寻:

netsh interface set interface name="Local Area Connection" admin=disabled

put your connection name in place of "Local Area Connection" . 将您的连接名称代替"Local Area Connection"


More detailed syntax of netsh : netsh详细语法:

Usage set interface [name = ] IfName 用法设置接口[name =] IfName

  [ [admin = ] ENABLED|DISABLED [connect = ] CONNECTED|DISCONNECTED [newname = ] NewName ] Sets interface parameters. IfName - the name of the interface admin - whether the interface should be enabled (non-LAN only). connect - whether to connect the interface (non-LAN only). newname - new name for the interface (LAN only). Notes: - At least one option other than the name must be specified. - If connect = CONNECTED is specified, then the interface is automatically enabled even if the admin = DISABLED option is specified. 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM