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

Networking 如何使用批处理命令停止WinXP上的网络连接?,networking,connection,command,Networking,Connection,Command,例如,如果我想停止控制面板中的“lan连接1”,我通常在控制面板中右键单击它并禁用它。现在我想写一个脚本来禁用和启用这些连接。我该怎么做 非常感谢我在谷歌上搜索过你: netsh interface set interface name=“Local Area Connection”admin=disabled 将您的连接名替换为“局域网连接” netsh的更详细语法: 用法集接口[name=]IfName [ [admin = ] ENABLED|DISABLED

例如,如果我想停止控制面板中的“lan连接1”,我通常在控制面板中右键单击它并禁用它。现在我想写一个脚本来禁用和启用这些连接。我该怎么做

非常感谢

我在谷歌上搜索过你:

netsh interface set interface name=“Local Area Connection”admin=disabled

将您的连接名替换为
“局域网连接”


netsh
的更详细语法:

用法集接口[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.

嗨,谢谢你的回复。我遵循了您的指示,但收到了folliwng错误消息:为此命令提供的语法无效。查看帮助以了解正确的语法…可能是一个小语法错误。我读到不同版本的Windows之间的
netsh
语法略有不同。请尝试
netsh/?
也许这只是语法上的一点差异。