Patch custom actions fail when the patch is run silently. - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Patch custom actions fail when the patch is run silently.

Hi,

I have a patch that needs to run both with a user interface and also silently. The problem is that when I run it silently or with a Basic UI, the AI_PATCH property is not set even though it is set to 1 when run with the full user interface. The AI_PATCH property is used to control the execution of custom actions and these custom actions are failing to run during silent and Basic UI installs. The log file shows that AI_PATCH is not set and AI_SET_PATCH is not called during a silent or Basic UI (/qb) install.

The cause of this behaviour appears to be that the action AI_SET_PATCH exists in the InstallUISequence table but does not exist in the InstallExecuteSeqence table.

Would you agree that to set AI_PATCH for silent or Basic UI patch installs, AI_SET_PATCH should be authored into the InstallExecuteSeqence table ? If so, can I use the Advanced Installer user interface to make this change, or do I need to edit the InstallExecuteSeqence table directly ?

Related to this, the action AI_SET_INSTALL is in the InstallUISequence table but not in the InstallExecuteSeqence table, should AI_SET_INSTALL have an entry in the InstallExecuteSeqence to handle silent installs ?

Thanks,

Alastair McDonald
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Patch custom actions fail when the patch is run silently.

Hi Alastair,

The AI_PATCH property is for internal use only. You should instead use the PATCH property.

I hope this helps.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Re: Patch custom actions fail when the patch is run silently.

Hi Gabriel,

Unfortunately the Advanced Installer documentation clearly references AI_PATCH as the variable to use to decide if a patch is running or not ("Edit Control Events Dialog" and "Windows Installer Properties" help pages). Consequently, many of our Custom Actions reference this property.

From what you are saying, it is not actually appropriate to use this property, which is disappointing to say the least.

Would you agree that if I replace all instances of AI_PATCH with PATCH, the installer will behave in exactly the same way in all circumstances when the UI is switched on, and also when the UI is off ?

Thanks,

Alastair
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Patch custom actions fail when the patch is run silently.

Hi Alastair,

Indeed we use AI_PATCH in our user guide, I accidentally overlooked that. The property is only used during the UI, since it is not available during install.
Replacing all occurrences of AI_PATCH with PATCH will not break anything.

Sorry if this caused any inconveniences.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Re: Patch custom actions fail when the patch is run silently.

Hi Gabriel,

OK, thanks. We'll do some regression testing to make sure all is ok.

I assume you have a task to update the documentation :-)

Regards,
Alastair.

Return to “Common Problems”