Link to home
Start Free TrialLog in
Avatar of ramachandraraju
ramachandrarajuFlag for India

asked on

batch file creation

hi

please tell me how to create a batch file according to my requirement. this is for blocking some internet sites to all users in the domain.
we dont have proxy server and we wont use.
we have windows server 2003 domain. we have windows 2000, xp, vista clients.
 i tried to restrict from group policy settings but its not working.

through google, i got one method, according to that,

1. i copy any host file from client location and i add all the web sites which i want to block like, www.facebook.com  127.0.0.1. i will copy this file into the server and i will share the file.
2. i want to create a batch file like, if we run this batch file it should replace the host file from server (which is saved in shared location in server)  to client's ( user logged into the system) host file.
3. i have to create a GPO like, the batch file as a script that every time when a user logs into the client this batch file should run.


please give some idea to create this type of solution. because i didn't get any solution through group policy directly. all the internet options i tried. everybody giving how to block entire internet access or referring proxy settings. both are not useful for me.

please help me.

Avatar of flubbster
flubbster
Flag of United States of America image

Take a look here. Might be exactly what you are looking for.

http://www.pcreview.co.uk/forums/push-host-file-through-batch-script-t1467966.html
ASKER CERTIFIED SOLUTION
Avatar of ashutoshsapre
ashutoshsapre
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CNS_Support
CNS_Support

There is more than one way to skin a cat.
Rather than scripting this, your workstations should be using your server as a DNS Server.  Just add the modified IP's for the web site to the DNS Server.
Your solution will be global imediately.  Problem is that if the user is able to change DNS servers they could cercumvent the block but they could do this by modifying the host file anyway.
You can also create a GPO that will set website access rules. If you choose this option, all I.E. versions must be the same versions.
Avatar of ramachandraraju

ASKER

please give me some more information
Some more info about what proposed solution?
i need some more information. please make this question as open
I am not a moderator so I have no power ove the sate of your question.

However, I wanted to see if you still needed help.

Please let me know what have you tried and where you'r at.

Cheers,
Rene