Reputation: 77
When I'm running the installer, I'm getting this error: There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Any clue?
Code snippet:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="GoGo" UpgradeCode="9bfe9221-2d7d-46ee-b483-88f00e14b4b3">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="SetupProject1" Level="1">
<ComponentGroupRef Id="ProductComponents"/>
</Feature>
<!--<Binary Id="WixCA" SourceFile="WixCA.dll" />-->
<Property Id="QtExecDeferredExample" Value="InstallManager.exe"/>
<CustomAction Id="QtExecDeferredExample" BinaryKey="WixCA" DllEntry="WixQuietExec"
Execute="immediate" Return="check" Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="QtExecDeferredExample" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="SetupProject1" >
<Component Id='MainExecutable'>
<File Id='InstallManagerEXE'
Name='InstallManager.exe'
DiskId='1'
Source='InstallManager.exe'
KeyPath='yes'/>
</Component>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<ComponentRef Id='MainExecutable' />
</ComponentGroup>
</Fragment>
</Wix>
Upvotes: 4
Views: 7143
Reputation: 652
For any one facing this issue when developing the custom action using C#, I suggest to ensure that
Upvotes: 1
Reputation: 901
I confronted the same issue (error 1157) when I switched from using CAQuietExec extension to WixQuietExec. I used Wix Toolset 3.9 when error occured.
I solved this problem installing Wix Toolset 3.10.1 (it is last stable version now) and WixQuietExec extension works as expected.
Upvotes: 1
Reputation: 11
Try change DllEntry
from WixQuietExec
to CAQuietExec
and property use QtExecCmdLine
please reference to https://www.firegiant.com/wix/tutorial/standard-libraries/silence-please/
Upvotes: 1
Reputation: 1965
Your question has two answers.
First answer: Generic DLL
When you set your custom action, there is an attribute DllEntry="WixQuietExec"
. You need to include the DLL in the package with this code:
<Binary Id="WixCA" SourceFile="WixQuietExec.dll" />
This tag should be created inside the Product
.
So your code would be like this:
...
<Binary Id="WixCA" SourceFile="WixQuietExec.dll" />
<CustomAction Id="QtExecDeferredExample" BinaryKey="WixCA" DllEntry="WixQuietExec"
Execute="deferred" Return="check" Impersonate="no" />
...
Don't forget to match the CustomAction[BinaryKey]
and Binary[Id]
.
Second answer: WixUtilExtension
Particularly for a standard custom action like QtExec, you need only to include a reference to the extension.
C:\Program Files (x86)\WiX Toolset v3.8\bin
Change the Wix
tag adding xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
. For example, your tag will be:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
Upvotes: 3