Visual FoxPro Tips
     
    Using InstallShield Express For Distributing Your VFP Application.
     
    The setup program that came with VFP 5 and 6 worked just fine for me. I took it for granted that my applications would install properly on user's computers. Actually the only complaint I had was from some users who could not find the "large button" when the installation program promoted: "To start installation, click the large button." (some users didn't realize the large computer icon was actually a button!).
     
    As you know the traditional setup wizard was removed from the latest version of Visual FoxPro. Instead VFP 7 includes a special version of InstallShield Express (ISE) for distributing applications. While ISE offers some capabilities that were not present in the older VFP setup program, these new capabilities come at a price. The setup program is now more complicated, takes longer to learn, and does not always work on user's computers!
     
    The following tips will go over some of the issues we had with ISE and how we solved them.
     
    Application Shortcut Launching Installation Program!
     
    The first problem our users reported with ISE is a weird "reinstall" problem. Our default installation includes a "Data" folder with blank dbf files. If users want to use shared data, they can either delete or move this folder to some other location. While this worked fine with the old installer, users had trouble doing this procedure with ISE installations. Once the data folder was removed, every time the user attempted to launch the application, ISE came up instead and attempted to reinstall the software. Of course since the installation CD was no longer present, this lead to even more errors and problems!
     
    The reason for this problems is that ISE creates an "Advertised" shortcut. Whenever this shortcut is launched, it will launch the Windows Installer, which would in turn make sure all the files needed to run your application are installed. If not, it will attempt to install them again before launching the application!
     
    The solution to this problem is to create a normal shortcut. To do this in ISE, in the shortcuts view TYPE IN the target as [INSTALLDIR]...exe instead of selecting it from the drop-down combo.
     
    Suppress a Common InstallShield Error on Windows 2000
     
    Some of our users reported the following InstallShield error when attempting to install an application on Windows 2000 Professional:
     
    "1207: Windows® Installer 1.11.2405.0 found. This is an older version of Windows®. Click OK to continue."
     
    The error message gave users the impression that the software will not run on their "older version of Windows". Fortunately, this is not the case and the message is harmless. If the users click on "OK", installation will continue without further trouble.
     
    The error is caused by version discrepancies with Windows Installer. There is an update to the Windows installer engine(MsiExec.exe) in ISE which is newer than the version of MsiExec.exe included with Windows 2000/SP1. However, Windows 2000 will not allow updating files in the System folder, which causes the error message. Older version of Windows will allow the update and you will not see the error message there.
     
    Luckily there is away to suppress this error message. Here's how:
     
    Go to "Build Your Release" View.
     
    Select the media type to build.
     
    Set the "Suppress Launcher Warning" property to "Yes".
     
    Build the project as usual. The warning message will not appear.
     
    TAKING ADVANTAGE OF INSTALLSHIELD "FEATURES"
     
    One of the advantages of InstallShield Express over the older installer is having three installation options: Typical, Minimal, and Custom. For example, you can setup the Minimum install so it only installs your software .exe file. The Typical install can do a full installation including .exe file, database files, and documentation. While the Custom install gives user the option to decided which they want installed.
     
    To set this up, first you need to create "features". A feature is a building block of the application. For example, the documentation files of your application can be setup as a separate feature. The users can then decide whether to install the documentation files at setup time.
     
    When you start a new InstallShield project, you only have a single feature called "Always Install". All files in this feature are automatically installed regardless of the setup type the user selects. To add your own features, first click on "Features" in the "Organize Your Setup" menu then right click on the word "Features" in the middle pane and select "New Feature Ins". Type the new name of the feature and hit enter. For example, you might add a feature called "Database files" and another called "Manuals".
     
    Next you need to tell InstallShield which features to include in the three setup types (Typical, Minimal, and Custom). Click on "Setup Types" in the "Organize Your Setup" menu. Click on the setup type you want to setup and then simply check features you want to include with the selected setup type. For example, click on the "Minimal" setup and only leave the "Always Install" option checked. Note that you can also customize the text that appears to users when they select each setup type by entering the text in the "Setup Type Description" box.
     
    Now you need to let InstallShield now which files to include with each feature. To do this, select "Files" in the "Specify Application Data" menu. At the top of the middle pane you will see a "Features" drop down box. Use this drop-down to select the feature you want to setup, and then drag the files from your source computer folders to the appropriate place in the Destination computer. To set up the next feature, simply use the feature drop-down to select it and then drag the associated files to the proper location.
     
    What if you want to move a file from one feature to another? In that case click on the "Files and Features" item in the "Specify Application Data" menu. To move a file from one feature to another, first click on the features that currently have that file and drag the file and drop it to its new feature. You can select and drag a single file or a group of files using the ctrl key. To remove a file from setup completely, select the file and hit the delete key.
     
    Another thing you can do with features is to create special shortcuts for files installed with certain features. For example, you can create a shortcut to the User's Manual and only install that shortcut if the "Manuals" feature is installed.
     
    We use features to give users the opportunity to only install the .exe file if the data files are shared on another machine. Also if a user selects "custom" install, he or she can specify whether to install the user's manuals, or data files as well.
     
    This tip is provided to you by Foxy Classes. For more Visual FoxPro tips, click here.
     
     
     
 
   
   
Send mail to webmaster@engineerica.com with questions or comments about this web site.
Copyright 2002-2003 Engineerica Systems, Inc.