0

I need to change following 5 values :

enter image description here

I have researched and found that I can Use "WMI" but that do not looks promising. Ipaddress module also looks like I would not be able to change all 5 values, https://docs.python.org/dev/library/ipaddress.html

Do I have any other option?

Abhishek dot py
  • 909
  • 3
  • 15
  • 31
  • Win32api for Python is what I think you need. – dc5553 May 26 '14 at 07:45
  • or `subprocess.Popen` aaaand `Popen('netsh interface ip set address name="Local Area Connection" static 192.168.0.100 255.255.255.0 192.168.0.1 1', shell=True)`.. But yea since we're doing things programatically, use [pywin32](http://sourceforge.net/projects/pywin32/files/pywin32/) – Torxed May 26 '14 at 08:16
  • No mention of how to change preferred and alternative DNS :( – Abhishek dot py May 26 '14 at 09:16
  • http://social.msdn.microsoft.com/Forums/vstudio/en-US/84ab53c2-1188-494d-9aae-028eafe05800/how-do-i-programatically-change-from-dhcp-to-static-ip-and-back-again?forum=vcgeneral – Dima Tisnek May 26 '14 at 09:31

0 Answers0