2

I am using Dotnetzip to create an exe file from deployment & setup project output exe, msi file [ create a zip file with msi content inside it and while unzipping i set the msi to install automatically].

I have been able to modify all the properties of files liek in the below image but only Original Filename is not teh one i want . enter image description here

Is any way to edit the Original Filename property?

Code i written to modify property using resourceLib tool is like this

    VersionResource versionResource = new VersionResource();
versionResource.LoadFrom(locationof exefile);
StringFileInfo stringFileInfo = (StringFileInfo)versionResource["StringFileInfo"];
stringFileInfo["OriginalFilename"] = "my-file.exe\0";                
string bnewfile = @"targetlocationtosave";
versionResource.SaveTo(OutputFile);
Sebastian
  • 4,625
  • 17
  • 76
  • 145
  • Take a look at *both* answers to this question. The first answer provides a solution, and the second explains why you should be careful while doing this: http://stackoverflow.com/questions/6024523/is-it-possible-to-set-the-originalfilename-property-for-a-net-assembly-with-vis – Lars Kristensen Mar 04 '15 at 10:14
  • I tried to modify the property using resourceLib , but not showing as updated [ no exceptions as well] , Any well known reasons for this? – Sebastian Mar 04 '15 at 10:51
  • I'm afraid I don't know the tool - I just did a quick search because I thought it was an interesting question. Maybe you can contact the developer on Codeplex or Github. – Lars Kristensen Mar 04 '15 at 12:09
  • did you find a solution for your problem? :-) – Lars Kristensen Mar 09 '15 at 07:41
  • NO solution yet . I tried resourceLib tool as wel l , but no success. Added an edit to question with what i tried with ResourceLib – Sebastian Mar 09 '15 at 07:46

0 Answers0