Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change .exe file version (from C++ project)

I have a C++ project and I want to change the EXE file version by code.

How can I do it?

(I found some ways to do it in other languages, but not C++.)

like image 581
STF Avatar asked Mar 23 '17 12:03

STF


People also ask

How do I find the EXE version?

You can use FileVersionInfo. FileVersion to fetch this from a path. ". ProductVersion" is not a "version number of a file".

How do I edit the version of an EXE file?

Steps to Edit The Version Information 1. Open your EXE or DLL file with Rersource Tuner and expand the Version folder that’s found in the Resource Tree view, then select the version information item to be edited in the Resource Tree view. 3. Select a StringFileInfo value entry by clicking it in the displayed listview.

How do I change the version of a project in Visual Studio?

Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > Linker > General property page. Modify the Version property. See Version.

How do I change the C++ compiler version in Visual Studio?

For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > Linker > General property page. Modify the Version property. See Version.

How do I add a version number to a C++ project?

Another way to insert a version number is with the VERSION module-definition statement. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > Linker > General property page.


1 Answers

  1. Add a version resource file to your project

In Solution Explorer, right click at your project -> Add -> Resource -> Version

  1. Change value of FILEVERSION key to the value you want
like image 88
zhm Avatar answered Sep 18 '22 04:09

zhm