How to programmatically enable/disable network interfaces? (Windows XP)

前端 未结 7 2040
一生所求
一生所求 2020-12-02 19:23

I need to enable/disable completely network interfaces from a script in Windows XP. I\'m looking for a python solution, but any general way (eg WMI, some command-line à la n

7条回答
  •  误落风尘
    2020-12-02 20:02

    The devcon tool can control the NIC, but not the interface directly. It's a command-line version of the Device Manager applet.

    devcon disable (id or portion of name)
    devcon enable (id or portion of name)
    

提交回复
热议问题