-----------------------Install script
code---------------------------------------------------
// Include Isrt.h for built-in InstallScript function prototypes.
#include "isrt.h"
// Include Iswi.h for Windows Installer API function prototypes and
constants.
#include "iswi.h"
#include "isMsiQuery.h"
export prototype Test(HWND);
function Test(hMSI)
STRING szKey, svValue, svPath;
NUMBER nvType, nvSize, nReturn;
begin
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App
Paths\\iside.exe";
nReturn = RegDBGetKeyValueEx (szKey, "Path", nvType, svValue, nvSize);
// The App Paths key contains the folder where InstallShield was
// installed, followed by a semicolon.
StrSub (svPath, svValue, 0, StrFind(svValue, ";"));
if nReturn = 0 then
MessageBox ("InstallShield is installed to " + svPath, INFORMATION);
return ERROR_SUCCESS;
else
MessageBox ("Cannot determine where InstallShield is installed.",
SEVERE);
return ERROR_INSTALL_FAILURE;
endif;
end;