I finally took the time to test this code on a Windows 7 machine, but the package doesn't install correctly. Even after rebooting, the IP address is set to automatic, but the old DNS settings remain manual.
Here are the installation logs from the console:
Code: Select all
Please wait...Using DHCP on interface 'Realtek PCIe GBE Family Controller'Traceback (most recent call last):
File "C:\wapt\common.py", line 3846, in install_wapt
exitstatus = setup.install()
File "c:\windows\temp\waptcnpcef\setup.py", line 22, in install
File "C:\wapt\common.py", line 3625, in run
return ensure_unicode(setuphelpers.run(*arg,pidlist=self.pidlist,**args))
File "C:\wapt\setuphelpers.py", line 1046, in run
raise TimeoutExpired(cmd,''.join(output),timeout)
TimeoutExpired: Command 'ipconfig /renew' timed out after 15 seconds with output ''\r\nConfiguration IP de Windows\r\n\r\n''
TimeoutExpired: Command 'ipconfig /renew' timed out after 15 seconds with output ''\r\nConfiguration IP de Windows\r\n\r\n''
If I delete the "ipconfig /renew" command, the package installs without error, but the DNS settings are not automatically reset.
If I replace the nic.SetDynamicDNSRegistration() command with nic.SetDNSServerSearchOrder(['172.16.80.13','172.16.80.14']), the DNS is indeed modified.
The command nic.SetDynamicDNSRegistration(FullDNSRegistrationEnabled=1) does not appear to work either.