Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
DOS/PDA/Other
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem ram recovery router screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
hosts registry

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
ToMeX's Avatar
Junior Member with 3 posts.
 
Join Date: Oct 2009
28-Oct-2009, 03: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 03:16 PM.
Squashman's Avatar
Distinguished Member with 14,983 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
29-Oct-2009, 12: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, 04:33 PM #3
im not using router. Its direct connection.
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 5,485 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
30-Oct-2009, 07: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, 05: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 Bookmark and Share

Smart Search

Find your solution!



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


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:55 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.