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


  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?


    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.


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

  3. Just found this page. I know its old. Really old. But still a relavent comment here. On item #1: Never use Dynamic File linking. Just point to the previous release in the release configuration node. Its labeled ‘Previous Package’ under your build. This synchronizes the component codes between the two packages. I use dynamic file links all the time and have never had a problem. But then again, I read the manual.

    Comment by Bill — September 10, 2013 @ 2:06 pm

  4. Can you please share the scripts in archiving the registry entries and loading it back, let us know whether those scripts can be called in the mentioned sequences using Basic MSI project or it applicable only for InstallScript ?

    Comment by Sairam — May 24, 2016 @ 10:26 am

    • Here is some scripting I put into a function “ISI_PrimeReg” that runs Immediate towards the end of the UI sequence – and if running silently it runs early in the Exec sequence:

      //Create PROGRAMFILES Variable
      szRegKey = “SOFTWARE” ^ szProductName;
      nvType = REGDB_STRING;
      RegDBCreateKeyEx ( szRegKey, “” );
      szRegSubKey = “ProgramFilesFolderLocation”;

      nResult = RegDBSetKeyValueEx(szRegKey, szRegSubKey, nvType, PROGRAMFILES,-1);
      if (nResult ERROR – ProgramFilesFolderLocation Directory could not be updated in registry: ‘%s'”;
      Sprintf (szLogMessage, szBuffer, szRegKey);
      ISI_WriteLogFile (szLogMessage);
      szBuffer = “ISI–> INFO – ProgramFilesFolderLocation Directory location ‘%s’ updated in registry: ‘%s’ with key of ‘%s’ “;
      Sprintf (szLogMessage, szBuffer, PROGRAMFILES, szRegKey, szRegSubKey);
      ISI_WriteLogFile (szLogMessage);

      Now here is the code to extract the same variable that I put in any Deferred Custom Action

      // ****************************************
      // ** Retrieves ProgramFilesFolderLocation
      // ****************************************
      szRegKey = “SOFTWARE” ^ szProductName;
      szRegSubKey = “ProgramFilesFolderLocation”;
      nResult = RegDBGetKeyValueEx(szRegKey, szRegSubKey, nvType, szProgramFilesDir, nvSize) ;
      if (nResult ERROR – Unable to retrieve ‘%s’ from registry location ‘%s'”;
      Sprintf (szLogMessage, szBuffer, szRegKey, szRegSubKey);
      ISI_WriteLogFile (szLogMessage);
      goto BypassSQLLoad;
      szBuffer = “ISI–> INFO – ‘%s’ retrieved from registry key ‘%s’ is: ‘%s'”;
      Sprintf (szLogMessage, szBuffer, szRegKey, szRegSubKey, szProgramFilesDir);
      ISI_WriteLogFile (szLogMessage);

      I use the HKCurrentUser section of the registry hive since there is no security restrictions.

      Hope this helps

      Comment by shieldmaster — May 24, 2016 @ 10:18 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: Logo

You are commenting using your 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 )

Connecting to %s

Blog at

%d bloggers like this: