Zsolt Kollarits
Posts: 405
Joined: Fri May 29, 2015 10:36 am

Using dynamic path in Signatures tab

Hi Advanced Installer,

We would like to use a dynamic variable / location in our Signatures tab, a screenshot is attached.
The variable is [|THE_SUPPORTFILES_DIR] which is a proper path.

However during the build we got these errors:

For a possible solution please check our Digital Signature FAQ from:
https://www.advancedinstaller.com/user- ... ature.html '
ERROR: Digital Signature. The digital signing of the 'scriptname' inline PowerShell script failed. Error message: 'Error information: "Error: Store IsDiskFile() failed." (-2147024893/0x80070003)
SignTool Error: An unexpected internal error has occurred.
File "C:\Users\ADO1BU~1.SVC\AppData\Local\Temp\ADV_21148\pss5ADD.ps1" can not be signed!

How can we use a dynamic path there?

Thanks,
Zsolt
Attachments
Dynamic variable in signature path.png
Dynamic variable in signature path.png (17.63 KiB) Viewed 9696 times
Liviu
Posts: 1395
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Using dynamic path in Signatures tab

Hello Zsolt,

Sorry for the delayed reply on this.

The error "Error: Store IsDiskFile() failed." appears because the certificate path is being resolved incorrectly:

Please make sure that the property used in the signing command points to a folder path that ends with a backslash \.

For example, if you use the property:

[|THE_SUPPORTFILES_DIR]

its value should be something like:

D:\Therefore Code\
property name.png
property name.png (30.95 KiB) Viewed 8114 times

Then, in the SignTool command line, you can reference the certificate like this:

/f "[|THE_SUPPORTFILES_DIR]cert.pfx"

If the folder path does not end with \, the folder name and certificate name will be concatenated, which results in an invalid path.

You can also add the SignTool debug parameter to get more details from the signing operation:

sign /debug

For example:

sign /debug /f "[|THE_SUPPORTFILES_DIR]cert.pfx"
certificate path.png
certificate path.png (106.95 KiB) Viewed 8114 times

Please update the property value so the path ends with \, then rebuild the project and check if the signing succeeds.

Let me know if that helped.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”