This program essentially circumvents the single-installation mechanism of 
InstallShield. It does a very simple job, namely renaming the registry key
and DISK1TARGET to a unique GUID (which can be passed to the extension) 
during install, and renaming it back during uninstall. 

Properties of this extension:

-guid      : contains the PRODUCT_GUID of your InstallShield project. It is 
             stored in the constant PRODUCT_GUID.
-hwnd      : contains the handle of the install's main window. You can 
             retrieve this handle using GetWindowHandle(HWND_INSTALL) and 
             converting it to a string using the 
             Sprintf(svString, "%li", nvHandle) call.
-tguid     : contains the target GUID you want to switch your install to. 
             In previous versions, this parameter did not exist, and hence
             is not required. It gives you flexibility, and it is 
             recommended that you use it.
-uninstall : specifies that this is an uninstallation. In this case, 
             -guid and -tguid are reversed. 


Instructions:

The solution requires that the executable be stored in a location that is
least affected by permissions. My recommendation is the directory
containing DISK1TARGET (i.e. PROGRAMFILES ^ "InstallShield Installation
Information"). The executable should be copied either using a filegroup in
its own component, marked as SHARED, LOCKEDFILE, or by using the below 
code:

    VarSave(SRCTARGETDIR);
    SRCDIR = SUPPORTDIR;
    ParsePath(TARGETDIR, DISK1TARGET, PATH);
    Disable(LOGGING);
    XCopyFile("GUID.exe","GUID.exe", COMP_UPDATE_VERSION | SHAREDFILE);
    Enable(LOGGING);
    VarRestore(SRCTARGETDIR);

The executable can be named anything, but preferably should be marked as
HIDDEN using SetFileInfo to avoid accidental discovery.

This solution requires at least two events defined, OnAbort (during
Maintenance Mode) and OnEnd.

function OnAbort()
STRING svGUIDCmdLine;
begin
  if (MAINTENANCE) then
    Sprintf(svGUIDCmdLine, "%li", GetWindowHandle(HWND_INSTALL));
    svGUIDCmdLine = "-guid\"" + PRODUCT_GUID + "\" -hwnd\"" + 
                    svGUIDCmdLine + "\" -tguid\"" + szNewGUIDValue + "\"";
    ParsePath(svGUID, DISK1TARGET, PATH);
    svGUID = svGUID ^ "GUID.exe";
    LongPathToShortPath(svGUID);
    LaunchApp(svGUID, svGUIDCmdLine); 
  endif;
end;

function OnEnd()
STRING svGUIDCmdLine;
begin
  Sprintf(svGUIDCmdLine, "%li", GetWindowHandle(HWND_INSTALL));
    svGUIDCmdLine = "-guid\"" + PRODUCT_GUID + "\" -hwnd\"" + 
                    svGUIDCmdLine + "\" -tguid\"" + szNewGUIDValue + "\"";
  ParsePath(svGUID, DISK1TARGET, PATH);
  svGUID = svGUID ^ "GUID.exe";
  LongPathToShortPath(svGUID);
  LaunchApp(svGUID, svGUIDCmdLine); 
end;

This solution may be extended to test for reboot status in OnEnd and only
launch then when a reboot is not required. In that case, the solution
should launch in OnRebooted.

There's ONE cosmetic problem. The Add/Remove applet will receive focus 
back after the IS code is launched. Currently a possible lock file can be 
created, but I am not sure if I want to go that route.

There is NO warranty whatsoever attached to this executable. Support can 
be reached via guid@eons.net.
