helendam.lyly
Posts: 1
Joined: Tue Jun 17, 2025 5:54 am
Contact: Website

Solve Custom Action Not Executing Issue During Silent Installation with Advanced Installer

Hi everyone,

I'm currently facing a tricky issue while deploying an internal application using an MSI package built with Advanced Installer (latest version as of June 2025). Here's the situation:
Goal:
I’ve created a PowerShell Custom Action to:

Create specific system folders,

Log installation activity,

Write values into the Registry for post-install configuration.

The custom action is configured to run at the "Install Execution Stage → Deferred" and is set to "Deferred with no impersonation" (i.e., running under the System account).

Problem:
When I run the MSI normally (with UI) by double-clicking, everything works as expected.

When I run the MSI in silent mode using:

Code: Select all

bash
msiexec /i MyApp.msi /qn
The PowerShell script is not executed at all. No folders are created, no registry keys are written, and the MSI log doesn’t even show the custom action being triggered.

What I’ve Tried So Far:
Removed the UILevel = 5 condition, kept only NOT Installed → still doesn’t work.

Changed the action to Immediate Execution → script runs, but lacks required privileges (can't access the system registry).

Executed the MSI as Administrator, with full log:

Code: Select all

bash
msiexec /i MyApp.msi /qn /l*v install.log
→ Still no sign of the custom action.

Made sure the PowerShell script is properly configured in Execution Properties.

Questions:
Has anyone experienced PowerShell custom actions not running in silent mode before? What was the root cause?

Are there any known limitations in Advanced Installer regarding deferred execution of PowerShell in silent installs?

Do I need to pass data explicitly through CustomActionData or add an immediate action to initialize script parameters?

Any help, suggestions, or shared experience would be greatly appreciated!

Additional Info:

Advanced Installer 21.x

Target OS: Windows 10/11 (64-bit)

Admin privileges are used during installation

Internal deployment environment (no WiX, no external dependencies)

Thanks in advance for your time and support!

Best regards,
Helendam
Liviu
Posts: 1365
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Solve Custom Action Not Executing Issue During Silent Installation with Advanced Installer

Hello Helendam and welcome to our forums,

Can you please send us the .AIP (setup project) file and an installation log by email to support at advancedinstaller dot com so we can further test and investigate this?

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

Return to “Common Problems”