I am trying to make a Version resource tool - pretty much because I came across the FileVersionInfo class recently. I am using FileVersionInfo.GetVersionInfo to obtain an executable's version information through code. Now, I would like to use code to update the version information of an executable file. I wasn't sure if there was a built in class as there is for obtaining the information.
If not, I got an idea to use something similar to the following code in order to replace the file's information. I used to do something similar to this in VB6 - which is where I got the idea from.
File.ReadAllBytes(@"\MyFile.exe")
// Convert the data into a string
// Use the Replace function to find original version information (obtained via FileVersionInfo), and replace it with new information to my liking.
Would this work? If not, might anyone have some better ideas?
Thanks, Evan