Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Repair, checksums and CRCs


6 replies to this topic

Greg Shuler

Greg Shuler
  • Members
  • 3 posts

Posted 22 February 2002 - 20:54

Hello,

I have been struggling for several days to get the msi repair to fix corrupted/changed .dll/.exe files.  I built both kinds of files with the /release link option, which is suppose to embed the checksum in its PE file header.  I then tried all combinations with the following msi/InstallShield (Developer V7.02) properties: REINSTALLMODE, ReinstallModeText.  "comus".  I also manually set the file table attribute flag to 1024 for the .dll/.exe files.  No matter what I do, if a file already exists in the INSTALLDIR for this product and its version is the same as what is being installed, it is not updated, even though its checksum is different.  The same thing happens after it is installed and I replace it with a file of the same name and version, but different checksum.  It is not repaired.  I also noticed MSWI V2.0 supports what is called CRC checking when the property MSICHECKCRCS is set (I assume set means to set it value to "1"?).  However, this does not seem to make any difference either.

Does anyone know how the checksum mechanism or CRC file checking is suppose to work and how I can use it to repair corrupted files?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 February 2002 - 08:56

I believe the check sum must be stored in the msi file.
The "o" means that only older versions (lower version number) will be overwritten.

Greg Shuler

Greg Shuler
  • Members
  • 3 posts

Posted 23 February 2002 - 16:53

Stefan, Thanks for the reply.

So are you inferring that you cannot combine the "c" and "o" attribute to mean overwriting older versions AND corrupt files?  Is there some known order that the file overwrite attributes are evaluated in and the last one wins?  Also, the checksum is suppose to be built into the .exe/.dll files (int the protable executable header) with the /release linker flag (Visual C++ compiler).  However, I do not know how to verify this and if the checksum is there, why isn't the msi installer using it?  I have searched everywhere: MSDN, InstallShield and here for information on this and can not find anything other than the "c" option should work.  Can you or anyone point me to an example msi or some piece of documentation that would explain this?  I am beginning to think the repair feature of msi is not as valuable as it could be.

Thanks.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 February 2002 - 22:28

You can combine c and o - sorry for any confusion.
Are you setting the msidbFileAttributesChecksum (1024) flag in the attributes column of the file table for these files?

Greg Shuler

Greg Shuler
  • Members
  • 3 posts

Posted 25 February 2002 - 16:24

Stefan,

Yes I am setting this flag and have verified it is in the .msi database for the file table in the attribute field.  However, this is not the only flag set.  The msidbFileAttributesCompressed flag is also set.  Can this flag be preventing the checksum from being used?  Strangely, if I overwrite the file with a corrupt version after installation, the installer seems to know this because is does not uninstall the file when the product is uninstalled.  Yet it will not repair this file.

Has anyone got the restore of corrupt (not missing) file to work with MSI?

Greg.


Johannes John

Johannes John
  • Full Members
  • 223 posts

Posted 31 October 2002 - 14:41

Hello Greg, hello Stefan and all others,

I'm just now search for a solution of this problem too and therefore again:

Has anyone got the restore of corrupt (not missing) file to work with MSI?

Thanks in advance!
Johannes

irinaca

irinaca
  • Members
  • 7 posts

Posted 07 November 2002 - 01:27

Just an ideea - make sure the file has a version number.