[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

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

Get ProductVersion in BasicMSI Custom Action

Hi,

is it possible to get the ProductVersion in a Custom Action using a BasicMSI project?

The ProductVersion is always empty.

Even in an InstallScript the ProductVersion property is empty. I tried the following code:

function MyFunction(hMSI)
// To Do: Declare local variables.
STRING svResult;
NUMBER nvSize;
begin

// To Do: Write script that will be executed when MyFunction is called.
nvSize = 256;
MsiGetProperty (ISMSI_HANDLE, "ProductVersion", svResult, nvSize);
MessageBox (svResult, INFORMATION);
end;


Any advice?

Thank you.
Labels (1)
0 Kudos
1 Reply
DebbieL
Level 17

If your custom action is deferred, you'll need to use the CustomActionData property to obtain the value of a property such as ProductVersion. To learn more, see Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions.
0 Kudos