Search code examples
windowsinno-setupfileversioninfo

Inno Setup: Change file description


I'm using Inno Setup 5, and to enbody an customizable .exe file, it's name is changed in the [Files] section using the parameter DestName. But, we're talking about an .exe file.

I noticed that when it's running, the name in Task Manager is the old file name, the DestName parameter only changes it's actual name, not the file Description, which is shown in Task Manager. Somebody has had any experience like this?

I'm using Windows 10, running as administrator (if makes any difference).


Solution

  • The file description is a part of the file header.

    You cannot change it easily. It's possible. But only with unsigned binaries. Changing a description of a signed binary would invalidate the signature, as any other change would. And nowadays all binaries should be signed.


    If you sign the binary as part of the installer build, you can modify the description before that. You can use Resource Hacker command-line. There are various way to invoke a tool like Resource Hacker as part of the installer build:


    For an example on how to use Resource Hacker to modify a binary description, see Inno Setup change Task Manager Description for Setup.tmp – It's about a manual modification, but you will need some of the information even for your automated (command-line) modification.


    Though I believe that way easier is to automate and customize your application build process, so you can easily produce the binaries with custom description, instead of hacking it into the installer build process.