InstallShield Tips and Techniques

June 18, 2007

Top 10 Issues in InstallShield that will bite you!

Filed under: Reference Materials — shieldmaster @ 9:17 pm
  1. Never use Dynamic File linking.  Never, NEVER!  Causes severe problems when attempting Upgrades/Patches.  More posts have been written on how to work around issues caused by this. 
  2. When creating Custom Actions, always name it unique (i.e, ISI_StopServices, ISI_ModifyRegistry) – this will assist you in quickly determining if the C.A. was successful within the MSI logging.  
  3. When referring to the same file numerous times (for example a specific version of a Release Notes) try to make a string value and reference the string value (@Release_Notes).  This will prevent having to locate each and every occurrence when the name changes.
  4. Caution when using SQL within project – default will attempt to uninstall scripts at application removal, which will destroy customer data.  Always leave database data populated – let the DBA handle deletion. 
  5. Issues with XML within project working – most Developers cannot get it working correctly – check the message boards.  If you use XML query to grab values during a AppSearch, expect excessive time delay. 
  6. Have staging for binaries separate from the compile output directories to ensure only specific items are handled within project.  This will ensure that when a build process fails, the last good compile is not incorrectly incorporated into the InstallShield CAB files.
  7. COM Extraction
    1. Concept works most of the time – but must guard against developer hard include of ATL code, and situations which end up having the developer workstation machineIDs incorporated into web server configs.
    2. Never run COM Extract at build time – extract and verify and freeze.  Granted, this runs the risk of developers adding functionality without notifying IS Developer who will need to extract COM again. But when they do this, you may encounter possibly new Microsoft Redistributables need to be included as well. 
    3. Personnally I recommend never do COM extraction.  Use scripting instead to register/unregister all files for ease in specifying sequence.  Yes, you could use properties to select registration – but then need to use DirectEdit on the ISSelfReg table to specify sequence – which applies to both install and uninstall.  Think of long term maintenance aspects – Keep It Simple, Simpleton! NT Services
    1. Again the issues with COM Extract has caused me serious problems with hard includes of ATL code
    2. I cannot easily specify which other Services to stop/start in specific order when I have more than one service – consequently I use scripting to Stop/Start the services when required
    3. I use scripting to create the services and then unregister the service on uninstall.  
  8. Windows Installer “Repair” capability has issues.  Although typically the restoration of a DLL/Executable has been flawless (when used with Static File Linking), the Repair process also will drive in the InstallShield project registry.  In my situation, the registry template carried in the IS Project will have properties (Version, INSTALLDIR, [PropertyValue]) that are reflected within the project registry – I also take customer input from the dialogs and translate that into fields to update the registry after it has been applied to the workstation.  Since the “Repair” process does not present dialogs – so it doesn’t resolve the property values – the resulting registry is essentially corrupt because of missing values.  To resolve, I have created Custom Actions that run before a “Repair” to archive the registry to a file, and another Custom Action that runs after the “Repair” to delete the registry and restore from the archived file. 
  9. InstallShield version 12 has been radically restructured and you may encounter serious issues within your project’s scripts when you upgrade. For example there are the issues that I have encountered:
    1. Global variables will no longer pass information to scripts – but no message is given, either during compile or execution – just blank values received.
    2. Within the “Execution Sequence”, the ability to extract values from predefined directories (INSTALLDIR, SETUPEXEDIR, PROGRAMFILES) will no longer work.  Again, no message is given, either during compile or execution – just blank values received. 
    3. Within the “Execution Sequence”, the ability to extract values from MSI Properties that were defined during the “UI Sequence” will no longer work. Again, no message is given, either during compile or execution – just blank values received. 
    4. Conceptually, the use of the MSI Property “CustomActionData” is allowed – but severe gyrations required to pass multi-value string into the MSI Property during the “UI Sequence” for retrieval during the “Execution Sequence”.  I ended up writing all of the values needed in the “Execution Sequence” to a registry while they are accessible during the “UI Sequence”.  Then during the “Execution Sequence” when I need a value (i.e,., INSTALLDIR), I extract the values from the registry. 

InstallShield Tips and Techniques
InstallShield Consulting
InstallShield Tips and Techniques
InstallShield Consulting

About these ads

2 Comments »

  1. “To resolve, I have created Custom Actions that run before a “Repair” to archive the registry to a file, and another Custom Action that runs after the “Repair” to delete the registry and restore from the archived file.”

    I don’t suppose you could give a little bit more info on how to do that bit?

    Cheers

    Comment by fishd — March 27, 2008 @ 6:50 am

  2. What I did was to create two separate Custom Actions, one that runs early in the UISequence that will write my Application registry to an archive area. This CA used the condition of “Installed”. The other CA was very late in the ExecSequence and took the archived .REG file and loaded it into the registry. This CA also had the condition of “Installed”. I will send you the scripts separately for review.

    Charles

    Comment by shieldmaster — March 28, 2008 @ 6:07 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 33 other followers

%d bloggers like this: