Loading
Repair option doesn't always fix corrupted files
It looks like the Repair option doesn't always replace corrupted files, depending on what type of corruption is present.

 

To test this, I used a hex editor to "corrupt" a .exe file in various ways, then ran Repair. Here are some results:

 

[LIST=1]

 

  • I changed a few bytes part way into the file. Repair did not fix it.
  • I inserted a single byte at the beginning of the file. Repair fixed it.
  • I inserted a single byte at the end of the file. Repair did not fix it.
  • I changed the first byte of the file. Repair fixed it.
  • I changed the second byte of the file. Repair fixed it.
  •  

So I'm not sure what algorithm InstallShield uses to determine if a file needs repairing, but it doesn't seem like a very robust one. Are there any controls over how it determines if a file needs repairing? I would like to make it use a more rigorous comparison algorithm if possible. It seems like it should at least notice the file sizes are different as in example 3 above!

  • 0_M Urman (Flexera Software)

    Assuming you're talking about an MSI-based installer, the rules used to repair files are the same used for deciding which version wins, aka File Versioning Rules . For PE files with a version block, and a default REINSTALLMODE=omus, only missing files or corruptions that decrease the version will cause the file to be replaced. For nonversioned files, the rules get more complicated, however the very fact that a test modifies them will also generally disqualify them from replacement.

     

    These rules are designed to work uniformly in repair cases without causing problems when another package has updated a file that they both share. It would be bad if repairing package A reverted the later version of the file that package B installs and relies on.
    Expand Post

Loading
Repair option doesn't always fix corrupted files