Computer Services
Stanton/Wilmington Campus 
XP documentation and procedures
ainstall.kix

Background

Ainstall (app install) was historically used by our NT unattended install procedure. It got ugly pretty quickly. It would take an arg on the command like, parsed from a config file, and call a label inside the batch file to do a lot of stuff. Sysdiffs were all in the same dir and supporting files were scattered all over.

Design

Pat, who often gets to clean up my mistakes and/or make my ideas far more elegant, has suggested we make a general installation share point and a separate subdir for each install option and have NT and XP share the same install subdir. If needed, each can detect the installed OS and proceed differently (via applying different sysdiffs or scripts). Our "ainstall" program could then be a lot simpler, like almost just taking an arg and CDing into the proper install directory and calling a standard install.bat file inside each one.

Example:

\\server\install\apps\foobar

Under foobar could be a subdir for winnt and winxp for OS specific packages and in the top of foobar would be an install.bat file that figures out what to do as appropriate.

In addition, I'd like to add error checking to the install. Make our own HKLM reg key and scribble installed packages into there. ainstall would know the package option name from its arg -- like netscape), it would call the install.kix file in the package name's subdir, that package should do some sort of check to ensure everything got installed, and if so, scribble the package name and version into a regkey. If it didn't install, it should attempt some sort of error recovery (like reboot and try again for example...)

reg structure...

HKLM 
  \ Software
    \ DTCC
      \ Packages 
        \ PackageA
          \ Version  
            Date
            Time
            Login Info
      \ ainstall
        \ returnval
          bootcount 
          fresh
          final
          unattended
          

Each ainstall.kix script should have a list of other package dependencies in it and return a status string via the key:

HKLM\Software\DTCC\ainstall\returnval

returnval can be one of

With this in place, hopefully, we can just list packages needing to be installed in any order and list the rules in each install.kix file and the code should be smart enough to figure out what it needs to do. To do this, ainstall needs to maintain status info in reg keys or variables it can check. They are:

package install.kix responsibilities

ainstall responsibilities

The ainstall.kix program itself will be invoked either by the unattended install (where it groks a list of packages out of a file) or by a sysop doing a single package install (where it uses a package list of just one.) This begs the question of what to do if a sysop invokes a package install with dependencies which aren't already installed. In this case, it'd be nice if ainstall would handle the dependencies as well and do the right thing.

So, basically, ainstall.cmd would live in the root of the install share and be invokable via sysop and ainstall.kix would live in the apps directory and be invoked only by the unattended logon process or via ainstall.cmd from the root.

So ainstall.kix needs to handle calling package install scripts in each directory, managing their return values, knowing when to reboot, and knowing when to finish up and clean up.


Main XP Unattended Install Doc Page


Last page update: 02 May 2002
Official URL for this page: http://www.dtcc.edu/cs/admin/xp/ainstall/
Page Maintained by: Ken Weaverling