0
votes

I am new to WIX, so bear with me please.

I have two custom actions in my installation procedure, one that gets called during the installation of the .msi and one that gets called during the uninstallation of the .msi.

<Binary Id="ClassExtension.RegisterAssemblies.CA.dll"     src="..\ClassExtension.RegisterAssemblies\bin\$(var.Configuration)\ClassExtension.RegisterAssemblies.CA.dll" />

<CustomAction Id="CustomActionInstall"
  Return="check"
  Execute="immediate"
  BinaryKey="ClassExtension.RegisterAssemblies.CA.dll"
  DllEntry="OnInstall" />

<CustomAction Id="CustomActionUninstall"
  Return="check"
  Execute="immediate"
  BinaryKey="ClassExtension.RegisterAssemblies.CA.dll"
  DllEntry="OnUninstall" />

<InstallExecuteSequence>
  <Custom Action="CustomActionInstall" After="InstallFinalize"  />
  <Custom Action='CustomActionUninstall' After="InstallInitialize">REMOVE="ALL"</Custom>
</InstallExecuteSequence>

The custom action methods look as follow:

    [CustomAction]
    public static ActionResult OnInstall(Session session)
    {
      //Code
    }

    [CustomAction]
    public static ActionResult OnUninstall(Session session)
    {
      //Code
    }

The custom actions reside in a seperate C# Custom Action class, the custom action that gets called on installation works fine. When I attempt to uninstall the application I get the following error:

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.

So it looks to me that some DLL is being called before it is intitialized, and that the mistake is probably somewhere in the Execute Sequence.

Any help will be appreciated.

Regards

1
If this is a custom action to register assemblies there are native ways in wix to do this. I'm not sure what the custom action does exactly but just thought I'd mention it. I've replaced regasm and regsvr32 commands with native wix functionality.Cole W

1 Answers

0
votes

Log the installation and look to see if there is a stack dump from the custom action.

BTW, there's some code smell here. What does your "register assemblies" do exactly? You are possibly reinventing the wheel. The custom actions are scheduled for immediate execution ( one of them outside of the installation transaction after InstallFinalize) without any rollback or commit functionality and won't be elevated by the installer in a UAC environment.