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

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

Get ProductVersion in BasicMSI Custom Action


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;

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

Any advice?

Thank you.
Labels (1)
0 Kudos
1 Reply
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