1.

Solve : copying hosts file?

Answer»

I have a friend that comes over all the time to use FaceBook and I don't mind but he always posts bad stuff and I am not wanting my I.P. to get banned and so I wanting to make 1 hosts file with facebook being blocked and one that is default. What I need to know is how I can make a batch file that will switch out the hosts files for me so I don't have to keep doing it myself...I have tried

xcopy /s /y /z "C:\Documents and Settings\OWNER\downloads\hosts" "\C:\WINDOWS\system32\drivers\etc"
(making 2 diff batch files with 2 host files in 2 diff folders and just having them replace each other)

also..

set set "hostpath=%systemroot%\system32\drivers\etc"
set "hostfile=hosts"
attrib +r "%hostpath%\%hostfile%"
xcopy /s /y /z "C:\Documents and Settings\OWNER\downloads\test\%hostfile%" "%hostpath%"
(this just copied bother the host files to the FOLDER at the same time one being in the test folder..)

This is my first EVER attempt of making a batch file so I have no clue what I am doing or how to fix it so any help would be much appreciated.

Even easier..... create a user account that has facebook black listed in the browser. They can access all other sites but facebook is not accessible unless they logon to your acct.

I created alt HOSTS files on a system before and Windows and Anti-malware real-time protection programs alert when this is going to be altered. It was easier to create a 2nd acct and restrict the website access on that 2nd acct and have the admin account on a strong password and the person who you want to block content of on a user acct that can not download and install a different browser to BYPASS IE blacklist. If they cant install another browser to get around it then the only other WAY they can try to get to facebook would be if they were smart enough to use a redirection site to mask facebook under a different URL such as tinyURL etc. If they are using redirection then HOSTS entries or blacklists are not going to help you!!! Hopefully they dont know redirection. If they do, then ban them from computer access if you dont want bad stuff posted!

The IE Block is profile specific, so only on their user acct would this block be active. On your acct which is likely admin privileges you would not be blocked because your profile does not contain a block preference for IE or whichever browser you use.Another problem with changing the HOSTS file in modern Windows is that the UAC will trigger and ask for admin permission.

I agree that anti-malware software often monitors the HOSTS file and also stops writes to the file.



Discussion

No Comment Found