Questions tagged [fileversioninfo]

Use this tag for questions related to the version-information resource in Windows. Version information makes it easier for applications to install files properly and enables setup programs to analyze files currently installed. The version-information resource contains the version number of the file, its intended operating system, and the original file name.

77 questions
138
votes
15 answers

How do I set the version information for an existing .exe, .dll?

As part of our build process I need to set the version information for all of our compiled binaries. Some of the binaries already have version information (added at compile time) and some do not. I want to be able to apply the following…
Carl
  • 2,483
  • 4
  • 28
  • 30
99
votes
8 answers

How to get .exe file version number from file path

I am using .Net 3.5/4.0 with code in C#. I am trying to get a version number of an exe file on my C: drive. For example path is: c:\Program\demo.exe. If the version number of demo.exe is 1.0. How can i use this path to grab version number?.
NoviceMe
  • 3,126
  • 11
  • 57
  • 117
22
votes
9 answers

How do I get the .exe name of a C# console application?

I'm debugging "xiixtasks.exe", a C# console-mode application in VS2008. I'm trying to get the version info from xiixtasks.exe. When I try "Process.GetCurrentProcess()", it gives me the filename and version info for vshost.exe, NOT xiixtasks.exe: …
paulsm4
  • 114,292
  • 17
  • 138
  • 190
8
votes
1 answer

Delphi Version number central but other info decentral

Background Upto RS10.3 I used to use Andreas Hausladen DDevExtensions to set my version number in my project sources to be the same for all modules (bpl's/exe), but unfortunately Andreas has stopped updating his tool for RS10.4 and later. So I am…
H.Hasenack
  • 1,094
  • 8
  • 27
5
votes
4 answers

Can we specify a file version when creating a file in C#?

I am creating a file using: File.WriteAllText(FILEPATHNAME, "SOME VALUE"); When creating a file, is it possible to specify a version programmatically? So that if someone were to use FileVersionInfo object they would get the version I specified?
user1202434
  • 2,243
  • 4
  • 36
  • 53
4
votes
1 answer

FileVersionInfo doesn't match Details tab in Explorer

I'm attempting to use C# and System.Diagnostics.FileVersionInfo to extract the version information from a list of files. My purpose for doing this is to keep track of unique filepath and version combinations. When the files change I'd like various…
Vitus
  • 43
  • 2
4
votes
0 answers

FileVersionInfo GetVersionInfo() returns empty result

I've written a simple C# program that compares the file version of the local file with that of server and if there is a mismatch it should overwrite the local copy with that of server. Code snippet below. using System; using…
user1333222
  • 71
  • 1
  • 7
4
votes
1 answer

AssemblyInformationalVersion attribute behaviour change: deliberate or a bug?

In a C# project built with VS2013, I could put this in the AssemblyInfo.cs file: [assembly: AssemblyInformationalVersion("7.1.0.0 Private (Debug build)")] When I used the FileVersionInfo.GetVersionInfo .NET API against the executable from within…
David Razzetti
  • 167
  • 2
  • 11
4
votes
2 answers

How to get versions of files (exe's and dll's) which are included to Inno Setup installer exe file?

As in topic, is it possible? And, I want to display them on one page of installer if parameter (e.g. parameter passed to exe file) is set to true. I know how to display some page: if dev then PageWersjePlikow := CreateOutputMsgMemoPage( …
vBB
  • 215
  • 1
  • 3
  • 7
3
votes
3 answers

LegalCopyRight is always empty in FileVersionInfo C#?

I have a SFX(self-extracting executable) file in windows (Created with zip tools like 7z, WinRar, ....) with the following details: I want to get CopyRight text in C#, So I wrote the following code: var fileVersionInfo =…
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
3
votes
1 answer

Can't read FileVersionInfo with Code Page mismatch

I have some reasonably tried and tested code which uses the Windows API calls to read FileVersionInfo strings, like "FileVersion" and "CompanyName". I found it failed with one particular 3rd party DLL. The problem seems to be this: Reading the…
Roddy
  • 66,617
  • 42
  • 165
  • 277
2
votes
0 answers

Setting an executable's file version through C#/VB.NET

I have an executable file which comes from an external source, and is always marked with version 1.0.0.0. Unfortunately, I can't control the way it's compiled, and therefore can not set it's file version during compile-time. What I want to do is…
Svarog
  • 2,188
  • 15
  • 21
2
votes
2 answers

Compiled VS_VERSION_INFO resource displays in Explorer unexpected texts

I'm using an external file (verinfo.rc) to generated the details of the compiled EXE file. Here is an example of how my file looks like: VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 BEGIN BLOCK…
delphirules
  • 6,443
  • 17
  • 59
  • 108
2
votes
1 answer

How can I filter .exe files using the VersionInfo property?

I should start this by saying, I enjoy solving problems with PowerShell, but my PowerShell skills are severely lacking. So if you do reply, please be as basic as you can about it :D Microsoft Teams installs in AppData. Multiple users sign into…
Fraser
  • 41
  • 2
2
votes
1 answer

Accessing a string from the RC file?

I have this .rc file that contains the versions, description etc that is being used for the exe file's details. How do I get the values for use inside the code? For example, I want to get the ProductName. IDI_ICON1 ICON DISCARDABLE…
TerribleDog
  • 1,237
  • 1
  • 8
  • 31
1
2 3 4 5 6