Distributing Your Application

You have just created that killer application and finally finished that help file, and its time to distribute your application, what are you going to use? If you are using VB5/6 you have the Application Setup wizard now call the Package & Deployment wizard in version 6 of VB. If you are using VC++ you have the free version of InstallShield. But lets face it, none of them are up to par. If you need a basic set up then the above install programs will do fine, but what if you have a license agreement that you need to display before the program installs. Or what if you have a readme file that you want to display after the setup is done. What if you want to use your own logo and messages!

If you use VB you know that its almost impossible to reconfigure the Setup wizard. However if you would like to give it a try you can take a look at the four part "Customizing Your Setup" articles below. But I think my time should be spent on writing programs not trying to reconfigure a setup program, especially since someone else has already do it for me!

Customising Your Setup - Part 1
Customising Your Setup - Part 2
Customising Your Setup - Part 3
Customising Your Setup - Part 4

This month we are going to look in to installation programs. We will look at 4 free installation programs 3 are totally graphical and the 4th has both graphical and script interface.

Syllabus

Week 1 - Setup Generator
Week 2 - NetroSetup
Week 3 - GKSetup
Week 4 - Inno Setup/Dependency Files

 

Setup Generator  Day 1

Setup Generator is the first installation program we will be taking a look at. This freeware version is only 221kb in size and packs a nice little punch. You can download the software here. The Setup Generator has 6 steps, I should say 6 easy steps. The most you will have to complete is 3 maybe 4 of these steps.

General

When you first load Setup Generator it will look like figure 1. When you click on 'Project" click new and put the name of your setup program in the input box and click ok.

Setup/Output

The output directory is where the setup file will be stored once you have finished the configuration. If your exe program is located in "C:\My Program" then you can place your output file in "C:\My Program\Setup".

Setup Executable

This is the name of your setup program, to keep the confusion down I would make the name the same as your application and put setup at the end (MyProgramSetup.exe).

Application Name

The name you named your application.

Windows Caption

This is the message that will be displayed when the setup starts.

Options

The above is all you need for the General portion of the setup configuration, however if you have a logo that you would like displayed during the installation process then you can add that where it says "Bitmap on the left". You can at this time chose which language you want the installation to be in, you have your choice of 30.

You have completed step 1 save your program before moving to the next step.

 

Setup Generator  Day 2

At the Beginning

You only have two selections both are optional figure 2.

Show Background

This is the text that will be displayed at the top left (Header) and the bottom right (Footer) of the setup screen. You can put the name of your application in the header text and copyright and company information in the footer text.

You can also add your license file if you have one, in the "License File" text box.

That's it you have now complete step 2. Once more step and you can create your setup file.

 

Setup Generator  Day 3

Files

This step is the most important because you're selecting the files that you need to run your application figure 3.

If you have made a subdirectory of only the files that are needed for the application, your exe file your help file any icons or reports that you have created should all be copied in to the subdirectory. If you do not have a subdirectory then create one (believe me it will be easier later). Then select that directory where it says "Source Directory. All the files in that directory will be processed during the setup configuration process.

Additional Files

This is the area where you add any DLL or OCX files, also know as dependency files. Since DLL and OCX files can sometimes be shared by other programs never just over write these files. When adding the file either select the "skip" under the 'If File Exist in Destination" box or select "Overwrite if newer". Knowing which dependency files you need will be covered at the end of the tutorial.

Note: All DLL's and OCX file should be copied to the Windows\System Directory, so make sure when adding these files under "Destination Directory" you select the "WINSYS PATH".

That's it for step 3 at this point unless you wish to add a short cut to you setup your done! You can click the make button and the program will process all the information and create your setup file. At this point you will see way I said it would be easier to create a sub directory and only place the files needed to run your program. If you select your program directory then all the files will be included in your setup program, files you don't need like the vbp, vbw, frm all of which are included in the exe file.

 

Setup Generator  Day 4

Finial Step

The reason I decided to put the last three steps together is because they are not necessary to create your setup program. They are move like options.

INI/Registry

If you have an INI file you can add it to the setup by adding it in the INI files area. You can also add Registry information under the registry tab.

Shortcuts

If you wish to add a shortcut to your program that will be displayed in the program menu this is the place to do so. You can add your exe file and your help file and any file you what your user to have access to in the "Programs" menu. figure 4.

At the End

This is the last step and is used to add any read me files and launch your program once the setup is complete. figure 5

You can add any final message in the "Final Text" and add your readme file in the "Find Readme File", make sure you check the box that says, "Show View Readme" checkbox. You can also elect to run your application after setup is done by clicking the check box "Show Run installed application".

