jschoenstein
Posts: 4
Joined: Thu Aug 30, 2018 5:59 pm

Error with Installcertificate customaction

Mon Nov 28, 2022 6:27 pm

Hi,
We have been using AI to install a certificate for a hosted solution that expires every 6 months. I've been going in and modifying the MSI to add the new cert and change the custom action to the new cert. This year, after updating to 20.1.1, I get the following error executing the MSI, from either building and testing the package or from the run button in the GUI.
I've tried changing the cert location (both the cert store and where the cert is located on the HD), run as administrator and anything else I can think of. Ideas?

Code: Select all

MSI (s) (7C:D8) [10:14:43:832]: Executing op: ActionStart(Name=InstallCertificate_1,,)
MSI (s) (7C:D8) [10:14:43:833]: Executing op: CustomActionSchedule(Action=InstallCertificate_1,ActionType=1026,Source=BinaryData,Target=/add "C:\Users\user\AppData\Local\Temp\certname.cer" machine Root,)
CustomAction InstallCertificate_1 returned actual error code 1 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (7C:D8) [10:14:43:961]: Note: 1: 1722 2: InstallCertificate_1 3: C:\windows\Installer\MSI4E3A.tmp 4: /add "C:\Users\JSCHOE~1\AppData\Local\Temp\certname.cer" machine Root 
MSI (c) (20:0C) [10:14:43:982]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (s) (7C:D8) [10:17:57:167]: Product: Lindsey Hosted Connection -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action InstallCertificate_1, location: C:\windows\Installer\MSI4E3A.tmp, command: /add "C:\Users\user\AppData\Local\Temp\certname.cer" machine Root 

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Tue Nov 29, 2022 1:49 pm

Hello and welcome to our forums,

I have run some tests and I could indeed reproduce the described behavior.

It looks like the custom action is failing on the latest versions.

If possible, could you please let me know what version (of Advanced Installer) you have previously used, so I can test to make sure this is indeed a bug and so I can forward this information to our dev team? This should help them isolate the issue better.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

jschoenstein
Posts: 4
Joined: Thu Aug 30, 2018 5:59 pm

Re: Error with Installcertificate customaction

Tue Nov 29, 2022 4:29 pm

I know it was in the version 19 range, but I don't know which one exactly. I usually choose to remove the old version when updating.

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Mon Dec 05, 2022 11:03 am

Hello,

I have forwarded this to our dev team and hopefully it will be fixed in a future version of Advanced Installer.

I will update this thread when it will be fixed.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Wed Dec 14, 2022 3:40 pm

Hello,

As a followup to this, please note the behavior is actually normal.

Upon further investigation, it looks like when the installation is performed, the custom action actually tries to install the certificate in the per-machine location. To do so, it requires administrator privileges.

In your case, most likely, you do not launch the setup elevated. To do so, please proceed as it follows:

1. For MSI

- launch an elevated command prompt

Code: Select all

msiexec /i <path_to_msi>
2. For EXE

- right click on EXE --> "Run as administrator"

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

jschoenstein
Posts: 4
Joined: Thu Aug 30, 2018 5:59 pm

Re: Error with Installcertificate customaction

Thu Dec 15, 2022 5:10 pm

I tried running as administrator (and as the system account as part of Endpoint Central). If I run it manually, I still have an error "There is a problem with this windows installer package. A program run as part of the setup did not finish as expected." I tried both root and personal folders.

Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action InstallCertificate, location: C:\windows\Installer\MSIB851.tmp, command: /add "C:\Program Files (x86)\company\appname\certname.cer" user Root
=== Logging stopped: 12/15/2022 8:53:03 ===

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Mon Dec 19, 2022 12:14 pm

Hello,

If possible, could you please provide a sample project that reproduces this?

You can send it at email at support at advancedinstaller dot com.

I would need the following:

- the AIP file

- the certificate

If you can not provide the certificate, that's totally fine, but please create a test certificate that you can reproduce this with and forward that instead.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Fri Dec 23, 2022 12:21 pm

Hello,

Thank you for the provided resources.

I was indeed able to reproduce the issue on my end. It looks like it was an encoding issue, as we previously supported only .DER and your certificate was .PEM.

I have discussed with the developer and we already have fixed this. This most likely will be available in our next version of Advanced Installer.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Wed Feb 01, 2023 4:25 pm

Hello,

This has been fixed in version 20.3 of Advanced Installer, released on January 30th, 2023.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube


Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Error with Installcertificate customaction

Fri Feb 10, 2023 11:25 am

You are always welcome!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”