mdsteele / rust-msi

Rust library for reading/writing Windows Installer (MSI) files
MIT License
58 stars 11 forks source link

Error on open file #5

Closed ikrivosheev closed 3 years ago

ikrivosheev commented 3 years ago

Hello!

I generate simple msi file using: https://www.exetomsi.com/freeware. Then I am trying to open hellomsi.msi.zip and get a error: Custom { kind: InvalidData, error: "Missing \"_Validation\" table" }.

mdsteele commented 3 years ago

Interesting. I took a look, and sure enough, that .msi file does not contain a _Validation table.

It's a little unclear to me whether that's correct or not. According to https://docs.microsoft.com/en-us/windows/win32/msi/-validation-table, "The _Validation table...is not shipped with the installer database." On the other hand, every other .msi I've looked at while working on the msi crate (including ones from the Windows SDK) has included a _Validation table in its database.

Reading https://stackoverflow.com/questions/54912972/validating-msi-files-and-the-validation-table, it sounds like I'm not the only one who's confused by this. One answerer says: "The SDK is generally wrong/ignored with regard to that advice. Every MSI I know is shipped with the validation table."

Do you find that other MSI-related tools can open and work with hellomsi.msi just fine? Does the installer itself work? If so then probably the msi crate should simply not complain if the _Validation table is absent.

ikrivosheev commented 3 years ago

@mdsteele, thank you for the answer!

https://wiki.gnome.org/msitools can open hellomsi.msi. Yes, It does. Maybe removing this check?