Automate Application Installation

By: Chandan

At this point, you may be wondering what the automated installation of your application (with uninstall capability) has to do with improving the quality of your Visual Basic source code. Well, and many would agree, it's quite simple: you can't afford not to! The time you will save by doing so will easily cover the investment of creating and maintaining the installation set and can be reinvested in activities to improve and enhance your application.
Automation of your application's installation can yield the following benefits:
Simple and consistent install/uninstall process.
Installation can be performed by novice and experienced users alike.
Software meets minimum customer expectations for software installation.
Avoidance of time-consuming support queries caused by incorrect installation.
The Challenge
Having written quality software and built quality binaries, you now have to get them onto your customer's hardware in such a way that they actually work and without breaking any existing software that is already installed. Many share the opinion, that if you don't distribute your software with an automated install set, your chances of success are slim while the chances of losing credibility with your customers is high.
Building good installation sets is not easy and the mistake organisations often make is to leave the creation and testing of the installation set to the last minute. Best advice therefore is to design and build your installation set early in the development life cycle, preferably as soon as you have built the first binaries, and use it to distribute software to your development team.

Ideally, the daily build and smoke test should be extended to include the automated building of the install set.
Note: The effort expended in creating an installation set soon pays for itself many times over and can demonstrate visibility of your progress to your customers if required.
Installation Creation Tools
To create an installation set, you need to use either the Package & Deployment Wizard supplied with Microsoft Visual Basic or another, more sophisticated installation tool. Fortunately there are many such tools to choose from. Take the time to evaluate and try a few tools before you buy one.
Determine Dependencies
Any software component that you build can be dependent on many other components including standard Windows dynamic link libraries, ActiveX components, registry settings or simple data files. To successfully install your application it is necessary to distribute all dependant components, settings and files if they are not already installed with the operating system itself or other required software.
Publish Changes During Development Via Your Installation Set
During the development life cycle of a project, components worked on by different developers will continue to evolve with changes to interfaces and dependencies. To simplify the process of distributing component changes, make use of the installation set the one and only means of publishing component changes and dependencies to your development team.
Do Not Install Old Versions
It is a surprising fact that many developers building installation sets believe it acceptable for their installation set to replace existing files on a customer's machine with older versions. Unfortunately this is rarely acceptable. If you find that your own software will not work with newer versions of a dependant file then you should consider upgrading your software rather than downgrade your customer's.
Support Uninstall
During development members of your team will want to uninstall your software, and so too will your customers occasionally. The uninstall function should ideally remove all trace of your software and restore a machine to the state it was in prior to the installation.
In practice, a totally clean uninstall is difficult to achieve, nevertheless you should at least remove all the files and registry settings you installed unless you know them to be shared files that are used by other software. Supporting uninstallation can be especially beneficial during development of ActiveX components as it enables developers to remove obsolete references from the Windows Registry.
Application Installation Set Testing
Always test your application's installation with target hardware and software. Development machines are often littered with ActiveX components and later versions of libraries etc. than may be installed by default on your customers' target platform. By testing your application installation set with target hardware and software you will soon identify missing dependencies and possible platform differences.

Software
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Software