SignTool Error: SignedCode::Sign returned error: 0x800700C1

%3CLINGO-SUB%20id%3D%22lingo-sub-857595%22%20slang%3D%22en-US%22%3ESignTool%20Error%3A%20SignedCode%3A%3ASign%20returned%20error%3A%200x800700C1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-857595%22%20slang%3D%22en-US%22%3EHi%20All%2C%20Please%20let%20me%20know%20the%20reason%20behind%20the%20below%20errors%20while%20signing%20the%20msix%20package%2C%20it%20is%20only%20happening%20for%20the%20msix%20package%20having%20an%20executable%20named%20uninstall.exe.%20Msix%20signing%20has%20any%20restriction%20based%20on%20the%20executable%20file%20names%2C%20is%20there%20any%20other%20names%20other%20than%20uninstall.exe%20%3F.%20ERROR%3A%20%5BAppxSipCustomLoggerCallback%5D%20File%20has%20malformed%20certificate%3A%20VFS%5CProgramFilesX86%5CTest%20Maintenance%20Service%5Cuninstall.exe%20ERROR%3A%20%5BAppxSipCustomLoggerCallback%5D%20Failure%20to%20process%20PE%20file%20for%20code%20integrity%20catalog%3A%20VFS%5CProgramFilesX64%5CZilla%20FTP%20Client%5Cuninstall.exe%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-857722%22%20slang%3D%22en-US%22%3ERe%3A%20SignTool%20Error%3A%20SignedCode%3A%3ASign%20returned%20error%3A%200x800700C1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-857722%22%20slang%3D%22en-US%22%3EHi%20Bannna%2C%3CBR%20%2F%3E%3CBR%20%2F%3ETHis%20looks%20like%20an%20error%20related%20to%20a%20bad%20PE%20header.%20This%20is%20a%20fairly%20common%20problem%20we%20observe%20in%20older%20applications%20as%20nothing%20validates%20the%20headers%20generally%20unless%20the%20file%20was%20being%20signed.%20As%20older%20applications%20were%20often%20not%20signed%2C%20its%20normal%20to%20see%20invalid%20ranges%2C%20sizes%2C%20start%20addresses%2C%20etc%20in%20the%20headers.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20MSIX%20packaging%20tool%20looks%20for%20and%20automatically%20corrects%20a%20good%20number%20of%20common%20errors.%20Couple%20questions%3A%3CBR%20%2F%3E1.%20What%20version%20of%20MsixPackagingTool%20are%20you%20using%3F%20If%20you%20have%20an%20older%20version%2C%20there%20may%20be%20some%20auto-correction%20that%20has%20been%20added%20in%20newer%20versions%20that%20will%20address%20this%20scenario.%3CBR%20%2F%3E2.%20What%20version%20of%20zilla%20ftp%20client%20are%20you%20packaging%3F%20We%20can%20look%20into%20updating%20our%20auto-correction%20to%20address%20this%20particular%20case%20if%20we%20have%20not%20already.%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20unblock%20you%20right%20now%2C%20uninstallers%20are%20rarely%20useful%20in%20the%20packaged%20MSIX.%20MSIX%20has%20its%20own%20installation%20and%20uninstallation%20mechanism.%20You%20can%20likely%20safely%20exclude%20the%20uninstall.exe%20from%20the%20package%20and%20see%20no%20functional%20difference%20in%20your%20package.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks!%3CBR%20%2F%3EJames%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-858241%22%20slang%3D%22en-US%22%3ERe%3A%20SignTool%20Error%3A%20SignedCode%3A%3ASign%20returned%20error%3A%200x800700C1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-858241%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F235896%22%20target%3D%22_blank%22%3E%40James%20Pike%3C%2FA%3E%26nbsp%3B%20for%20the%20response%2C%3C%2FP%3E%3CP%3E1-%20MsixPackaging%20Tool%201.2019.701.0%20used%20to%20generate%20the%20msix%20package%2C%20even%20I%20am%20getting%20the%20same%20error%20If%20I%20manually%20sign%20the%20msix%20package%20with%20signtool.exe.%3C%2FP%3E%3CP%3E2-%26nbsp%3BFileZilla_3.41.2_win64%20setup%20used%20for%20generating%20the%20msix%20package.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BI%20didn't%20added%20any%26nbsp%3B%20application%20shortcut%20corresponding%20to%20the%20uninstall.exe%2C%20simply%20placed%20uninstall.exe%20in%20the%20package%20as%26nbsp%3B%20I%20am%20trying%20to%20create%20an%20MSIX%20package%20with%20all%20the%20files%20present%20in%20the%20source%20msi%20package.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BActually%20I%20was%20not%20getting%20this%20error%20while%20signing%20MSIX%20package%20that%20contain%20non%20signed%20win32%20exes%2C%20and%20even%20for%20.net%20WPF%20exe.%26nbsp%3B%20So%20I%20just%20confused%2C%20why%20this%20error%20is%20thrown%20only%20for%20non%20signed%20uninstall.exe%2C%20I%20got%20this%20same%20error%20for%20multiple%20msix%20packages%20that%20contain%20uninstall.exe.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EBanna.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor
Hi All, Please let me know the reason behind the below errors while signing the msix package, it is only happening for the msix package having an executable named uninstall.exe. Msix signing has any restriction based on the executable file names, is there any other names other than uninstall.exe ?. ERROR: [AppxSipCustomLoggerCallback] File has malformed certificate: VFS\ProgramFilesX86\Test Maintenance Service\uninstall.exe ERROR: [AppxSipCustomLoggerCallback] Failure to process PE file for code integrity catalog: VFS\ProgramFilesX64\Zilla FTP Client\uninstall.exe
2 Replies
Hi Bannna,

THis looks like an error related to a bad PE header. This is a fairly common problem we observe in older applications as nothing validates the headers generally unless the file was being signed. As older applications were often not signed, its normal to see invalid ranges, sizes, start addresses, etc in the headers.

The MSIX packaging tool looks for and automatically corrects a good number of common errors. Couple questions:
1. What version of MsixPackagingTool are you using? If you have an older version, there may be some auto-correction that has been added in newer versions that will address this scenario.
2. What version of zilla ftp client are you packaging? We can look into updating our auto-correction to address this particular case if we have not already.

To unblock you right now, uninstallers are rarely useful in the packaged MSIX. MSIX has its own installation and uninstallation mechanism. You can likely safely exclude the uninstall.exe from the package and see no functional difference in your package.

Thanks!
James

Thanks @James Pike  for the response,

1- MsixPackaging Tool 1.2019.701.0 used to generate the msix package, even I am getting the same error If I manually sign the msix package with signtool.exe.

2- FileZilla_3.41.2_win64 setup used for generating the msix package. 

 

 I didn't added any  application shortcut corresponding to the uninstall.exe, simply placed uninstall.exe in the package as  I am trying to create an MSIX package with all the files present in the source msi package. 

 

 Actually I was not getting this error while signing MSIX package that contain non signed win32 exes, and even for .net WPF exe.  So I just confused, why this error is thrown only for non signed uninstall.exe, I got this same error for multiple msix packages that contain uninstall.exe.

 

Thanks,

Banna.