This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Get ProductVersion in BasicMSI Custom Action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 27, 2014
04:36 AM
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:
Any advice?
Thank you.
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.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 01, 2014
08:44 AM
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.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)