Migrating from InstallShield Professional 6.x

InstallShield 2014

When you upgrade an InstallShield Professional 6.x installation to InstallShield 2014, note the following:

You can quickly convert a script that uses a program...endprogram block to an event-based script that calls all appropriate event handler functions except the user interface and file transfer functions. For details, see OnShowUI.
The new simplified model for Internet installations eliminates many of the Ether object’s methods and all of its properties and subobjects (while providing InstallScript enhancements that let you handle any Internet-specific requirements). If your Internet installation used any of these properties and methods, see Replacing Obsolete Properties and Methods.
Installations created in version 6.x contained a number of automatically created string entries; the installation used these string entries to get information. These string entries were redundant—they contained the same information contained in the Project Settings property sheet. InstallShield 2014 simplifies matters by allowing the information specified in the project settings to be used at runtime.

Note that using this information is not required; you can continue using your existing string entries as before by simply leaving them intact in your project.

If you want your migrated installation to automatically use the information from your project’s Project Settings property sheet, delete the following string entries from your project:

COMPANY_NAME

PRODUCT_NAME

PRODUCT_KEY

PRODUCT_VERSION

TITLE_CAPTIONBAR

FOLDER_NAME

TITLE_MAIN

Also, update any script code that may be using one of these string entries to use the new corresponding system variable instead, as shown in the following table:

String Entries and Corresponding New System Variables

String Entry

System Variable

COMPANY_NAME

IFX_COMPANY _NAME

PRODUCT_NAME

IFX_PRODUCT_NAME

PRODUCT_KEY

IFX_PRODUCT_KEY

PRODUCT_VERSION

IFX_PRODUCT_VERSION

TITLE_CAPTIONBAR

IFX_SETUP_TITLE

FOLDER_NAME

IFX_PRODUCT_NAME

TITLE_MAIN

IFX_SETUP_TITLE

Note that you can remove only a subset of these string values if you want some values to be read from the string entries and some to be read from the project settings. If you retain any of these string values, be sure to modify them as required, rather than changing the unused project settings; in particular, when creating an update installation, be sure to update the value of the PRODUCT_VERSION string entry if it exists.

If your installation uses an event-based script and you have overridden the default OnSetUpdateMode event handler code, a message such as the following may be displayed at run time: “The installed version of the application could not be determined. The setup will now terminate.” If this error occurs, add code that manually sets IFX_INSTALLED_VERSION during the OnSetUpdateMode event. For sample code, see the default code that is included in the OnSetUpdateMode event of a new InstallShield 2014 InstallScript project.
If your installation uses an event-based script and you have overridden the default OnFirstUIBefore event handler code, you must replace the following code (from the 6.x version of OnFirstUIBefore) in order to install files to the appropriate default location:

TARGETDIR = PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;

with the following code (from the new default OnFirstUIBefore code) to set TARGETDIR:

/* Handles both end users with administrative or power user privileges and

end users without such privileges. */

if ( ALLUSERS ) then

    TARGETDIR = PROGRAMFILES ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME;

else

    TARGETDIR = FOLDER_APPDATA ^ IFX_COMPANY_NAME ^ IFX_PRODUCT_NAME;

endif;

 

/* Handles both standard and multi-instance installations. */

if( MAINT_OPTION = MAINT_OPTION_MULTI_INSTANCE && MULTI_INSTANCE_COUNT > 0) then

    nLoop = 1;

    svDir = TARGETDIR;

    while(ExistsDir(TARGETDIR) = EXISTS)

        NumToStr(szTargetDirAppendix,nLoop);

        TARGETDIR = svDir + szTargetDirAppendix;

        nLoop = nLoop + 1;

    endwhile;

endif;

If you are using a procedural script (one with a program…endprogram block), you need to update the code in which you set TARGETDIR in order to set the default target directory appropriately for users without administrator privileges.

If your installation uses an event-based script and you have overridden the default OnMaintUIBefore event handler code, and during uninstallation you want to remove all features including those that are not listed in the media but only in the log file (see FeatureRemoveAllInMediaAndLog for more information), then you must replace the following code (from the 6.x version of OnMaintUIBefore):

case REMOVEALL: ComponentRemoveAll();

with the following code (from the new default OnMaintUIBefore code):

MediaGetData( MEDIA, MEDIA_FIELD_MEDIA_FLAGS, nMediaFlags, szIgnore );

 

case REMOVEALL:

    /* Properly handles updating. */

    if( nMediaFlags & MEDIA_FLAG_UPDATEMODE_SUPPORTED ) then

        FeatureRemoveAllInMediaAndLog();

    else

        FeatureRemoveAllInMedia();

    endif;

If you are using a procedural script that supports script-based uninstallation you need to update your call to ComponentRemoveAll appropriately.

If your script calls RegDBSetItem to alter the registry entries that are created by MaintenanceStart (or DeinstallStart), and it makes those calls to RegDBSetItem in an event handler that is called before the OnMoved handler (for example, OnMoving or <feature name>_OnInstalled), you must move those calls to RegDBSetItem. MaintenanceStart is now called in the OnMoveData event handler’s default code, whereas previously MaintenanceStart was called automatically immediately after the maintenance/uninstallation feature was installed and before any other features were installed.
The InstallShield Professional 6.x default event handler code included the following lines in both OnFirstUIBefore and OnMaintUIBefore:

SetStatusWindow( 0, "" );

Enable( STATUSEX );

StatusUpdate( ON, 100 );

In InstallShield 2014, this code has been relocated to the default OnMoveData event handler code, so you have the following options:

If you have not customized this code, you do not need to do anything because the redundant calls will not cause a problem. You can safely remove this code from OnFirstUIBefore and OnMaintUIBefore if you want to avoid code duplication.
If you have customized this code and you want these customizations to apply regardless of what user interface (UI) event is called, you should remove the code from OnFirstUIBefore and OnMaintUIBefore, then override the OnMoveData event and place the customized code in place of the default code.
If you have customized the code and you want specific code depending on what UI event is called, you should override OnMoveData, comment out the default code, and continue to use your existing code. Note that in this case, if your installation supports updating you may also want to customize OnUpdateUIBefore.
The 6.x default event handler code included the following commented-out code in the OnFirstUIBefore and OnMaintUIBefore events:

// TO DO: if you want to enable background, window title, and caption bar title

// SetTitle( @TITLE_MAIN, 24, WHITE );

// SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION );

// Enable( FULLWINDOWMODE );

// Enable( BACKGROUND );

// SetColor( BACKGROUND, RGB( 0, 128, 128 ) );

If you activated this code and would like to provide a consistent UI experience regardless of what UI event is called, you can remove this code from OnFirstUIBefore and OnMaintUIBefore and then override OnShowUI and customize the code appropriately.

Many Windows API functions are declared in included header files (.h files) in InstallShield 2014. If any of these functions are also explicitly declared in your script code, do one of the following:
Remove your function declaration and use the declaration provided by InstallShield Professional.
If you are creating a script that needs to be compilable in both InstallShield 2014 and earlier versions, surround your declaration with code like the following:

#if _ISCRIPT_VER < 0x700

prototype ...

#endif

You may also need to update code that calls a Windows API function, if the declaration defined by InstallShield Professional is different than your declaration.

In order that the end user interface flows smoothly, by default the installation initialization dialog box remains displayed until the script displays a dialog box. To close the installation initialization dialog box, call Disable(DIALOGCACHE) or any dialog box function.