Conclusion

That's it, you have just created a setup program for you application using Setup Generator by Geente. See how quick and painless this was. I gave Setup Generator 3 our of 4 starts. They have a Pro version of this software for $49us which for the features is cheep! Plus it only adds about 32-35k to your installation program.

 

NitroSetup Day 1

NitroSetup is our second installment on installation and setup programs. NitroSetup takes 5 steps and like Setup Generator it only requires 3 steps to complete a setup program. NitroSetup is developed by Nitrobit Software and is a 2.1MB file and can be downloaded here. However unlike Setup Generator the setup program is only in English and German.

Startup Page

When NitroSetup first launches it looks like figure 6. Under Project Name click the change label on the right and name your program.

Displayed text

Under displayed text you can write your companies slogan copyright information and your software's version number.

You have completed step one you should save your project before moving to step 2.

 

NitroSetup Day 2

Adding Files and Folders

At this point we need to add our files and folders if necessary. To add a file just click the "Add File..." label, then find the file that is to be added to your program. If you have setup a subdirectory where you put just your program files then you can use the "Add Folder" or "Add Tree" and you will not have to manually add each file. figure 7

System Files

Make sure that all your DLL and OCX files are add to the system folder. Once again if you created a folder for your runtime files then this will be an easy process.

If you want your program and help file to have short cuts then double click the file. Also check any files you want removed during the uninstall process.

The one thing I liked about this program is it gives you control over what gets uninstalled and what doesn't. And adding short cuts is as easy as double clicking on the file.

We have now completed step 2 while we can by pass steps 3 &4 and move one to step 5 we will go over all the steps.

 

NitroSetup Day 3

Registry and Commands

Since step 3 & 4 are optional I have decided to put them together. Most application do not require adding to the registry or having command line arguments. However you never know when you may need to.

You can add a key, add a string to the registry during step 3. You can also generate random numbers which can be used as a installation key. figure 8

Here you can add commands like the ones to be used at DOS-prompts. A dialog box will be opened to ask you for a command line. To avoid problems with long file and path names always insert path parameters in quotation marks. All commands will be executed after the files are installed, so you can already access them in their installation place figure 9. The following strings will be expanded before executing a command:

 

NitroSetup Day 4

Final Step

