[wix-users] Custom Action Process Isolation

Walter Dexter wfdexter at gmail.com
Thu Apr 28 09:04:29 PDT 2016


Far from a WiX expert, but could you have your CA DLL spawn an EXE that
loads the DLL in the product install directory?

Then when that EXE exits the DLL would be released.

Or could you explicitly load and unload the product DLL via the Windows
API? I would expect that to release it.

It's the nature of DLLs that they run in their same space as the process -
they're not separate processes, they're just libraries that are dynamically
linked at run time, hence the name.

On Wed, Apr 27, 2016 at 3:13 PM, Marc Reyhner <marcre at exchange.microsoft.com
> wrote:

> Hi, is there any way to isolate the process used to run a custom action
> such that when the action is done the process terminates?  My problem is a
> custom action used for uninstall that loads a dll in the product install
> directory internally.  This leads to the user getting a prompt to reboot
> the system on either uninstall or upgrade.  The dll is getting leaked by
> the code, and so isn't cleaned up until the custom action process exits.
> This is some legacy code so refactoring it to unload the dll as custom
> action completion would be a risky change.  Ideally, I'd like to find an
> option to make windows installer recycle the custom action worker process
> before it moves to removing files.
>
> In case it helps this is the current definition of the custom action:
>
>     <CustomAction Id="_PrepareForRemove" BinaryKey="CAApm"
> DllEntry="PrepareForRemove" Execute="deferred" Impersonate="no" />
>
>     <InstallExecuteSequence>
>
>       <Custom Action="_PrepareForRemove"
> After="InstallInitialize"><![CDATA[$C_InterceptSvc=2]]></Custom>
>
> Thanks,
> Marc
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list