Rekkio Posted May 13, 2018 Share Posted May 13, 2018 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 Download | Resource Tuner 2.10 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: You can also see how far it goes if you open the file with Resource Hacker & take a look at the Version manifest: 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: It doesn't work, your setup will throw a tantrum telling you setup files are corrupt: 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: 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'): Proceed to remove the whitespaces using Resource Tuner for each property: You can even add & remove properties as well as alter the Comments property: 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: You'll see that Resource Tuner fixes the Virtual Size attribute of the .rsrc PE section (that's perhaps why it works): Part. 3 - Checking the setup If you look at the file properties again, you can see the whitespaces are gone: What it now looks like in Resource Hacker: And it now works, you can run your generated setup without any trouble: Link to comment Share on other sites More sharing options...
TheBig Posted May 13, 2018 Share Posted May 13, 2018 @Rekkioso what will I get by removing theses spaces?any advantage? Link to comment Share on other sites More sharing options...
Rekkio Posted May 13, 2018 Author Share Posted May 13, 2018 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.