Avatar of A Edwards
A Edwards

asked on 

Pushing a Host File via Active Directory

Win XP
Win 2k3 server
-------------------
I have a host file that updates every so often.  I would like to push this file out to all my computers in the network via Active Directory.  All users do not have Local Admin Rights. What steps would I need to take to push this file out.  I was told it can be done with an MSI package.  I am not to familar with MSI and pushing this out.  Please give me a step by step thanks!!
Windows Server 2003

Avatar of undefined
Last Comment
fibrekode
Avatar of sirbounty
sirbounty
Flag of United States of America image

If you can run it from a 'management' station, using network admin credentials, and if you have a list of PCs, then something like this would work...

for /f %%a in (C:\Computers.txt) do copy %systemroot%\system32\drivers\etc\hosts \\%%a\admin$\system32\drivers\etc /y
Avatar of A Edwards
A Edwards

ASKER

What would be considered a "Management Station"?

And were would I put this script?
" for /f %%a in (C:\Computers.txt) do copy %systemroot%\system32\drivers\etc\hosts \\%%a\admin$\system32\drivers\etc /y " 
Avatar of sirbounty
sirbounty
Flag of United States of America image

By that I mean, perhaps, your PC - one with an admin logged in to it.

you could save the above as UpdateHosts.bat
Once run (double-click it) it'll update all computers in the computers.txt file with the hosts file stored on your PC (assuming that's where the updated one is...)
Avatar of A Edwards
A Edwards

ASKER

Would I need to add all my computer names to that ( C:\Computers.txt )?

And Yes I have the Updated host file on my computer in the default folder.
C:\WINDOWS\system32\drivers\etc\hosts
ASKER CERTIFIED SOLUTION
Avatar of sirbounty
sirbounty
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of A Edwards
A Edwards

ASKER

Thanks man... That worked
It was so fast..
Thanks a lot for the Batch files.  You made me look like a KING!!
Avatar of fibrekode
fibrekode

Can someone help me out here. I'm kinda new to all this...
I want to auto run this command to copy the hosts file to the user's computer when they logon to their account on the network.

Can anybody post in detail steps I can follow, starting with the .bat file and where to set it up.

thanks
Windows Server 2003
Windows Server 2003

Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).

129K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo