How to Workaround Error 1330 During Visual Studio 2008 Installation

When installing Visual Studio 2008, you might run into an error dialog that reads,

Error 1330.A file that is required cannot be installed because the cabinet file D:msdncab2.cab has an invalid digital signature. This may indicate that the cabinet file is corrupt.

The path and name of the cabinet may be different, but might often be D:msdncab2.cab, where D: refers to your DVD drive.

How to workaround this issue

You can try installing the product again, but you may have better luck if you copy the DVD layout to your hard drive. Installing from stamped media – which is what ships in our box product – also reduces the chance of seeing error 1330.

If installing Visual Studio 2008 onto multiple licensed machines, copying the volume licensed DVD to the network can help but any network “hiccups” will most likely result in error 1330.

Description of the issue

This is not the error 1718 issue of Visual Studio 2005, though the call stack may look similar. Windows Installer error message 1330 can be returned when WinVerifyTrust() – a security check that validates the digital signature against a file – fails to read the entire file. In a verbose installation log, you’d find lines similar to the following:

MSI (s) (2C:D0) [19:36:40:417]: Validating digital signature of file 'D:msdncab2.cab'
MSI (s) (2C:D0) [19:37:17:073]: File 'D:msdncab2.cab' is not trusted. WinVerifyTrust returned 0x80092003
MSI (s) (2C:B4) [19:37:17:073]: Note: 1: 1330 2: D:msdncab2.cab 3: 8195
MSI (s) (2C:B4) [19:37:17:073]: Product: MSDN Library for Visual Studio 2008 - ENU -- Error 1330.A file that is required cannot be installed because the cabinet file D:msdncab2.cab has an invalid digital signature. This may indicate that the cabinet file is corrupt. Error 8195 was returned by WinVerifyTrust.

HRESULT 0x80092003 is CRYPT_E_FILE_ERROR, and Windows Installer logically errs on the side of caution and returns Windows Installer error message 1330.

We saw this more on burnt DVDs than on pressed DVDs because of the quality and method of transfer. This was also common when our network was strained from everyone installing the RTM bits.

If you were active in VS2008 Beta, you might have saw this problem a little differently and less frequently as Windows Installer error message 1335. The error template reads,

The cabinet file ‘[2]’ required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package.

The underlying cause was the same – the file could not be fully read – but error message 1335 is returned by Windows Installer when Windows Installer itself couldn’t read the entire file and since it isn’t a security issue, it retries 5 times before failing.

The difference is whether or not the cabinets are signed – a requirement for shipping a product: all file types that accept an Authenticode signature must be signed. Technically, Windows Installer runs cabinets through WinVerifyTrust() if there is an entry in the MsiDigitalSignature table for them, but this was still necessary to verify the installation media.

In general, Windows Installer error messages 1330 and 1335 can be worked around either by retrying the failing installation or by copying the full installation source to your hard drive. The latter has the additional benefit – if you have the disk space to leave the source from where you installed it – of satisfying source resolution automatically. But that’s a post for another day.