cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Brogers2112
Level 2

BasicMSI project and using Installscript to grab the SetupExe Directory

Hello all,

I have just taken over the position of installation engineer within my company. I am rather new at this, but I have taken to it pretty well thus far.

Right now, I am having difficulty grabbing the SETUPEXEDIR or PACKAGE_LOCATION in order to truncate the path (to get the parent directory) and set the result as a property. Using all of the methods I have found here and elsewhere I seem to only be able to get a null value. Is there a different System Property that I should be using instead, or is it something with my code?

function GetServerPath(hMSI)
STRING szPath, szReturnString;
NUMBER nvBuffer;

begin
nvBuffer = 256;
MsiGetProperty(hMSI, SourceDir, szPath, nvBuffer);
StrRemoveLastSlash (szPath);
ParsePath (szReturnString, szPath, PATH);
MsiSetProperty (hMSI, "SERVERSHORTCUTPATH", szReturnString);
end;
Labels (1)
0 Kudos
1 Reply
Brogers2112
Level 2

Issue Resolved.

Turns out it was the SourceDir property needing double quotes (") around it.

I certainly have that noted for the future.
0 Kudos