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
I can't seem to find any basic API for controlling interfaces on MSDN, apart from the RAS API's, but I don't think they apply to non-dialup connections. As you suggest yourself, netsh might be an option, supposedly it also has a programmatic interface: http://msdn.microsoft.com/en-us/library/ms708353(VS.85).aspx
If you want to be pure Python, you can perhaps open a set of pipes to communicate with an netsh process.