Windows XP hosts文件不起作用的解决办法

Windows XP hosts文件不起作用的解决办法
由于工作的需要,经常要修改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。

全文如下[地址:[url]http://www.mcse.ms/archive62-2006-1-1880791.html[/url]]:

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 registry key 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 pmak@aaanime.net [/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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值