getfileversion

c# change FileVersionInfo for any file

情到浓时终转凉″ 提交于 2020-02-24 14:30:13
问题 With FileVersionInfo class is very easy to read file extra information, but is there any way i can change it? Thanks. 回答1: There's no class in the .NET Framework that lets you do that easily. File version data is stored as a native resource, so it can be changed by functions like BeginUpdateResource. But it requires detailed knowledge about the format in which it's are stored in the executable. 来源: https://stackoverflow.com/questions/3785966/c-sharp-change-fileversioninfo-for-any-file

c# change FileVersionInfo for any file

笑着哭i 提交于 2020-02-24 14:30:11
问题 With FileVersionInfo class is very easy to read file extra information, but is there any way i can change it? Thanks. 回答1: There's no class in the .NET Framework that lets you do that easily. File version data is stored as a native resource, so it can be changed by functions like BeginUpdateResource. But it requires detailed knowledge about the format in which it's are stored in the executable. 来源: https://stackoverflow.com/questions/3785966/c-sharp-change-fileversioninfo-for-any-file

C++ VisualStudio GetFileVersionInfo

大兔子大兔子 提交于 2019-12-24 17:46:30
问题 i downloaded this class http://www.codeproject.com/file/VersionInfo.asp i use it to get the file information from a few programs i currently run. It works fine when i want to information from the program i wrote, but i can't get the file informations of "chrome" or my "visual studio" for example. when i query the productName of my application i get "Todo:ProductName" because it is not set yet ;) but when i query the productName of chrome.exe i just get "" nothing. Does anynone know why? Edit:

FileVersionInfo.FileVersion returns ProductVersion?

廉价感情. 提交于 2019-11-29 18:09:01
I am trying to get the file version using C#: string file = @"C:\somefile.dll"; Console.WriteLine(FileVersionInfo.GetVersionInfo(file).FileVersion); For most files this is fine, however for some i receive results that are different than the ones presented in the Windows file explorer. See the attached image: the file version presented in windows is "0.0.0.0", however the one i get using FileVersion property is "000.000.000.000". I've tried using different versions of the .NET (2, 3.5, 4) which give the same results. Anyone else experienced this issue? Thanks Lior It seems Windows Explorer are

FileVersionInfo.GetVersionInfo() incorrect in Console Application

余生颓废 提交于 2019-11-29 15:07:50
I'm getting some serious weirdness using FileVersionInfo.GetVersionInfo() and was hoping somebody might be able to help. The basics of the issue is that I am iterating through all the files in a folder calling GetVersionInfo() on each. There are about 300 files. This works ok for all but 2 of the files. For these DLLs I am getting comepletely incorrect info back from GetVersionInfo(). In order to eliminate all other variables, I extracted this call into a simple test app and it still got the same problem. However, if I built the test app as a Windows Application (it was a Console Application

Detecting the version and company name of an exe using jscript

时间秒杀一切 提交于 2019-11-29 08:04:33
I kwnow how to retrieve the version of an exe using jscript, but I can't find any way to retrieve other info like "Company", "Internal name" or "Product name". function version_of( file_name ) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var f; try { f = fso.GetFile( file_name ) } catch( e ) { throw new Error( e.number, "Error retrieving version of file ``" + file_name + "'': " + e.description ); } var v = fso.GetFileVersion( f ); if ( !v ) { throw new Error( 1, "File ``" + file_name + "'' has not got a version" ); } return v; } WScript.Echo( version_of( "c:\\windows\\system32\

FileVersionInfo.FileVersion returns ProductVersion?

て烟熏妆下的殇ゞ 提交于 2019-11-28 12:08:06
问题 I am trying to get the file version using C#: string file = @"C:\somefile.dll"; Console.WriteLine(FileVersionInfo.GetVersionInfo(file).FileVersion); For most files this is fine, however for some i receive results that are different than the ones presented in the Windows file explorer. See the attached image: the file version presented in windows is "0.0.0.0", however the one i get using FileVersion property is "000.000.000.000". I've tried using different versions of the .NET (2, 3.5, 4)

FileVersionInfo.GetVersionInfo() incorrect in Console Application

老子叫甜甜 提交于 2019-11-28 08:53:31
问题 I'm getting some serious weirdness using FileVersionInfo.GetVersionInfo() and was hoping somebody might be able to help. The basics of the issue is that I am iterating through all the files in a folder calling GetVersionInfo() on each. There are about 300 files. This works ok for all but 2 of the files. For these DLLs I am getting comepletely incorrect info back from GetVersionInfo(). In order to eliminate all other variables, I extracted this call into a simple test app and it still got the

Detecting the version and company name of an exe using jscript

落爺英雄遲暮 提交于 2019-11-28 01:40:16
问题 I kwnow how to retrieve the version of an exe using jscript, but I can't find any way to retrieve other info like "Company", "Internal name" or "Product name". function version_of( file_name ) { var fso = new ActiveXObject("Scripting.FileSystemObject"); var f; try { f = fso.GetFile( file_name ) } catch( e ) { throw new Error( e.number, "Error retrieving version of file ``" + file_name + "'': " + e.description ); } var v = fso.GetFileVersion( f ); if ( !v ) { throw new Error( 1, "File ``" +