VC++ : How to change the executable file version?

Hi,

Could any one tell me how to change the file version in VC++? I have tried by changing the Version value in Project Properties->Linker->Version but still it is saying old version when I right click on executable and see the version tab's File Version info. but it displays correct version in "Item name's File Version info'

Please refer the attached snapshot of properties dialog.
Thanks,
fileVersion.JPG
LVL 1
deshawAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
resource editor - version resource.  Modify the value there.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SreejithGCommented:
If you have a resource (.rc) file update the version as mentioned above. If not create one rc file and add the below code and update the version etc in th erc file.
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
 
VS_VERSION_INFO     VERSIONINFO
  FILEVERSION       1,0,0,1
  PRODUCTVERSION    1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
	BLOCK "StringFileInfo"
	BEGIN
        BLOCK "040904B0"
		BEGIN 
			VALUE "CompanyName",     "\0"
			VALUE "FileDescription", "Sample MFC Application\0"
			VALUE "FileVersion",     "1, 0, 0, 1\0"
			VALUE "InternalName",    "Sample \0"
			VALUE "LegalCopyright",  "Copyright (C) 2008\0"
			VALUE "LegalTrademarks", "\0"
			VALUE "OriginalFilename","Sample.EXE\0"
			VALUE "ProductName",     "Sample Application\0"
			VALUE "ProductVersion",  "1, 0, 0, 1\0"
		END
	END
	BLOCK "VarFileInfo" 
	BEGIN 
		VALUE "Translation", 0x409, 1200
    END
END

Open in new window

0
Deepu AbrahamR & D Engineering ManagerCommented:
Well, The .rc2 file is meant for user-defined resources

Have a look at this link:
http://support.microsoft.com/kb/237870

Hope this helps.
Best Regards,
DeepuAbrahamK
0
deshawAuthor Commented:
I have already updated resource .rc file and thats a resaon I am getting correct version 4.1.3 in Items name list but at the top still I am getting 4.1.1 Please refer the figure I have attached in original reply.
0
deshawAuthor Commented:
The tricky part was opening a .rc file using resource editor by right clicking resourec file->open with and select resource editor. I have made it default now. Thanks Guys for helping me out.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.