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
Copy the Product Version from another exe
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Copy the Product Version from another exe
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
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
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
Re: Copy the Product Version from another exe
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 ?
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 ?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Copy the Product Version from another exe
Dear Morgane,
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
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
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
Re: Copy the Product Version from another exe
Dear Francesco,
Thanks a lot for the information, I will try to get it working.
Thank you for your help!
Thanks a lot for the information, I will try to get it working.
Thank you for your help!
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Copy the Product Version from another exe

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
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
Who is online
Users browsing this forum: No registered users and 131 guests