There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
DOS/Other
Tag Cloud
access acer asus bios bsod computer crash driver drivers error ethernet excel freeze gaming google gpu graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard mouse network printer problem ram registry router server slow software sound svchost.exe trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/Other >
hosts registry

Reply  
Thread Tools
ToMeX's Avatar
Junior Member with 3 posts.
 
Join Date: Oct 2009
28-Oct-2009, 04:08 PM #1
hosts registry
Hello. I have a question. I am using windows 7 and i want to make a bat code which will move hosts file from drivers/etc to C:\00015847
I have this code:
Code:
@Echo on
mkdir C:\00015847
SET KEY=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters
REG ADD %KEY% /V DataBasePath /D "C:\00015847" /f
SET KEY=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl001\services\Tcpip\Parameters
REG ADD %KEY% /V DataBasePath /D "C:\00015847" /f
SET KEY=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl002\services\Tcpip\Parameters
REG ADD %KEY% /V DataBasePath /D "C:\00015847" /f
move C:\Windows\System32\drivers\etc\hosts "C:\00015847\"
attrib +h C:\00015847
attrib +h C:\00015847\hosts
(made all auto for myself not to go arround all pc)
I want to move hosts file to 00015847 folder and make it recognisable by computer by changing DataBasePath value to C:\00015847 in registry.
Also i hide it. Then i write to hosts IP and website (redirecting from one to other site) Thats for my brother. I want him not to go to a that website. But he knows how to unblock it (delete hosts in drivers/etc) so thats why i want to move hosts. But i restarted computer, and that website is not blocked by hosts while its in C:\00015847 folder. But when i put hosts to its normal place - it blocks. Registry was changed, so whats the problem?

Last edited by ToMeX; 28-Oct-2009 at 04:16 PM..
Squashman's Avatar
Trusted Advisor with 18,705 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
29-Oct-2009, 01:12 PM #2
I don't t know the answer to your registry problem but I personally would take a different approach.
1. See if it can be blocked in your router config.
2. Use OpenDNS. This is what I do for my network at home.
ToMeX's Avatar
Junior Member with 3 posts.
 
Join Date: Oct 2009
29-Oct-2009, 05:33 PM #3
im not using router. Its direct connection.
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 9,048 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
30-Oct-2009, 08:22 PM #4
If you brother has a Computer Admin account, he'll be able to get around anything you try eventually.

Make his account a Standard one, then he can't delete the hosts file without the password for an Admin account.
ToMeX's Avatar
Junior Member with 3 posts.
 
Join Date: Oct 2009
31-Oct-2009, 06:11 AM #5
I see. But whats the problem with file? I could do pranks on my friends if i would get it work.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:15 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.