ERROR_BAD_FORMAT signing .msix?

I’m getting us switched over to Signotaur and getting this error when I try to sign a .msix or .msixbundle file:

16:22:33 Error: Failed to sign BCShellEx.msix. Reason: The file or data has an incorrect or invalid format (ERROR_BAD_FORMAT).. Result code: BadFormat

The files are being generated by MakeAppx from the the 10.0.26100.0 Windows SDK, with no post-processing.

The same file signs correctly using signtool and I’m using the same wrapper script for the embedded .dll immediately beforehand, so the Signotaur connection is good. The specific command line I’m using (pardon the redactions) is:

SignotaurTool.exe sign --sign-server https://*** --api-key-file "C:\***\api_key.txt" --label codesign --file-digest SHA384 --verbose --verify-cert-chain --timestamp-server http://timestamp.comodoca.com --timestamp-digest SHA384 --description "Beyond Compare shell extension" BCShellEx.msix

And it’s generating this output:

±------------------------------------------------------------------------------------------------+
| SignotaurTool |
| Version: 2.1.0.296 Source: 8f36bfdf5594842e93ae4e95031fcc5dcd473fee32d5a441d556a5cad44292f6 |
| © 2026 VSoft Technologies Pty Ltd |
±------------------------------------------------------------------------------------------------+
16:22:32 Debug: Successfully read API key from plain-text file
16:22:32 Debug: Using API key from file: …
16:22:32 Debug: Processing include pattern: BCShellEx.msix
16:22:32 Debug: Base directory: C:\…
16:22:32 Debug: Request timeout for 1 file set to 10 seconds.
16:22:32 Debug: Fetching public key
16:22:33 Debug: Received 2 intermediate certificate(s) from server
16:22:33 The following PKCS11 certificate was selected:
Issued to: CN=Scooter Software Inc, O=Scooter Software Inc, S=Wisconsin, C=US
Issued by: CN=Sectigo Public Code Signing CA R36, O=Sectigo Limited, C=GB
Expires: 11/17/2028 01:59:59
16:22:33 Debug: Full certificate details: [Subject]
CN=Scooter Software Inc, O=Scooter Software Inc, S=Wisconsin, C=US

[Issuer]
CN=Sectigo Public Code Signing CA R36, O=Sectigo Limited, C=GB

[Serial Number]
00C0914B62F2C4FC88164E6C2B24A68585

[Not Before]
11/17/2025 02:00:00
[Not After]
11/17/2028 01:59:59

[Thumbprint]
C80702C5C69CE5EBBEF56AA67E0535A4CBDBE334

16:22:33 Server supplied 2 intermediate certificate(s):
16:22:33 Issued to: CN=Sectigo Public Code Signing CA R36, O=Sectigo Limited, C=GB
Issued by: CN=Sectigo Public Code Signing Root R46, O=Sectigo Limited, C=GB
Expires: 03/22/2036 01:59:59
16:22:33 Issued to: CN=Sectigo Public Code Signing Root R46, O=Sectigo Limited, C=GB
Issued by: CN=AAA Certificate Services, O=Comodo CA Limited, L=Salford, S=Greater Manchester, C=GB
Expires: 01/01/2029 01:59:59
16:22:33 Debug: Selected by label ‘codesign’
16:22:33 Debug: Seeded chain builder with 2 server-supplied intermediate(s)
16:22:33 Debug: Building certificate chain.
16:22:33 Debug: Certificate chain verification check are enabled.
16:22:33 Debug: Revocation mode is set to Online, which performs live checks against CRL/OCSP servers.
16:22:33 Debug: Certificate chain element : C80702C5C69CE5EBBEF56AA67E0535A4CBDBE334
16:22:33 Debug: Certificate chain element : 0BC5E76773D2E44FC9903D4DFEFE451553BBEC4A
16:22:33 Debug: Certificate chain element : 329B78A5C9EBC2043242DE90CE1B7C6B1BA6C692
16:22:33 Debug: Certificate chain element : D1EB23A46D17D68FD92564C2F1F1601764D8E349
16:22:33 Signing 1 file.
16:22:33 Debug: File 1/1: C:\…\BCShellEx.msix
16:22:33 Signing description: Beyond Compare shell extension
16:22:33 File will be timestamped separately after signing
16:22:33 Using a maximum of 4 parallel signing operations.
16:22:33 Error: Failed to sign C:\…\BCShellEx.msix. Reason: The file or data has an incorrect or invalid format (ERROR_BAD_FORMAT).. Result code: BadFormat
16:22:33 Debug: Signing operations were cancelled.
16:22:33 Error: No files signed.
16:22:33 Error: No files timestamped.
16:22:33 Debug: Returning exit code: 54.
16:22:33 Error: Exit code: 54
16:22:33 Execution time: 1s 22ms
Code signing failed
Program returned code : 1

If needed, I’ve uploaded the file I’m trying to sign to https://www.scootersoftware.com/files/BCShellEx_2026-09-14.msix

Slight correction: That log is from an instance where I was also passing in a fallback timestamp server, but I have tested both with and without that and it didn’t help.

Hi Zoë

This is likely due to you specifying SHA384 for the file digest, try SHA256.

Edit: MakeAppx defaults to SHA256, and the signing file digest algorithm needs to match what MakeAppx uses.

Ah, that’s an embarrassing oversight. :sweat_smile: I even remember thinking I should double check that and dismissing it out of hand. Thank you.

Also, just in general, thank you again for the support over the years. We’ve been incredibly happy with all of FinalBuilder, Continua CI, and now Signotaur. I also appreciate your effort to continue supporting VBScript in spite of Microsoft’s deprecation. You are doing a lot of excellent work.

Hi Zoë

Thanks for the kind words - not often that we get to hear that sort of feedback!