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?