Automated installs (very long)

Jason Gerrity jason.gerrity at
Tue Oct 7 13:28:26 GMT 1997

Hello Gerald & Louis

You folks are right about the amount of people interested in this stuff.
We Definitely should put our heads together and come up with the ultimate
(if there is such a thing) solution.

Here's what we do...

We have about 300 or so PC's running Win95 (right now, will grow to almost
2,000) they are running from several DEC alphas with D.U. 3.2g and Samba
1.9p17.  We're a college and so the least amount of user intervention
during install the better...

We use the DOS msclient boot disk to boot the pc and the installer has to
log in to connect to the network share where the image is stored (Louis,
you mentioned that you use the linux dos boot, I would be VERY interested
to see how you did this).

Once logged in the .bat file links to the server and uses Rdist4PC to
transfer the image to the local HDD.  We use a utility  called PUTINENV to
read the ethernet address of the NIC and write it to a .REG file on the HDD 

echo REGEDIT4 > c:\rnew.reg                                                   
me] >> c:\rnew.reg
echo "ComputerName"="%STRING%" >> c:\rnew.reg                          
echo [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP
echo "ComputerName"="%STRING%" >>c:\rnew.reg                                  

Very much like you do Louis.

Then once the image is transferd to the LHDD this .Reg file is imported
into the win95 registry.  The one drawback here is that PUTINENV uses some
kind of mixed up & backwards representation of the MAC address.  

So, once the PC's reboots (we have dual-boot so you have to pick win95 as
first O/S to load) the netbios Hostname is the ethernet address.  We then
use Kixtart 95 to do all of our drive linking and registry editing (it is a
very good tools for this).  This script will check for a flag file on the
local HDD (which was transfered with the image) and then run a seperate
script (also a kix script) which restores long filenames, sets up the
default printer and changes the netbios hostname from the ethernet address
to our DNS hostnames.

$cn = readprofilestring("z:\kix\bootp.ini","Vitals", at wksta)

;Setting computer name

;Reading values for printer from bootp.ini
$gp = readprofilestring("z:\kix\bootp.ini","Vitals",$cn + "-group")
$pq = readprofilestring("z:\kix\bootp.ini","Vitals",$cn + "-queue")
$pr = readprofilestring("z:\kix\bootp.ini","Vitals",$cn + "-printer")
$ps = readprofilestring("z:\kix\bootp.ini","Vitals",$cn + "-printerserv")
$f = 0
while $x > 0
        if substr($pr,$x,1) = "-"
               if $f = 0
                        $pd = substr($pr,$x+1,len($pr)-$x)
                        $f = 1
        $x = $x - 1

;Setting up drive links
if $gp <> ""
     use j: @lserver\+$gp "."
use g: @homeshr "."
use h: @lserver\h "."
use s: @lserver\image "."

;Entering generic printer registry information
run "regedit printers\"+$pd+".reg"

;Writing printer host and queue to registry

;Writing printer values to win.ini file
ironments\Windows 4.0\Drivers\"+$ln,"Driver")
$x=writeprofilestring("win.ini", "$fi" , "ATM" , "placeholder")

;Setting up DOS printing
$x=writevalue("HKEY_USERS\.Default\Network\Persistent\LPT1","UserName", at user
Microsoft Network",REG_SZ)

;Restoring long file names
shell "s:\utils\doslfn\doslfnbk c: /r /orphans /force /f c:\backup.lfn"

;Deleting the flag file


We also have win311 & DOS 5 clients here so we use NFS and Bootp for them,
so we parsed the Bootptab and created Bootp.ini files which Kixtart uses to
find the appropriate info for the win95 machines:


>From here the kix script parses the 'qms1725' section from the bootp.ini
file and imports the appropriate .reg file into win95.  We use a packge
called WinInstall to take 'snapshots' of files and the reg before and after
app installs or printers.  This utility will create .reg files with all of
the appropriate changes for anything which we can then import.

So, since each lab may have a different printer and each printer has a
different unix que, we have kixtart parse the bootp.ini file and find out
what the printer type is and the Que to use and sets it for that mahcine.

Sounds kind of complex huh?

All of this is done the first time the Windows 95 machine is booted after
the image was initially transferd.  But to remove that anoying "you have
not logged on..." message you can do this:

ProfileList\@userid","ProfileImagePath","G:\", REG_SZ)
rofileReconciliation","ProfileDirectory","G:\", REG_SZ)

Where @userid is a macro from Kixtart that is the login name of the current
user.  If you want to reduce the amount of network traffic (since this
method points everything to G:\ (which is then mapped to the users' home
dir using NIS) you could do this:

if exist("C:\Windows\Profiles")=0
   shell " /c mkdir C:\Windows\Profiles"
if exist("C:\Windows\Profiles\@userid")=0
   shell " /c mkdir C:\Windows\Profiles\@userid"
ileList\@userid") "."
REG_SZ) "."
REG_SZ) "."

this will then only store the USER.DAT and USER.DA0 on the local HDD and
transfer it back and forth like M$ intended.  We also use the custom
folders section of the CONFIG.Pol to point the startmenu, etc. to G:\ also.
 This allows for individual desktops without storing their profiles
locally. (remember we have 20,000 users which could fill up a HDD)

Anyway,  There is probably a lot more info here that I am leaving out, and
of course somebody will have better ways of doing things, but this is what
we've come up with so far.

Please share any info or comments,


Again Louis, I'm very interested in your linux method and image transfer
method.  How did you resolve different NIC's in the machines when the image
is on the server? One disk for each type of NIC ...?

More information about the samba mailing list