0

I like to run a DISM command in wix custom action without calling a PowerShell script or creating a extra dll. How to resolve the error reported, thanks.

Here is the custom action I created for running a DISM command to enable a windows feature.

Install.wxs:

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
 xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
 <?include "..\include\Variables.wxi" ?>
 <Fragment>
 <CustomAction Id="EnableShellLauncher"
 Property="ExecuteShellLauncherCommand"
 Value="&quot;[System64Folder]dism.exe&quot; /online /Enable-Feature /all /FeatureName:Client-EmbeddedShellLauncher"
 Execute="immediate"
 Return="check" />
 <CustomAction Id="ExecuteShellLauncherCommand"
 BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)"
 DllEntry="CAQuietExec64"
 Execute="deferred"
 Return="check"
 Impersonate="no" />
 </Fragment>
</Wix>

Here is the call in Product.wxs.

<InstallExecuteSequence>
 <Custom Action="ExecuteShellLauncherCommand" Before="InstallFinalize" />
</InstallExecuteSequence>

error reported when installing:

enter image description here

error in the log:

MSI (s) (30:94) [19:15:54:198]: Executing op: ActionStart(Name=ExecuteShellLauncherCommand,,)
MSI (s) (30:94) [19:15:54:198]: Executing op: CustomActionSchedule(Action=ExecuteShellLauncherCommand,ActionType=3073,Source=BinaryData,Target=CAQuietExec64,)
MSI (s) (30:0C) [19:15:54:198]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIBA1B.tmp, Entrypoint: CAQuietExec64
MSI (s) (30:20) [19:15:54:198]: Generating random cookie.
MSI (s) (30:20) [19:15:54:198]: Created Custom Action Server with PID 4244 (0x1094).
MSI (s) (30:44) [19:15:54:262]: Running as a service.
MSI (s) (30:44) [19:15:54:262]: Hello, I'm your 64bit Elevated Non-remapped custom action server.
MSI (s) (30:94) [19:15:54:294]: Note: 1: 1723 2: ExecuteShellLauncherCommand 3: CAQuietExec64 4: C:\Windows\Installer\MSIBA1B.tmp 
MSI (s) (30:94) [19:15:54:294]: Note: 1: 2205 2: 3: Error 
MSI (s) (30:94) [19:15:54:294]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1723 
CustomAction ExecuteShellLauncherCommand returned actual error code 1154 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (30:94) [19:17:20:048]: Note: 1: 2205 2: 3: Error 
MSI (s) (30:94) [19:17:20:048]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709 
MSI (s) (30:94) [19:17:20:048]: Product: HP Smart Shell -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ExecuteShellLauncherCommand, entry: CAQuietExec64, library: C:\Windows\Installer\MSIBA1B.tmp 
Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ExecuteShellLauncherCommand, entry: CAQuietExec64, library: C:\Windows\Installer\MSIBA1B.tmp 

Here is the wix version I installed: enter image description here

asked Nov 26, 2025 at 3:33

1 Answer 1

0

Here is custom action works:

 <SetProperty Id="ExecuteShellLauncherCommand"
 Value="&quot;[WindowsFolder]System32\dism.exe&quot; /online /Enable-Feature /all /FeatureName:Client-EmbeddedShellLauncher"
 Before="ExecuteShellLauncherCommand"
 Sequence="execute" />
 <CustomAction Id="ExecuteShellLauncherCommand"
 BinaryRef="Wix4UtilCA_X64"
 DllEntry="WixQuietExec64"
 Execute="deferred"
 Return="check"
 Impersonate="no" />
<Custom Action="ExecuteShellLauncherCommand" Before="InstallFinalize" Condition="NOT Installed OR WIX_UPGRADE_DETECTED" />
answered Dec 4, 2025 at 7:17
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.