[wix-users] Error starting custom action

Christopher Painter chrpai at iswix.com
Wed Sep 5 04:10:30 PDT 2018


I didn't catch that you were saying it worked on other machines.


I'm not sure what this is then.  Perhaps you could look at the .CA.dll in depends for any missing dependencies (shouldn't be but just to rule it out) .  I don't think you need to verify the .net framework installation because it doesn't seem to have gotten that far.


Anything strange about this machine?  Perhaps some antivirus/security end point software?  Any special group policy settings?    Does it work for another user account on the machine?   Do deferred customactions with no impersonation work on this machine?



________________________________
From: Kirti Bauer <kirti.bauer at ch.abb.com>
Sent: Wednesday, September 5, 2018 1:23 AM
To: WiX Toolset Users Mailing List
Cc: Christopher Painter
Subject: RE: Error starting custom action


I am attaching my entire solution for your reference.

I have checked the points you indicated and they seem to be correct.

As stated before, the setup runs without errors on other machines.

Thanks in advance for your help.



Here is the requested wxs code:



<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<Product Id="*" Name="MyWixSetup" Language="1033" Version="1.0.0.0" Manufacturer="Microsoft" UpgradeCode="9c8cc017-8812-4265-91f6-8a66df16ee81">

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />



<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

<MediaTemplate />



<Feature Id="ProductFeature" Title="MyWixSetup" Level="1">

<ComponentGroupRef Id="ProductComponents" />

</Feature>

</Product>



<Fragment>

<Directory Id="TARGETDIR" Name="SourceDir">

<Directory Id="ProgramFilesFolder">

<Directory Id="INSTALLFOLDER" Name="MyWixSetup" />

</Directory>

</Directory>

</Fragment>



<Fragment>

<Binary Id="MyCustomActions" SourceFile="$(var.MyCA.TargetDir)$(var.MyCA.TargetName).CA.dll" />

<CustomAction Id="Test" BinaryKey="MyCustomActions" DllEntry="Test" />

<InstallUISequence>

<Custom Action="Test" After="CostFinalize"/>

</InstallUISequence>

<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">

<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->

</ComponentGroup>

</Fragment>

</Wix>



From: Christopher Painter [mailto:chrpai at iswix.com]
Sent: Dienstag, 4. September 2018 17:26
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Kirti Bauer <kirti.bauer at ch.abb.com>
Subject: Re: Error starting custom action



CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.



Can you show your wxs  code that consumes said dll?



This is my list of usual suspects:  (Your provided code rules out #'s  4-9 but not 1-3 or 10.)



https://stackoverflow.com/questions/3560370/custom-action-in-c-sharp-used-via-wix-fails-with-error-1154/3566822#3566822<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3560370%2Fcustom-action-in-c-sharp-used-via-wix-fails-with-error-1154%2F3566822%233566822&data=02%7C01%7Ckirti.bauer%40ch.abb.com%7Cb4fb12fd275d4f104cf508d6127aa9e4%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C636716715402103740&sdata=LK1DlX%2FKPgkdMToZUpRGoPFJsTB1wKYdJzeX333dCDo%3D&reserved=0>

[https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3560370%2Fcustom-action-in-c-sharp-used-via-wix-fails-with-error-1154%2F3566822%233566822&data=02%7C01%7Ckirti.bauer%40ch.abb.com%7Cb4fb12fd275d4f104cf508d6127aa9e4%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C636716715402103740&sdata=LK1DlX%2FKPgkdMToZUpRGoPFJsTB1wKYdJzeX333dCDo%3D&reserved=0>


Custom Action in C# used via WiX fails with error 1154 ...<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F3560370%2Fcustom-action-in-c-sharp-used-via-wix-fails-with-error-1154%2F3566822%233566822&data=02%7C01%7Ckirti.bauer%40ch.abb.com%7Cb4fb12fd275d4f104cf508d6127aa9e4%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C636716715402103740&sdata=LK1DlX%2FKPgkdMToZUpRGoPFJsTB1wKYdJzeX333dCDo%3D&reserved=0>

stackoverflow.com

I am using WiX 3.5.1930 in Visual Studio 2010, targeting the .NET Framework 3.5. (Later weekly builds of WiX seem to be very broken with respect to their custom action template, at least for now. ...








________________________________

From: wix-users <wix-users-bounces at lists.wixtoolset.org<mailto:wix-users-bounces at lists.wixtoolset.org>> on behalf of Kirti Bauer via wix-users <wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>>
Sent: Tuesday, September 4, 2018 4:08 AM
To: wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>
Cc: Kirti Bauer
Subject: [wix-users] Error starting custom action



I had an installation created by using WIX 3.11 in Visual Studio 2017. Until now I have had no major issues with the installation and the custom actions library.
My current installation site is a Windows 2016 Server running .NET Framework v4.0.30319.

My MSI works until the first access to a custom action.

I created a simple custom action function that presents the user with a dialog box and returns the success result.
[CustomAction]
public static ActionResult Test(Session session)
{
session.Log("Test started");
MessageBox.Show("Test");
session.Log("Test ended");
return ActionResult.Success;
}

Using verbose logging I get the following error:

MSI (c) (50:B4) [16:33:41:039]: Doing action: Test
Action 16:33:41: Test.
Action start 16:33:41: Test.
MSI (c) (50:38) [16:33:41:039]: Invoking remote custom action. DLL: C:\Users\SVC_AB~1\AppData\Local\Temp\2\MSI1E2A.tmp, Entrypoint: Test
MSI (c) (50:E4) [16:33:41:055]: Cloaking enabled.
MSI (c) (50:E4) [16:33:41:055]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (50:E4) [16:33:41:055]: Connected to service for CA interface.
SFXCA: RUNDLL32 returned error code: -1
CustomAction Test returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 16:33:44: Test. Return value 3.
MSI (c) (50:B4) [16:33:44:717]: Doing action: FatalError
Action 16:33:44: FatalError.
Action start 16:33:44: FatalError.
Action 16:33:44: FatalError. Dialog created
MSI (c) (50:64) [16:33:44:748]: Note: 1: 2731 2: 0
Action ended 16:33:46: FatalError. Return value 2.
Action ended 16:33:46: INSTALL. Return value 3.

What does the error code -1 mean from the rundll32?
I have searched for this error but have found no results.

Any help would be appreciated.

BR
kibau














____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7Ckirti.bauer%40ch.abb.com%7Cb4fb12fd275d4f104cf508d6127aa9e4%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C636716715402103740&sdata=iPT1hrNqZYswJq37pGWjLAeHCtIRB%2F0zwaNSQ7%2Bms4Y%3D&reserved=0>

WiX Support | WiX Experts and Resources from FireGiant<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=02%7C01%7Ckirti.bauer%40ch.abb.com%7Cb4fb12fd275d4f104cf508d6127aa9e4%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C636716715402103740&sdata=iPT1hrNqZYswJq37pGWjLAeHCtIRB%2F0zwaNSQ7%2Bms4Y%3D&reserved=0>

www.firegiant.com<http://www.firegiant.com>

WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant






More information about the wix-users mailing list