Copy the Product Version from another exe

Got a problem you cannot solve? Try here.
MorganeJ
Posts: 8
Joined: Wed Sep 03, 2014 12:09 pm

Copy the Product Version from another exe

Postby MorganeJ » Wed Sep 03, 2014 2:42 pm

Hi,

I'm new using Installaware.
I searched for several hours the solution on your forum but I was not able to find how to do what I would like to achieve.
I would like to:
- read the Product Version of a "3rd party library" executable (visible in Properties > Details on the explorer on UsedExecutable.exe file)
- copy it inside the Product Version of my installer ($VERSION$ I supposed ?)

How can I do that ?

Thank you for your help,

Morgane

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy the Product Version from another exe

Postby FrancescoT » Thu Sep 04, 2014 9:32 am

Dear Morgane,

it is possible to get the version of an EXE file or a Dll using the "GetFileVersionInfo" WIN API via "Call DLL Function" script command.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647003(v=vs.85).aspx

However, It is not possible to use the value returned from the above function, to assign the Product Version of your installer at Runtime.
This due the fact that "Project Version" must be resolved at Compile Time.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

MorganeJ
Posts: 8
Joined: Wed Sep 03, 2014 12:09 pm

Re: Copy the Product Version from another exe

Postby MorganeJ » Thu Sep 04, 2014 2:24 pm

Dear FrancescoT,

Thanks a lot for your answer.
The GetFileVersionInfo was what I wanted.
About the Compile Time, does it mean that the only way to set the Product Version of my installer is using the compiler variable and hardcode the product version of the exe ?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy the Product Version from another exe

Postby FrancescoT » Fri Sep 05, 2014 11:08 am

Dear Morgane,

About the Compile Time, does it mean that the only way to set the Product Version of my installer is using the compiler variable and hardcode the product version of the exe ?

Not exactly.

I mean that the PRODUCTCODE value must be resolved at COMPILE TIME. Generally this is defined in the project properties of the IA IDE and in this case, its value is hard-coded with the project.

Alternatively, it can be assigned using a custom COMPILER variable and for this purpose, I suggest you have a look at the sample available with the following link ... it demonstrates exactly how to achieve this.
http://www.installaware.com/forum/viewtopic.php?f=2&t=8927

Please note, it is possible to automate the build process using the "MIABUILD" command line tool ...and the tool accepts compiler variables with command line. Please refer to IA documentation for more details.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

MorganeJ
Posts: 8
Joined: Wed Sep 03, 2014 12:09 pm

Re: Copy the Product Version from another exe

Postby MorganeJ » Thu Sep 11, 2014 9:18 am

Dear Francesco,

Thanks a lot for the information, I will try to get it working.
Thank you for your help!

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy the Product Version from another exe

Postby FrancescoT » Thu Sep 11, 2014 11:53 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 131 guests