0
例如,如果我想在控制面板中停止「局域網連接1」,我通常會在控制面板中右鍵單擊它並將其禁用。現在我想編寫一個腳本來禁用和啓用這些連接。我該怎麼做??如何使用批處理命令在WinXP上停止我的網絡連接?
非常感謝您
例如,如果我想在控制面板中停止「局域網連接1」,我通常會在控制面板中右鍵單擊它並將其禁用。現在我想編寫一個腳本來禁用和啓用這些連接。我該怎麼做??如何使用批處理命令在WinXP上停止我的網絡連接?
非常感謝您
我用Google搜索你:
netsh interface set interface name="Local Area Connection" admin=disabled
代替"Local Area Connection"
把你的連接名稱。
的netsh
更詳細的語法:
使用一套接口[名稱=] 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.
您好,感謝您的回覆。 我遵循你的設置,但我收到了以下錯誤消息: 爲此命令提供的synta無效。檢查正確語法的幫助..... – Frank 2010-04-07 17:11:30
可能是一個小的語法錯誤。我讀過''netsh'語法在不同版本的Windows之間有所不同。試試'netsh /?'也許這是一點語法差異。 – pajton 2010-04-07 17:29:46