Script2Exe.exe crash when signing exe

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
franky13
Posts: 68
Last visit: Fri Nov 24, 2023 2:41 am

Script2Exe.exe crash when signing exe

Post by franky13 »

Hi David,I assume, you mean if I do get the same errorcodes with the original Script2Exe.exe in PowerShell Studio?This answer is "yes". My exceptioncode is c0000005, the exception offset is 0000e25b.Please advise further. Thank youFrank
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

Script2Exe.exe crash when signing exe

Post by Alexander Riedel »

What I read from this conversation is that the signing of a script failes with the PFX but works with the certificate in the store. Is this correct?I assume that the same PFX is specified as the cert to sign the exe?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
franky13
Posts: 68
Last visit: Fri Nov 24, 2023 2:41 am

Script2Exe.exe crash when signing exe

Post by franky13 »

If I sign a script with my code signing certificate in the store, it does add the signature block successfully. In the output window however I do get the output>> Error Signing File: C:Users<Username>DesktopSignTest.ps1>> Unbekannter FehlerThe "Unbekannter Fehler" is german for "unknown error"And yes, your assumption is correct and the same PFX is specified to sign the exe.Thanks Frank
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

Script2Exe.exe crash when signing exe

Post by Alexander Riedel »

With Microsoft's signcode tool this error is usually blamed on a corrupt PFX.I am not sure what the issue is, but it will require a bit more investigation.Can you tell me if you aquired this PFX directly from a vendor of if you or someone in your company exported it from another format or a certificate store?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
franky13
Posts: 68
Last visit: Fri Nov 24, 2023 2:41 am

Script2Exe.exe crash when signing exe

Post by franky13 »

Hi Alex,OK - I think, we're getting closer...What I did receive vom GlobalSign is a .P12 file. I imported it into my local store and exported it again as a PFX (as I could only select PFX files inside the Sapien Products).Now I manually specified the .P12 file and now I can sign .PS1 scripts successfully (without the certificate being installed in the store).However, signing a packaged executable still throws the old error (or no error with the new script2exe, but just fails without actually signing)Thank you for your ongoing supportFrank
User avatar
franky13
Posts: 68
Last visit: Fri Nov 24, 2023 2:41 am

Script2Exe.exe crash when signing exe

Post by franky13 »

Another info: Signing an executable with Primal Script 2012 packager using the .p12 file works fine!So the only thing left open is signing an executable created with PowerShell Studio 2012...Thanks Frank
User avatar
frank.t.costa.jr@gmail.com
Posts: 3
Last visit: Fri Aug 22, 2014 8:16 am

Script2Exe.exe crash when signing exe

Post by frank.t.costa.jr@gmail.com »

I am having this same problem. I can export to a signed .ps1 successfully but when packaging the form and specifying the .pfx file the packager crashes and the .exe isn't signed. I can sign the .exe using set-authenticodesignature using the same .pfx file. PrimalScript 2012 packages the exported script without error.
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

Script2Exe.exe crash when signing exe

Post by Alexander Riedel »

Please indicate the origin of your PFX file.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
frank.t.costa.jr@gmail.com
Posts: 3
Last visit: Fri Aug 22, 2014 8:16 am

Script2Exe.exe crash when signing exe

Post by frank.t.costa.jr@gmail.com »

The .pfx file was exported from my personal store. The code signing certificate was issued by our internal CA.
User avatar
Alexander Riedel
Posts: 8488
Last visit: Mon Apr 15, 2024 3:28 pm
Answers: 20
Been upvoted: 37 times

Script2Exe.exe crash when signing exe

Post by Alexander Riedel »

Did you specify a password when exporting the certificate or did you create a PFX without password?We are trying to find the common denominator between those certificates that work and those that don't.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 11 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.