Check Website
Inclusion Status
It is currently Thu Oct 23, 2014 7:52 pm

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Changing hosts file path
PostPosted: Mon Feb 11, 2008 7:54 pm 
Hi, I would really like to know how to change the path of a hosts file. The default location is system32/drivers/etc, but if I move it from that path it'll stop taking effect. What exactly do I need to do for my hosts file to work in a different folder?

Thanks a lot in advance:)



IP:
top
Top
  
 
 Post subject: Re: Changing hosts file path
PostPosted: Mon Feb 11, 2008 8:24 pm 
Martinx wrote:
Hi, I would really like to know how to change the path of a hosts file. The default location is system32/drivers/etc, but if I move it from that path it'll stop taking effect. What exactly do I need to do for my hosts file to work in a different folder?

Thanks a lot in advance:)


Hi,

I do believe you would have to modify the registry to point to the correct new location but in my opinion, the file is best left where it is.

Paul



IP:
top
Top
  
 
 Post subject: Re: Changing hosts file path
PostPosted: Mon Feb 11, 2008 11:26 pm 
Offline
Site Admin

Joined: Thu May 28, 2009 10:25 am
Posts: 5213
As Paul mentioned, you'd need to modify the path for it in the registry - something I'd strongly recommend not doing.

If you really really want to move it, you'll need to specify the new path at;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

_________________
Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net

Keeping it FREE!



IP:
top
Top
 Profile  
 
 Post subject: Re: Changing hosts file path
PostPosted: Thu Feb 14, 2008 6:35 pm 
MysteryFCM wrote:
As Paul mentioned, you'd need to modify the path for it in the registry - something I'd strongly recommend not doing.

If you really really want to move it, you'll need to specify the new path at;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath


Sorry guys for the late response. But thx a lot for the answers.

Yes, I really would like to move the hosts file, because I'm currently in need of having two different hosts files on my computer at the same time, that's why I want to move one of them into a different folder. But since you guys obviously know more about this stuff then I do, I'm willing to trust you:) What exactly am I risking by changing the path?

If it's nothing that can potentially slow down or ruin my computer I'm willing to do it.



IP:
top
Top
  
 
 Post subject: Re: Changing hosts file path
PostPosted: Thu Feb 14, 2008 6:40 pm 
Offline
Site Admin

Joined: Thu May 28, 2009 10:25 am
Posts: 5213
Very little as far as that specific key's value is concerned, aslong as the new path you specify is valid.

However, extreme caution should always be taken when editing the registry (including doing a backup of it before editing it)

_________________
Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net

Keeping it FREE!



IP:
top
Top
 Profile  
 
 Post subject: Re: Changing hosts file path
PostPosted: Thu Feb 14, 2008 7:24 pm 
MysteryFCM wrote:
Very little as far as that specific key's value is concerned, aslong as the new path you specify is valid.

However, extreme caution should always be taken when editing the registry (including doing a backup of it before editing it)


A back up? As in system restore?

Could you explain exactly how to change the path in the registry again? I'm not too good at this stuff, so would be nice of you if you could be as detailed as possible:)



IP:
top
Top
  
 
 Post subject: Re: Changing hosts file path
PostPosted: Thu Feb 14, 2008 8:46 pm 
Offline
Site Admin

Joined: Thu May 28, 2009 10:25 am
Posts: 5213
To backup the registry, load RegEdit (you'll need this to edit the registry anyway)

1. Click File
2. Click Export

To edit the registry entry, navigate to;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\

Then double click the DataBasePath value in the left pane, and enter the new path to the HOSTS file.

Then finally, reboot the computer

_________________
Regards
Steven Burn
I.T. Mate / hpHosts
it-mate.co.uk / hosts-file.net

Keeping it FREE!



IP:
top
Top
 Profile  
 
 Post subject: Re: Changing hosts file path
PostPosted: Fri Feb 15, 2008 7:41 am 
Thanks a lot, I followed every step carefully, and after changing the path and rebooting, the hosts file still won't take effect, even though it's inside the folder that I directed the path towards.

You know it's the hosts file that you get from here http://www.mvps.org/winhelp2002/hosts.htm You need to run a file called mvps.bat that automatically transfers the host file into the correct folder. I noticed after changing the hosts file path mvps.bat still moved the hosts file into system32/drivers/etc, so I just copied the hosts file, and pasted it into the new path folder and deleted the one inside the etc folder. And after doing that, like I mentioned before in this post, the hosts file still wouldn't take effect.

What am I doing wrong?:/



IP:
top
Top
  
 
 Post subject: Re: Changing hosts file path
PostPosted: Fri Feb 15, 2008 9:21 am 
Depends. BTW, what OS? I am assuming XP here. Try start, run, cmd, type in ipconfig /flushdns notice the space between ipconfig and / . Hit enter, see if it works.
Cheers,

Paul



IP:
top
Top
  
 
 Post subject: Re: Changing hosts file path
PostPosted: Sat Feb 16, 2008 9:16 pm 
Don't think it worked, because this is what it said (translating from swedish):

"It didn't work to flush cache-memory for the DNS-matcher: The function failed while executed."

Something like that, remember that it's my own translation from swedish so it's definitely not 100% accurate.

This is what it originally said if anyone knows swedish

"Det gick inte att rensa cache-minnet för DNS-matcharen: Funktionen misslyckades under körning."

Any more suggestions?:(



IP:
top
Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
hpHosts and hpHosts Online are copyright © Malwarebytes Corp - All Rights Reserved

Powered by phpBB © 2000-2009 phpBB Group