This will be our final step before you create our start up file. figure 10 If you want an uninstaller (I'm sure you do!) then click the "Include Uninstaller" check box. This is the place here you can add your licenses agreement and your logo to your installation process. Once you had done that you can click on the Test screen and see if everything is the way you wanted it.

Now click on the "Finish" button and a dialog box will pop up prompting you to select a directory where the setup.exe file will be copied to. That's it you have just completed your setup file. Just like Setup Generator it was quick and hopefully painless.

I gave NitroSetup 2 1/2 stars, the main reason was the help files did leave a little to be desired.

 

GK Setup Day 1

GK Setup has 9 steps and like the other installation programs you only need 2 to 3 to be able to create a setup file. When GK first loads it looks like figure 11. The first thing you should do is set up your options. So under Options select "General Options", here you can setup the temp directory, disk spanning options, language (the setup will be written in) and how the setup.exe will be named. Like NitroSetup it only comes with 2 languages, English and German you can however download other languages. You can download GK Setup here.

General Information


General settings - This is where you put the name of your program, the company name, the version number and the default installation directory.

Visual - Here is where you set the background color and any logos and text messages to be displayed during the installation process.

Features - Here is where you add an uninstall option to your program as well as other dialog boxes like license agreements, readme file, setup types, user information etc.

Language - Here is where you select the language that the installation program will be displayed in. As I stated earlier you only have 2 options, English and German.

You have now completed step 1, you should save your program now before you proceed to step 2.

 

GK Setup Day 2

Groups and Files

The one thing you may have noticed about all the installations programs thus far is the need for sub folders. Once again it would be a good ideal that you add a folder to hold just the files needed for you application, as well as a folder for the DLL and OCX files.

If you have done this then all you have to do is select those directories under the "Application Files directory" and the "System Files directory".

That's it for step 2. If you'll notice some of the steps are grayed out see figure 12. This has to do with the options you selected under the "General Information" under the "Features" option. figure 13. If you did not select the license, logo and setup types you can create a step file from the information we now have. You may also note that step 5 is not available in the freeware version of the software.

 

GK Setup Day 3

Step 3 to 6

As stated earlier not all of the step will be available when you go through the processing steps. So I though I would group the rest of the steps in groups of 3 (remember step 5 is not included in the version).

Setup Type

Here is where you select the Setup Type option figure 14. You can have 1 or 3 options for you user to select. However unless you have different version of you software on the same disk you will only need to select the first option. This is way this option is grayed out unless you select the "Setup Type" under "Features" in "General Information".

Licenses/Readme

Where is where you add your licenses and readme file to your installation program figure 15. You have the option of making your user scroll down to view the full license agreement.

User Information

You can use the option to save user information like, company name, user name and serial number in the system registry. figure 16

That's it we have now completed steps 3 - 6.

 

GK Setup Day 4

Steps 7 - 9

We will be completing the rest of the setup installation steps.

Startup Menu

Here is where you set up any short cuts you want add to your installation program. You can select default or custom icons. You basically set this up the same way you setup your short cuts on your desktop. figure 16

Registry/INI

If you have any registry or INI entries here is the place to add them. figure 17

External Programs

If you want any external programs to run after the installation is compete or before the uninstall program is run, this is the place to add that information. figure 18 

For example if you want to give your user the option of launching your program after the installation is complete then you can add your program in the "Execute after Setup".

Building the setup

Building the setup is just one click away. Select the build under the Build menu and the program will compile your setup. Once its done all you do is click the run setup to test your setup program and that's it!

 

GK Setup Rap Up

As you can see GK Setup has several more steps then the other installation setup programs. However it does give you more control over your setup and uninstall program, this is what I liked about this program. I was going to give it 3 1/2 starts but because the GK logo shows up all through the installation it lost a 1/2 star, but it is free so their logo is the cost you pay for using the free version. So GK Setup gets 3 stars.

You can purchase the Professional version for $149.00us

 

Conclusion

As you can see all three of these programs have similar options and work about the same. But read the license agreements before you use the programs. Even though they are freeware both GK Setup and NitroSetup do have some restrictions.

 

Inno Setup Day 1

This will be the my finial review of free installation and setup programs, as they say I've saved the best for last! Inno Setup is a little different then the other setup programs in that it uses a script, you can get Inno Setup here. However you can use the setup wizard which has 5 steps and has a graphical user interface. When Inno Setup first launches it presents you with a dialog box (figure 20). You have a choice of opening an existing script, creating an empty one or using the wizard.

Creating a New Script 

When you select this option a dialog box will popup like figure 21. At this point you can continue with the wizard or select the option to create an empty script file.

Application Information

Here is where you enter the name of your application, application version, company name and company web site. see figure 22.

Application Directory

Here is where you select the default program directory and the directory name (figure 23). This is usually the same name as the program. However some people use the name of the company for the default directory name and the name of the application as the subdirectory. You can also give the user the option of changing the directory from the default directory.

Application Files

Here is where you add all the files needed for your program to run. ( figure 24). Once you add the files, double clicking on that file or selecting edit you can list the destination of that file. (figure 25) If it is a normal file then it should be in the application directory, if its a DLL or OCX then it should go in to the window system directory.

The one thing I didn't like about this program is that the CopyMode (more on that later) automatically defaults to always overwrite file. And as you know DLL and OCX files can play havoc on your system if an newer version is replaced by an older one. However this can easily be changed when the setup wizard finishes.

You will also have the option of letting the user launch your application once the installation is done.

Application Icons

This option will allow you to add icons to your startup menu and your desktop. You can also create internet short cuts and and uninstall icons. (figure 26)

Application Documentation

You can use the option to add your license agreement as well as messages to be displayed before and after the setup is complete. (figure 27)

That's it you have completed the setup wizard and when you click the finish button you are prompted with a message box asking you if you want to compile the script, say no. Your script should look like figure 28.

 

Inno Setup Day 2

CopyMode

Remember when I said that the default CopyMode when adding files was to always overwrite, you can now change the default. You can use one of the CopyModes options below.

normal
The most common option. If the file already exists on the user's system and is a newer version (determined by the file's version info) than the file being copied, the user will be asked whether the file should replaced or not. If the existing file does not have version info but the file being copied does, the existing file will be overwritten without the user's confirmation.

onlyifdoesntexist
Only try to copy the file if it doesn't already exist on the user's system.

alwaysoverwrite
Always overwrites the existing file, even if the existing file is a newer version than the file being installed. Never use this on shared system files!

alwaysskipifsameorolder
Same as normal, with the exception that the user is not prompted to replace the existing file. When this mode is used, newer existing files are never replaced.

2 Thumbs Up

