Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Change Sequence For DIFx In Table Editor

Wed Aug 15, 2018 4:04 am

I need to install the certificate for the cat driver before the driver gets installed by DIFx so that the "Windows can't verify the publisher of this driver software" isn't displayed. The issue is that the certificate custom action runs after the driver because of the deferred sequence. Is there a way to sequence the DIFx in Table editor so that it runs after the Install Certificate CA?

I can't run a pre-install to install the cert because the installer needs to be an MSI & it needs to be able to run in silent mode.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Change Sequence For DIFx In Table Editor

Sat Aug 18, 2018 3:21 pm

Hello,

Could you schedule your install certificate custom action before the "Add Resources" action group and let us know if this helps? To do so just add your certificate files as temporary files in "Files and Folders" page.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Change Sequence For DIFx In Table Editor

Sat Aug 18, 2018 4:48 pm

Daniel,

That is the way I had it configured, but it now randomly works about 10% of the time. I recently moved the CA under Searches and it seemed to work a couple of times, but then it started to fail again with the message still displaying or just erroring out during silent installs. I see the certificate being installed under TrustedPublisher before the message displays, but It may be a timing issue.

Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Change Sequence For DIFx In Table Editor

Sat Aug 25, 2018 10:35 pm

Also, I discovered that while doing a silent install, the temporary file property (AI_FILENAME) is not being set for the certificate. This worked in 14.9 and doesn't in the latest.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Change Sequence For DIFx In Table Editor

Tue Aug 28, 2018 12:50 pm

Hello Les,

I apologize for my delayed reply.
That is the way I had it configured, but it now randomly works about 10% of the time. I recently moved the CA under Searches and it seemed to work a couple of times, but then it started to fail again with the message still displaying or just erroring out during silent installs. I see the certificate being installed under TrustedPublisher before the message displays, but It may be a timing issue.
As another workaround solutions I can think of you can try:
1. to add a subsequent custom action (after the install certificate action) which will run a sleep command (for a few seconds)
2. or to create three separate MSI setup projects: first one which will include only the certificate installation, the second one which will include only the driver installation, and the third one which will wrap the first two as feature-based prerequisites
Also, I discovered that while doing a silent install, the temporary file property (AI_FILENAME) is not being set for the certificate. This worked in 14.9 and doesn't in the latest.
This could happen indeed if your install certificate custom action is scheduled before the "Paths Resolution" action group. All the temporary files are deployed on disk at install time during the "CostFinalize" standard action (part of the "Paths Resolution" action group). So, a temp file path is not resolved before the "CostFinalize" action.

Hope this helps.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Change Sequence For DIFx In Table Editor

Wed Aug 29, 2018 4:59 am

Hi Dan,
This could happen indeed if your install certificate custom action is scheduled before the "Paths Resolution" action group. All the temporary files are deployed on disk at install time during the "CostFinalize" standard action (part of the "Paths Resolution" action group). So, a temp file path is not resolved before the "CostFinalize" action.
You are correct, I had to move the install certificate after CostFinalize and after that it populated the temp file property.

As another workaround solutions I can think of you can try:
1. to add a subsequent custom action (after the install certificate action) which will run a sleep command (for a few seconds)
2. or to create three separate MSI setup projects: first one which will include only the certificate installation, the second one which will include only the driver installation, and the third one which will wrap the first two as feature-based prerequisites
Dan, when I originally created the installer, I had a second msi as a feature-based prerequisite that would install the certificate. It worked during UI install, but it never ran in silent mode. I don't know if this is expected behavior for feature-based prerequisites in MSI during silent install?

So I moved the install certificate after CostFinalize and added a waitmsecs (5 seconds & 10 second), but that didn't work either. The certificate is added under trusted publisher, but the Windows security message "Would you like to install this device software" still displays both in UI and silent install.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Change Sequence For DIFx In Table Editor

Wed Aug 29, 2018 8:35 am

Hello,
Dan, when I originally created the installer, I had a second msi as a feature-based prerequisite that would install the certificate. It worked during UI install, but it never ran in silent mode. I don't know if this is expected behavior for feature-based prerequisites in MSI during silent install?
This is by design. During a silent installation the feature -based prerequisite is installed after the main installation process finishes. This is due to a Windows Installer limitation. Once the "Install Execution Stage" sequence of an installation product begins you cannot launch another MSI-based setup until the current installation finishes. During a UI installation the feature-based prerequisite is launched just before the "Install Execution Stage" sequence of the main installation starts.

This is why I suggested this workaround too: create three separate MSI setup projects: first one which will include only the certificate installation, the second one which will include only the driver installation, and the third one which will wrap the first two as feature-based prerequisites. This way the certificate will be always installed (within a separate installation process) before the driver installation. Maybe it will help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”