Hi!
I have a little problem that I need some input on...
First a little background information:
I my organization we have encountered a problem regarding DNS settings when using a VPN client (non-Microsoft) for remote access. The symptom is that the DNS settings, and more spesific the DNS search list, for the NIC's ends up as garbage. This happens only on one perticular computer modell and neighter the computer HW manufaturer nor the VPN software manufacturer seems to be able (or willing) to find and fix the error.
I can easily correct the error in the DNS search-list by changig a registry value after the VPN client has connected to the network. The idea I want to try is to write a small service that sets this value after the VPN client is done with its "destruction".
However, it is not enough to set this registry value, I also have to make Windows reinitiate its DNS settings after I have made the change. Obviously the VPN client does this and thus there is an API and a method I can use for this.
So my question is: How do I get Windows 2000 to re-read the DNS search list settings from the registry or "apply" the changes that I make
I have found that a IPCONFIG /RENEW does the necessary reinitializations, but I don't like the idea of executing a shell command from my service...
(I have also found that IPCONFIG /FLUSHDNS does not reinitiate the settings)
By the way, the registry setting that I'm changing is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\SearchList
Best regards,
Knut

Making Windows 2000 reinitiate its DNS settings