Jump to content

Fix the massive whitespaces in Inno Setup file properties


Rekkio

Recommended Posts

 

Fix the massive whitespaces in Inno Setup file properties

 


Time requirements

  • About 10 minutes for the first time with downloads, installs & patches.
  • About 60 seconds if you already have the required softwares.

Target audience

  • Developers, Repackers & Advanced users.
  • Difficulty level is easy for advanced users.
  • Difficulty level is medium for beginners.

Target system

  • Windows only.

Required software


 

Mirror download links

 

Installer

 

Quote

Site: https://www.mirrorcreator.com

Sharecode: /files/1NAVQ0LH/

 

Patch

 

Quote

Site: https://www.mirrorcreator.com

Sharecode: /files/1P3Y0AJG/

 

An unsolved, never fixed Inno Setup issue

 

I was making an installer for BitTorrent 7.9.2 and I used Inno Setup. Things went well, the install worked, etc.

However I couldn't make the perfect installer, due to an issue with Inno setup literally nobody talks about:

 

Inno Setup adds massive whitespaces in the FileVersionInfo manifest of the generated setups.

 

Inno setup had 4 major updates & 9 bugfix releases since the latest minor update (5.5.9).

Even with so many updates, they still haven't fixed the messed up file properties.

 

I couldn't find anything about this issue online, so I had to take a look into that issue myself.

 

The whitespaces

 

The whitespaces are a series of spaces added at the end of every file version information properties.

 

They can be seen on the main File Properties page in the file description:

 

File_Properties.png

 

You can also see how far it goes if you open the file with Resource Hacker & take a look at the Version manifest:

 

File_Version_Info.png

 

That's insane. Why so many spaces ? I don't need that in my setup...

 

Part. 1 - Don't use Resource Hacker

 

Using Resource Hacker is exactly what you need to make it worse and screw it up.

 

I tried removing the spaces with Resource Hacker & saving the file afterwards:

 

File_Version_Info_Res_Hacker.png

 

About_To_Save_Res_Hacker.png

 

It doesn't work, your setup will throw a tantrum telling you setup files are corrupt:

 

Setup_Files_Corrupted_Res_Hacker.png

 

Long story short, I tried reversing the generated setup file with a disassembler (IDA Pro) and a debugger (x64dbg).

I could find the checking routines and I tried jumping / avoiding them, but to no avail. It won't work:

 

IDA_Removed_Error_Text.png

 

Part. 2 - Using Resource Tuner

 

Download Resource Tuner from the mirror link / developer website & its medicine from the linked thread / mirror first.

 

Install it then use RadiXX11's Patch to register it. After you do this, drop your EXE file in the main window.

After you sucessfully loaded it head to the Version resource and specifically the English (United States) one (its ID is '1'):

 

Res_Tuner_Main_Window.png Res_Tuner_Version.png

 

Proceed to remove the whitespaces using Resource Tuner for each property:

 

File_Version_Info_Resource_Tuner210.png

 

You can even add & remove properties as well as alter the Comments property:

 

File_Version_Info_Res_Tuner_Comment.png

 

If any other Version ID is created, delete it. You only need the English US one.

Do this by right-clicking it and selecting the 'Delete' option.

 

You can afterwards save the file by using the File > Save File (Ctrl + S) menu item:

 

About_To_Save_Res_Tuner.png

 

You'll see that Resource Tuner fixes the Virtual Size attribute of the .rsrc PE section (that's perhaps why it works):

 

Save_Log_Res_Tuner210.png

 

Part. 3 - Checking the setup

 

If you look at the file properties again, you can see the whitespaces are gone:

 

File_Properties_Corrupt_Res_Hacker.png

 

What it now looks like in Resource Hacker:

 

File_Version_Info_Res_Hacker_After_Res_T

 

And it now works, you can run your generated setup without any trouble:

 

Working_Edit_Res_Tuner_210.png

 

 

Link to comment
Share on other sites


  • Replies 2
  • Views 934
  • Created
  • Last Reply
3 minutes ago, TheBig said:

@Rekkioso what will I get by removing theses spaces?any advantage?

 

Actually, there's no advantage in removing this: It will work the same.

 

However, the whitespaces aren't meant to be there in the first place: it's a bug.

For e.g. the Inno Setup comment property doesn't have any whitespace.

Also, the version number properties should not have any space in them.

 

There was no documentation about it online, so I provide this incase someone wants to remove them.

 

If you previously had Repacks with the whitespaces, there's no need to update the Repacks just for that.

It's just so next time (for future repacks) you have the choice to either keep or remove them.

 

 

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...