Automatic Updating Fresh Install Kit

Post date: May 21, 2011 2:45:24 AM

UPDATE: It seems the new Google Chrome Alternative installer will not even work if the installer is launched with administrative privileges.  I'm going to modify my scripts to launch Google Chrome installer before getting admin privileges to work around that.

After a long day of testing, I've found what seems to be a reliable method for creating an automatic updating fresh install kit for deploying to new machines.  Normally, I used a simple batch script that called all of my installers using silent install switches.  This worked, but it required that I had to manually update my installers occasionally.  Today, using a program called Ketarin, I found a way to streamline updating my installation packages so that I no longer have outdated software installers.  The whole configuration was not easy to figure out, though the solution I came to is very simple and straight forward.

1. Download Ketarin 1.6 BETA 6

In order for this to work, I had to use a current beta of Ketarin 1.6.  The 1.5 final could not read UNC paths correctly, causing a crash.  As this article ages, the BETA may become final and newer versions may be released.  Just remember you need at least version 1.6 for this to work, assuming no bugs reappear.

2. Extract Ketarin to your local drive and launch the Ketarin.exe

3. Configure Ketarin with your application installers. 

You should be able to find most of your software from the online database.  Here's my pick of apps.

NOTE: The "Sun" Java installer is actually "Oracle" Java.  Name just hasn't changed for this particular installer.  I also added iTunes to my list once I found a way to silent install it.

4.  Fix Google Chrome

After searching through the database, I noticed that all of the Google Chrome installers used stand alone versions of Chrome that would not auto-update if it was launched from an elevated prompt.  I finally came across Google's "alternative" installer that seemed to work if it was run with admin privileges or normal user.  I used Downthemall Firefox addon to capture the download URL for the alternative installer, and I created my own Google Chrome package. 

To make things easier for everyone else, I created the package "Google Chrome Standalone - supports updating [works with an elevated prompt]" package and it should now show up in the Ketarin database.

5.  Embed silent install switches to all installers.

In order to get Ketarin to install software, I had to add silent install switches to its launch configuration.  This example shows Adobe Flash.  You will have to seek google advice for finding the correct silent install switches for your installers.  Double-click each app that you need to edit.

This example shows Adobe Flash and its silent installer.

 Select "Save to file" option and give it a name so that the installer saves to the current folder.

Go to the "Setup" tab and click the "Add Instruction" button and go to "Start Process."

Set the launcher to "{file}" variable including the double quotes.  Also include your silent install switches in the arguments.  The Adobe Flash installer's silent install switch is -install.

6.  Export your settings as an XML file as apps.xml.  Save it to the Ketarin folder.

7.  Create batch scripts.

Be sure to edit these scripts for your environment.  The prepare script adds my network drives to the registry so that a security prompt will not be shown for each application Ketarin tries to install.  Any network source that you plan to install from must be added to the prepare script so the installers will not prompt you to confirm the process.  If you do not use a network drive for deployment, these registry entries will not be needed.  They are only required if Windows does not completely trust the installation source.  Even when launching with Admin privileges, the security prompt will show without these registry mods.

You will not have to modify any settings in Ketarin if you use my apps xml file - I called everything using variables.  However, if you want to include your own software in Ketarin, you will have to configure that software separately with silent install switches (see step 5).

Download Scripts - There is a total of 3 batch scripts, 3 xml files, and 7zdn.exe.

8.  Copy the "Prepare.bat", "apps*.xml", 7zdn.exe, and "Ketarin_settings.xml" to the Ketarin folder. 

Feel free to move the other batch scripts (.cmd/.bat) where ever you want - they will work as long as you have provided the correct location to the files they call.

9.  Test scripts

10.  Tweak

Notes:

Work machine = the machine that you use to create the install kit/business computer.

Receiving machine = the machine that you are deploying software on to/client's computer.

When launching Ketarin into the standard GUI (EG, with no switches), it creates a database in %appdata%\Ketarin or %temp%\Ketarin (depending on the OS).  However, when Ketarin is called with the /database switch, it will read or create the database that you specify.  The code in my batch scripts specifically call the database from the fresh installation kit source and no database is created on the receiving machine - it is kept only on the work machine.  This way there is no remanance left on the receiving machine. My script creates a database in %temp% for the installation procedure, but removes it afterwards so no remanence will exist on the machine.  I had to change my original method, because if a machine only has read access to a network drive, creating a database would not work.  I opted for creating one on a source that the receiving machine will always have write access to (itself).

When creating your install kits from your work machine, be sure to delete %appdata%\Ketarin or %temp%\Ketarin.  The standard GUI only reads the database from these locations, and it may be confusing why your edited files aren't taking affect.