Product, version and build: PrimalScript 2019 version 7.4.122, 64-bit
Operating system: Windows 10 1803, 64-bit
I have an Entrust code-signing certificate, which resides in my user profile's Personal > Certificates store. It is registered in PrimalScript via File > Options > Script Signing. I've been using this certificate for almost a year (since February 2018) in PrimalScript to sign my scripts. Never a problem until yesterday.
Now when I try to sign a script using PrimalScript 2019, no matter what file (.vbs or .ps1) I try to sign, even a brand new file with no code in it, as soon as I click the File > Sign button I get an error popup "The specified file could not be signed".
I do not know if this is the first time I have attempted to sign a script using the 2019 release of PrimalScript, but it might be.
I needed to rebuild my (virtual) computer anyway, to solve an unrelated problem. On this new computer, I installed PrimalScript 2019, installed the certificate, registered the certificate within PrimalScript, tried to use it. I get the same "The specified file could not be signed" error on this brand new machine.
The specified file could not be signed
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.
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.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: The specified file could not be signed
Thanks for reporting the issue. Our support team will look into it and get back to you soon as possible.
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: The specified file could not be signed
Under the Option menu, in the "Script Settings | Script Signing" section.
Use the Certificate button to find you certificate (See image)
Please, let us know if this solve the issue.
Use the Certificate button to find you certificate (See image)
Please, let us know if this solve the issue.
Re: The specified file could not be signed
File > Options > Script Settings > Script Signing > Certificate button is the way I have always registered my script signing certificate.
When I click the button, it raises a popup showing my script signing certificate. I click "OK" in the popup, it goes away, and my certificate's name is listed in the "Certificate" box.
But when I click File > Sign, I get the "The specified file could not be signed" error.
When I click the button, it raises a popup showing my script signing certificate. I click "OK" in the popup, it goes away, and my certificate's name is listed in the "Certificate" box.
But when I click File > Sign, I get the "The specified file could not be signed" error.
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: The specified file could not be signed
A quick test here shows it works with our certificate. I know that doesn't help you, but let's find out what is different.
If you specify a certificate in your personal store, a password should not be required. So please try after deleting that password.
Secondly, you can also try to sign without specifying ANY certificate at all. That will use the first code signing certificate in your personal store.
While this might not be the one you want to use, please try and let us know what it does.
If you specify a certificate in your personal store, a password should not be required. So please try after deleting that password.
Secondly, you can also try to sign without specifying ANY certificate at all. That will use the first code signing certificate in your personal store.
While this might not be the one you want to use, please try and let us know what it does.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: The specified file could not be signed
I blanked out the password, removed the Certificate entry, no difference.
I'm going to try reverting to an older version of PrimalScript.
I'm going to try reverting to an older version of PrimalScript.
Re: The specified file could not be signed
Could you please check if your Certificate is not expired.
We tested Signing functionality here, and with correct certificate everything works fine.
The error will be displayed if:
- certificate expired
- certificate corrupted
- you are using .pfx file and provide wrong password
Could you check the script that was signed with that certificate and check through what date this certificate is valid
We tested Signing functionality here, and with correct certificate everything works fine.
The error will be displayed if:
- certificate expired
- certificate corrupted
- you are using .pfx file and provide wrong password
Could you check the script that was signed with that certificate and check through what date this certificate is valid
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: The specified file could not be signed
I can see the certificate is not expired on the screenshot. Please let us know how your experiment with an older build goes.
We are preparing a new build with a more detailed error message (as far as system error messages go), maybe that will give us additional clues.
We are preparing a new build with a more detailed error message (as far as system error messages go), maybe that will give us additional clues.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: The specified file could not be signed
To keep this update short, my final troubleshooting round was:
This error also occurs, in the exact same manner, on my physical laptop. I know I've used that laptop in the past to sign code via PrimalScript.
Whatever's going on may not be directly related to Sapien's software. I'm going to contact the person in our IT department who obtained my Entrust script signing certificate, see if he knows anything about any changes to how our organization allows certificate checking.
- Uninstall all Sapien software
- Delete all leftover Sapien files and registry entries
- Delete my script signing certificate from Certificates - Current User > Personal > Certificates
- Restart the computer
- Install PrimalScript 7.4.112 (released February 27, 2018)
This error also occurs, in the exact same manner, on my physical laptop. I know I've used that laptop in the past to sign code via PrimalScript.
Whatever's going on may not be directly related to Sapien's software. I'm going to contact the person in our IT department who obtained my Entrust script signing certificate, see if he knows anything about any changes to how our organization allows certificate checking.
- Alexander Riedel
- Posts: 8486
- Last visit: Tue Apr 09, 2024 4:07 pm
- Been upvoted: 37 times
Re: The specified file could not be signed
There are a number of different APIs available for code signing. It is also possible that a Windows update changed/botched something.
Try this from a powershell console:
$cert = @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0]
Set-AuthenticodeSignature <your_file>.ps1 $cert
and see if that also fails.
Try this from a powershell console:
$cert = @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0]
Set-AuthenticodeSignature <your_file>.ps1 $cert
and see if that also fails.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.