| |||||
| Dernière réponse | |
|---|---|
| Sujet : fichier Hosts qui ne "fonctionne" plus | |
| JBM | En fait, j'ai trouvé cette solution et l'explication du problème sur microsoft.public.windows.server.dns :
Excerpt of solution: I have just finished working with a total of five engineers at Microsoft for three days trying to fix this problem and I finally have a solution. From what I have been able to piece together, it really was MSN Messenger 7.5 that broke my hosts file. The final engineer found what the discrepancy was and from that discovery I have come up with an hypothesis to explain what occurred. Here's what I think caused my problem: (1) MSN Messenger erroneously determined that my connection to the Internet was not functioning and launched its troubleshooter. (2) The troubleshooter made a copy of my existing hosts file and called it hosts.msn. It then went through the data therein probably to sanitize it and made a new hosts file. (3) Next, it deleted my DataBasePath registry key and recreated it, presumably to ensure that no malware had compromised it. It is this step that corrupted the system. Registry entries have three parts to them: name, type, data. The specific key to which I am referring is found in \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and is called DataBasePath. For a default installation of Windows Server 2003, its type should be REG_EXPAND_SZ and its value should be %SystemRoot%\System32\drivers\etc. MSN Messenger goofed up and made the type REG_SZ and that is what killed the hosts file. I'm not a registry expert, but I do have a background in programming. My theory is that both registry key types allow for the storage of alphanumeric data, however the difference is that the REG_EXPAND_SZ type allows for substitutions while the REG_SZ type does not. I bet since the REG_SZ type doesn't allow substitutions, the %SystemRoot% section was interpreted literally instead of being substituted by C:\Windows. This is why the "ipconfig /flushdns" command was not caching the entries in the hosts file. It simply couldn't find it! All I had to do was change the type to REG_EXPAND_SZ and everything began to work again. -- Todd J Heron, MCSE Windows Server 2003/2000/NT; CCA |
| Vue Rapide de la discussion |
|---|