Chinaunix首页 | 论坛 | 博客
  • 博客访问: 539732
  • 博文数量: 120
  • 博客积分: 3991
  • 博客等级: 中校
  • 技术积分: 1113
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-31 15:57
文章分类

全部博文(120)

文章存档

2011年(3)

2010年(6)

2009年(111)

我的朋友

分类:

2009-10-22 09:54:35

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。

全文如下[地址:]:

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.
阅读(5031) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~