Microsoft SDK for Java

Q177178 PRB: Unable to Sign the CAB file When Running Signcode

The information in this article applies to:

SYMPTOMS

When you run Signcode.exe on your .cab file, one or more of the following errors occur:

CAUSE

Signcode.exe could not sign the .cab file for the reason indicated by the error number. The .cab file may not have been created with -s 6144 parameter or it is either read-only or corrupt.

RESOLUTION

Unable to sign the program <cabfile>. (80004005)

This error appears because you did not reserve space in your .cab file. Re-create the .cab file using the -s 6144 option to Cabarc.exe. This space must be reserved in the .cab file to allow room for the digital signature. It is not necessary to use the -s option with the signing tools included with the SDK for Java 2.0x or newer. The Signcode.exe utility now creates the necessary space for the certificate at the time the .cab is signed.

Unable to sign the program <cabfile>. (80030070)

This error occurs because you did not reserve enough space in your .cab file. Re-create the .cab file using the -s 6144 option to Cabarc.exe. It is not necessary to use the -s option with the signing tools included with the SDK for Java 2.0x or newer. The Signcode.exe utility now creates the necessary space for the certificate at the time the .cab is signed.

Unable to sign the program <cabfile>. (80070005)

This error appears because your .cab file is marked read-only.

Unable to sign the program <cabfile>. (80070057)

This error occurs because your .cab file is corrupt.

STATUS

This behavior is by design.

MORE INFORMATION

To use the -s option for Cabarc.exe, the -s 6144 option reserves unnecessary space in most situations. With the "test" certificate, you can typically get by with 1K of reserved space in the .cab. A good estimate of the space required is slightly larger than the size of the .spc file you are signing with. Also note, it is possible that the certificate will require more than 6144 bytes.

Example

C:>CABARC -s 6144 N mycab *.class

Note   It is not necessary to use the -s option with the signing tools included with the SDK for Java 2.0x or newer. The Signcode.exe utility now creates the necessary space for the certificate at the time the .cab is signed.

REFERENCES

For additional information on making your Java code trusted in Microsoft® Internet Explorer, please refer to the following Knowledge Base article:

Q193877 HOWTO: Making your Java Code Trusted in Internet Explorer

For additional information on Frequently Asked Questions for .cab files, please refer to the following Knowledge Base article:

Q168941 INFO: Frequently Asked Questions for .cab Files

For the latest Knowledge Base articles and other support information on Microsoft® Visual J++® and the SDK for Java, please see the following pages on the Microsoft Technical Support site:

http://support.microsoft.com/support/visualj/ This link takes you to a site on microsoft.com

http://support.microsoft.com/support/java/ This link takes you to a site on microsoft.com

Additional query words:

CABARC, Cab and Sign technology, internet

© 1999 Microsoft Corporation. All rights reserved. Terms of use.