akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

set file version and product version using dll file

Hi,
We have created one Bootstrapper project in which we are going to set version field of product details page dynamically at run time, but we found that whenever we set version it sets both file version(major.minor.patch.0) and product version(major.minor.patch). Which is not our requirement, we have to set different file version and different product version dynamically at run time.
How would you recommended to manage this?
For your reference we have attached the screen shot of dll property with this post which we have to set to bootstrapper. Please go through it and suggest way to achieve this scenario.

Thanks,
Akshay
Attachments
fileversion_2.jpg
fileversion_2.jpg (43.84 KiB) Viewed 19308 times
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: set file version and product version using dll file

Hi,

1. We want to set a file version and product version using the command prompt.
2. Currently we are using the "$ProdDetails.Version = $ProductVersion" Powershell command to set the version of the product detail page.
3. But we found that the set version is used to set both file version and product version.
4. Is there any way or any command to set the file version separately and product version separately?
5. And also is there any limitation for the version field like that we only use integer value for version?
6. For more clarification we have attached both screenshot i.e property page of the DLL file and the property page of a bootstrapper.
7. We want the file version and product version of Bootstrapper the same as the DLL file which is shown in the screenshot.

We hope now you are getting the scenario, if you still having any doubt then please ask.
Attachments
FileVersion_3.jpg
FileVersion_3.jpg (46.87 KiB) Viewed 19302 times
fileversion_2.jpg
fileversion_2.jpg (43.84 KiB) Viewed 19302 times
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: set file version and product version using dll file

Hello,

To set the installer version, please use the /SetVersion command.

This command will set the Product Version. Its equivalent UI option is “Product Version” in the Product Details Tab page. A new Product Code will be generated if the new version is different from the old one, unless the -noprodcode option was used. Read why in Changing Version.

You have the possibility to specify the version through a versioned file. Instead of the version string, enter the path of the file which version will be used and add the

Code: Select all

-fromfile
option.

Please keep in mind that the ProductVersion of the installer is the version in string format. The format of the string is as follows:

major.minor.build

The first field is the major version and has a maximum value of 255. The second field is the minor version and has a maximum value of 255. The third field is called the build version or the update version and has a maximum value of 65,535.

Let me know if you have any other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: set file version and product version using dll file

Hi,
We have gone through the link that you have shared, and we found the same result as I am told in an earlier post that /SetVersion command is used to set both ProductVersion and FileVersion with the same value.
We have tried this command,
AdvancedInstaller.com /edit MyProject.aip /SetVersion 20.2.1.21001
and after building the AIP project we got a result like,
ProductVersion = 20.2.1.21001 and FileVersion= 20.2.1.21001
but our requirement is to set ProductVersion different than the File version.
For example ProductVersion = 20.2.1.21001 and FileVersion= 2020 2.1 (build 21001).
Is there any command to set FileVersion?

We hope that you get things more clear.
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: set file version and product version using dll file

Hello,

No, there is no command available to set FileVersion.

We only have command to set the ProductVersion to string value or keep it in sync with a binary file.

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

Return to “Common Problems”