How to set [ProductVersion] in a custom exetutable - Advanced Installer Community
dilvish
Posts: 14
Joined: Tue Oct 22, 2013 1:58 pm

How to set [ProductVersion] in a custom exetutable

I am install some prerequisites
I am using seach done by a custom executable.
I want to set command line attribute like [ProductVersion].
How i can do this?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to set [ProductVersion] in a custom exetutable

Hello,

I'm not sure I fully understand your scenario. Can you please give us more details(maybe exemplify)? What command line did you meant?
Is the one from the Search done by a custom executable criteria as in the attachment?
SearchByExe.jpg
SearchByExe.jpg (32.9 KiB) Viewed 3137 times
Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dilvish
Posts: 14
Joined: Tue Oct 22, 2013 1:58 pm

Re: How to set [ProductVersion] in a custom exetutable

I want to set current product version of this installer.
As example in application folder i use [ProductName]
Image
I want to use Windows Installer Property to set [ProductVersion] as command line parametr
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to set [ProductVersion] in a custom exetutable

Hello,

If you want to set the [ProductVersion] property as a parameter for your .EXE through the Argument field from the Search done by a custom executable criteria then I'm afraid we do not have support for this.

In order to use the ProductVersion property as a command line parameter for your custom action, you can have a .DLL instead your .EXE and within this .DLL you can set a property based on the return code. You can use a DLL custom action for example, you can create your custom action as a custom action written in C# or a custom action written in C++.

You will further use the property which has been set by the custom action as a install condition. In order to achieve that, you can select the install based on condition option for the Installation behavior from the feature properties.

Please note that this scenario is working for the Feature-Based or Post-install prerequisites.

To launch your .DLL you can go in the “Custom Actions” page and add a predefined Launch attached file custom action with sequence in the Wizard Dialogs Stage after the Searches stage. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”