image provider

Application Installer


This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.

This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.

Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.

Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.

You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.

Please do not email me about this project without reading the disclaimer above.

There are commercial tools like InstallShield, Wise and InstallAnywhere to wrap your MASM (Microsoft Assembler), C++ and Java applications up to make them easy to install on Windows. These schemes have the following drawbacks:
  1. They are outrageously expensive. They are too expensive for hobbyists or small businesses.
  2. They are hideously complicated. They use ugly scripting languages that grew like Topsy without plan.
  3. It is hard to do anything out the ordinary. You need clumsy mechanisms to insert your stub code.
  4. They are not as smooth as they could be for the end user, particularly in picking directory names. It should be very easy to take the default suggested name, but on a different drive. It should be easy to take the default suggested name, but nested in some other directory. It should allow the user to select from some most common possibilities, e.g. "J:\Program Files\mindprod\" or J:\mindprod\.
I propose writing a set of Java installer classes. You can then use them to whip together a custom install program. You don’t need to learn some arcane script language. If you need to do anything out of the ordinary, you have the full power of Java at your disposal.

The classes would handle such things as:

You would need to compile your program with a native mode compiler so that you have all the standard java classes you need embedded in an exe. Further, you wrap any other files you need with the installer in a self-extracting PKZIP exe. You don’t want to rely on a working JVM (Java Virtual Machine) being previously installed.

Alternatively, you insist that a JVM and your installer be preinstalled. It then unpacks and installs compact download application packages.

Unfortunately the installer will likely be fatter than the app you are trying to install. Perhaps some advanced Java compilers or optimisers could help put the installer on a diet.

The first version would focus on Windows 95/98/NT. Later you might add classes for other platforms. Ideally your mainline program install would be more or less platform-independent.

Start with a very simple installer and gradually add features. This will keep you from being overwhelmed by detail. At each stage you will have something useful other can test. They will provide you feedback on which features are most important to add next.

  1. Use the ZIP classes to unpack a zip file to a fixed directory tree.
  2. Install an icon on the desktop to fire up the application.
  3. Install an item in the start menu to fire up the application.
  4. Dynamically configure to allow choice of drive.
  5. Dynamically configure to allow choice of directory.
  6. Allow reinstallation of the icons and menut items if they are damaged, without disturbing anything else.
  7. Split files into program and data files, so can upgrade without disturbing data files.
  8. Run a custom install program after files are in place.
  9. Allow changes/additions to the registry.

The other half of installing is maintaining an application with automatic updates. See the Automatic File Updater project.

sanity checker

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number