由于工作的需要,经常要修改C:\windows\system32\drivers\etc\hosts里面的域名指向。可是莫名其妙的是,自己电脑上的 hosts文件修改了没有作用,google几天没有结果,郁闷。所幸的是还是找到了一篇高人的文章,原来是把 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters里面的"DataBasePath"类型从"REG_SZ"修改为"REG_EXPAND_SZ"就OK了(需要重新启动计算机),据说可能是安装MSN 7.0/7.5后类型被修改了,而微软对这个完全没有说明,FT。
全文如下[地址:]:
Open regedit and browse to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Tcpip\Parameters
Examine "DataBasePath" key in this node carefully.
If the path is set to %SystemRoot%\System32\drivers\etc and the key type is anything but REG_EXPAND_SZ, that is is your problem.
If the type is REG_SZ, edit the DatabasePath and hardcode th entire path (remove the env variable)
e.g. c:\windows\system32\drivers\etc
or
delete the existing registry key and create a new key by the same name (DataBasePath) of type REG_EXPAND_SZ and set the value to %SystemRoot%\System32\drivers\etc
Files in etc dir should now be enabled.
Why did this happen to you? Most likely you installed MSN Messenger 7.0/7.5 which changed the type of this key.
Why did it do that, why didn't it inform you of what it has done? Ask Bill gates?
Is it documented anywere? Not to the best of my knowledge.
[QUOTE][i]Originally posted by [email]pmak@aaanime.net[/email] [/i]
[B]I am experiencing the same problem; Windows seems to be ignoring my
hosts file.
C:\WINDOWS\system32\drivers\etc>grep pads.vgamin.de hosts
127.0.0.1 pads.vgamin.de
C:\WINDOWS\system32\drivers\etc>ping pads.vgamin.de
Pinging pads.vgamin.de [213.239.221.229] with 32 bytes of data:
Reply from 213.239.242.3: Destination host unreachable.
阅读(6253) | 评论(0) | 转发(0) |