Introduction: Automated Configuration of Network Connectivity After Image Deployment
O.K. we see in movies or some awesome IT guys (those people are engineers, mostly of them) do soothing cool, they deploy the same image on all workstation (naturally all of them are hardware identical) and after a reboot, made by remote or manually and *BAMMM* they somehow are configured.
That is no techno-magic or chip voodoo it is just a hand full of scripts that are inserted in the image before it will be deployed.
This will be explained in a way that you can use it and modify it to fit your needs WITHOUT the need to be a it guru.
The scripts are compatible with Windows XP but they can easy be adapted to vista 7 and more, you need to include a use system variables for the new folder locations for the startup. Like replaceing the
%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\Startup\CPAU - SetupIPs.lnk with
%UserProfile%\Start Menu\Programs\Startup\CPAU - SetupIPs.lnk
you can use %ALLUSERSPROFILE% to go in AllUsers too.
Step 1: First You Need to Make a Master Image.
The master image is a installed windows (2000->8.1) with the scripts configured and put inside.
For that you can use Norton/Symantec Ghost (any version, i use both 2003 and 15) or Macrium Reflect free.
Step 2: The Software We Need (all Freeware)
Shortcut.exe from http://www.optimumx.com/downloads.html
CPAU.exe from http://www.joeware.net/freetools/tools/cpau/
CoreUtils from http://gnuwin32.sourceforge.net/packages/coreutils.htm
From there you download the binaries and dependencies
from binaries you use cat.exe, head.exe, tail.exe libiconv2.dll, libintl3.dll
NetDOM.exe v1.8 from ftp://ftp.microsoft.com/reskit/nt4/x86/
Step 3: More Info
This is a post install configuration script that configures
the computer name (NetBios too) , ip, mask, gateway, dns (primary and secondary), joins a workgroup, self remove after config is done, if choose and reboot pc if choose.
The idea is that after deploying a image from the network, all stations are not able to connect to the network (except if you use a dhcp server in your intranet). From this point you have 2 options: First is to manually configure all on each pc (that takes time and effort). Second is to use a way to automate the first one :) . My script is doing exactly this.
How ? Easy, all network cards have a unique address, called MAC Address [http://en.wikipedia.org/wiki/MAC_address]. Lest say, if i know each pcs mac then i can configure it according to that. My script gets the current pcs mac address and seeks it in his data file, when its found it configures the pcs according to the relative data stored.
Step 4: Description and Configuration
The script consists from 5 small executable files (~900kbs), 2 cmd files (~4kb)
and 3 configuration text files.
the 1st line contains the the workgroup name
the 2nd line contains the the mask
the 3nd line contains the the gateway
the 4nd line contains the the primary dns
the 5nd line contains the the secondary dns
the 6nd line contains the the interface name ex "Local Area Connection"
the 7nd line contains the the cleanup flag (0 for off and 1 for on)
the 8nd line contains the the reboot flag (0 for off and 1 for on)
the 1st word in the line contains the the mac address
the 2st word in the line contains the the ip address
the 3st word in the line contains the the computer name
the 1st line contains the deployment folder for our script
the 2nd line contains the the deployment username (a Administrator account)
the 3nd line contains the the deployment password
The Admin pass and username are stored encrypted by cpau.exe in SetupIPs.dat and
will be used by cpau to start the script by login (on any account, even guest) configate the station then removeing itself. A link file will be placed in startup all users that will do the trick.
How to get the macs of all your pcs ? Easy use the GetMACs.cmd, it will generate a GetMACs.txt with the macs added. for geting macs from a remote station put the station name as command line argument Ex(GetMacs.cmd STATION1).
Lets recapitulate the procedure, step by step.
1> Use GetMacs.cmd or whatever you like to get a list of all macs of your network. [REMARK: if you got on some pcs more that one network card the GetMACs.cmd will return a single mac of the 1st adapter]
2> Put the mac addresses with the accordin IPs and computer names in SetupIPs_Data.txt
3> Put the workgroup name, ip mask, gateway, primary and secondary dns, interface name, cleanup flag and reboot flag in the SetupIPs_Config.txt file.
4> Run SetupIPsDeploy.cmd
5> Make the master image with (with norton ghost, ping, gziped dd, anything you use)
6> Deploy it on all stations and when a user login, it start the automated configuration followed by reboot, if flag is set and finally, self remove if the flag is set.
WARNING READ IN CONFIGURATION FILES THERE ARE NO BLANK LINES BETWEEN LINES, THIS IS DONE BY INSTRUCTABLE'S EDITOR, I ADDED A TEXT DOCUMENT WITH CORRECT VIEW OF IT, USE IT PLEASE.
Step 5: DOWNLOADS
The data i put in is a example, you need to change it according to your needs.
We have a be nice policy.
Please be positive and constructive.