cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
thaka01
Level 3

Problem with SOURCEDIR when Upgrading Installshield project to IS 2008.

Hello Everyone!
I have tried to upgrade an InstallShield project created on IS 11.5 to install Shield 2008. I have some install shield custom actions.

When i run this part of script on the first custom action i get the real values
SprintfBox (INFORMATION, "New Source Folder","New Source:%s",SRCDIR);
SprintfBox (INFORMATION, "New Source Folder","New Source:%s",SUPPORTDIR);
SprintfBox (INFORMATION, "New Source Folder","New Source:%s",SETUPEXEDIR);
SprintfBox (INFORMATION, "New Source Folder","New Source:%s",SUPPORTDIR);

But when i run the above script on another custom action the value is blank.

I need to have the path of the source.

Tau
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

Perhaps try calling MsiGetProperty to get the value of, say, SETUPEXEDIR?
0 Kudos
thaka01
Level 3

The script i use to get the path is:

MsiGetProperty(ISMSI_HANDLE, "SourceDir", szSourceDir, nvBufferSize);
MessageBox ("SourceDir is:=" + SourceDir, INFORMATION);

MsiGetProperty(ISMSI_HANDLE, "SETUPEXEDIR", szSETUPEXEDIR, nvBufferSize);
MessageBox ("SETUPEXEDIR is:=" + szSETUPEXEDIR, INFORMATION);

The output is the same.
If I use this script on the first custom action I get the right path. Otherwise the values of szSourceDir and szSETUPEXEDIR are blank.

Tau
0 Kudos
RobertDickau
Flexera Alumni

When/where in the sequences are you calling this code? As a sanity check, are you setting nvBufferSize to a large value before each call to MsiGetProperty?
0 Kudos
thaka01
Level 3

Everything work fine on IS 11.5. But after the upgrade to IS 2008 those part of code do not work same as IS 11.5.
I think is part of the way how IS 2008 works with global variables, and how IS 2008 works with many custom action.
Tau

RobertDickau wrote:
When/where in the sequences are you calling this code? As a sanity check, are you setting nvBufferSize to a large value before each call to MsiGetProperty?
0 Kudos
RobertDickau
Flexera Alumni

Correct, the InstallScript-in-MSI architecture changed in InstallShield 12; please see the sticky posts at the top of this forum for links to further details.
0 Kudos