When I first started looking for installation programs I have to admit that GK Setup was my favorite, then I came across Inno Setup. This program get 4 out of 4 stars! Its quick, easy to use and has a good help file. I love the control this program gives and it makes creating scripts easy. If you don't think writing scripts with this program is easy try Installshield!

One of the features I liked is templates. It took me about 1 hour to setup several templates but it only takes about 2 minutes to create installation setups now. It saves a lot of time since I don't have to manually add all the DLL and OCX file, which is what you have to do when you use the startup wizard. Since you are using scripts you do not have waste disk space creating subdirectories to hold your system and program files.

To top it all off its Free, even for commercial use!

 

Dependency Files Day 1

The first 3 programs require you to add subdirectories to house your program and system files. System files also known as dependency files are needed with VB and MFC programs. With MFC its fairly easy at the very least you need the MFC42d.DLL and MSVCRTd.DLL. You can find a list of redistribtable files for VC++ on the CD under Common\Redist\Redist.txt.

However for VB it's a little different. At its core VB requires it runtime files then if you use any ActiveX controls or any control that is not on the General tool bar when you first load VB requires a sepearte DLL or OCX file. So how do you know what files are needed for your program? While the Applicaton Setup Wizard/Deployment Wizard may leave something to be desired for creating a setup program, they can be helpfull in giving you a list of your dependency files.

 

Dependency Files Day 2

Generating dependency files

Both VB5 and VB6 has an option to create a dependency file instead of creating a setup application.

Using VB5 select the Application wizard select your project and under the "Select Project Options" select "Generate Dependency File Only". Keep clicking the Next button until the "Finish" button appears, click the finish button and a file will be created in the your programs directory called appname.dep.

Using VB6 select the "Package and Deployment Wizard", select your project and click on "Package". The wizard will start and will ask you to choose a packaging script select the default (Dep File 1). Since the rest of the dialog boxes are default values so you can click the finish button, and a dependency file will be created in your programs directory named appname.dep.

However there is a program that you can use for VB5/6 and VC++, its called "Dependency Walker". While this is not an easy program to understand it will tell you what files your program needs to run. You can fine it on Microsoft's web site. Even though its under the Redistributing Microsoft Visual C++ 6.0 Applications you can use it with any program. However if you use VC++ this is a good site on distributing your programs.

Dependency Walker

 

Dependency Files Day 3  

Reading the Dependency file

Below shows what a dependency file looks like. You will also notice some other information you will need when you use the scriptless programs. Some DLL and OCX files need to be registered during installation, the dependency file not only lets you know the location the DLL or OCX should be copied, but it also lets you know if it needs to be registered.

[MSVBVM50.DLL <0009>]
Register=$(DLLSelfRegister)
Dest=$(WinSysPathSysFile)
Date=5/11/1998
Time=20:01:00
Version=5.1.43.19
CABFilename=MSVBVM50.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=MSVBVM50.inf
CABRunFile=
Uses1=

[ASYCFILT.DLL <0009>]
Register=
Dest=$(WinSysPathSysFile)
Date=5/19/1997
Time=8:08:08
Version=2.20.4118.1
CABFilename=AsycFilt.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=AsycFilt.inf
CABRunFile=
Uses1=

[DAO350.DLL <0009>]
Register=$(DLLSelfRegister)
Dest=$(MSDAOPath)
Date=8/7/1999
Time=16:33:50
Version=3.51.1027.0
CABFilename=MSDAO350.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb5
CABINFFile=
CABRunFile=MSDAO350.exe -Q
Uses1=MSJtEr35.dll
Uses2=MSJInt35.dll
Uses3=MSVCRT40.dll

As you can see the MSVBVM50.DLL needs to be registered and needs to be copied to the Windows\System directory. As for the ASYCFILT.DLL it doesn't need to be registered but it should also be copied to the Windows\System directory. However you may notice the DAO350.DLL should be copied to a different directory, it should be in the Program Files\Common Files\Microsft Shared\Dao.

So using the dependency file you can get a list of all the files that are required for your program as well as what location they needed to be copied too.

Conclusion

This ends my look at installation setup programs, I hope this has been informative. I by no means have came close to reviewing all the free and commerical installation setup programs there. But below is a couple of web site you might want to check out if the four I did review was not enough for you. If you check out any please let us know what you think of them.

http://www.thefreecountry.com/developercity/setup.html
http://www.freedownloadscenter.com/Programming/Setup_Utilities/
http://locatesoftware.com/Setup-Tools.htm

 

 

Copyright © 2001 - Marietta Crockett 3-4
Disclaimer