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 SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
franky13
Posts: 68
Joined: Thu Jan 15, 2009 1:48 am

Script2Exe.exe crash when signing exe

Post by franky13 » Thu Jul 19, 2012 10:39 pm

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: 7055
Joined: Tue May 29, 2007 4:43 pm

Script2Exe.exe crash when signing exe

Post by Alexander Riedel » Thu Jul 19, 2012 10:44 pm

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
Joined: Thu Jan 15, 2009 1:48 am

Script2Exe.exe crash when signing exe

Post by franky13 » Thu Jul 19, 2012 10:55 pm

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: 7055
Joined: Tue May 29, 2007 4:43 pm

Script2Exe.exe crash when signing exe

Post by Alexander Riedel » Thu Jul 19, 2012 11:01 pm

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
Joined: Thu Jan 15, 2009 1:48 am

Script2Exe.exe crash when signing exe

Post by franky13 » Fri Jul 20, 2012 12:10 am

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
Joined: Thu Jan 15, 2009 1:48 am

Script2Exe.exe crash when signing exe

Post by franky13 » Fri Jul 20, 2012 1:23 am

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
Joined: Sun Mar 03, 2013 12:39 pm

Script2Exe.exe crash when signing exe

Post by frank.t.costa.jr@gmail.com » Sun Jul 29, 2012 6:14 am

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: 7055
Joined: Tue May 29, 2007 4:43 pm

Script2Exe.exe crash when signing exe

Post by Alexander Riedel » Sun Jul 29, 2012 6:33 am

Please indicate the origin of your PFX file.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
frank.t.costa.jr@gmail.com
Posts: 3
Joined: Sun Mar 03, 2013 12:39 pm

Script2Exe.exe crash when signing exe

Post by frank.t.costa.jr@gmail.com » Sun Jul 29, 2012 6:39 am

The .pfx file was exported from my personal store. The code signing certificate was issued by our internal CA.

User avatar
Alexander Riedel
Posts: 7055
Joined: Tue May 29, 2007 4:43 pm

Script2Exe.exe crash when signing exe

Post by Alexander Riedel » Sun Jul 29, 2012 7:03 am

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.