[wix-users] ExecuteFileInUse

Parkes, Kevin Kevin.Parkes at wacom.eu
Thu Apr 28 07:59:10 PDT 2016


No, no record size info. ExecuteFilesInUseEventArgs includes PackageId (string) and a list of strings called "Files" (which aren't actually file names). Currently I am essentially ignoring every other call to ExecuteFilesInUse. It seems to work; hopefully it's good enough.

A couple of follow-up questions:
1) if I allow the user to "ignore", uninstall continues, apparently successfully, but presumably a reboot is required? or advisable? How would I initiate a reboot (I've tried setting the event args Result field to Result.Restart but it seems to have no effect.)
2) how should I handle files in use if running with /quiet or /passive: ignore or abort? (and if ignore, should I reboot, as above?)

Thanks
Kev


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Phil Wilson
Sent: 26 April 2016 18:02
To: 'WiX Toolset Users Mailing List'
Subject: Re: [wix-users] ExecuteFileInUse

I remember dealing with the spurious FilesInUse record in an external record handler. The spurious half-empty record has a data size of zero - that's how I filtered it out. Each in-use entry in a formatted record has two size fields. If the first of these is zero then skip over it because it's not relevant. I haven't looked at the WiX handling of these records but if there's any record size info passed to your code then see if there are any zero values. 
Phil W 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Farrukh Waheed
Sent: Monday, April 25, 2016 11:21 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ExecuteFileInUse

I handled similar issue in my MBA where Bundle was uninstalled while main application was running and it uninstalled successfully. So team asked me to check if main application is running. To achieve this, in my Wix markup, I added a C# custom action to check if MainApp.exe is running and so prompt user to close it or cancel installation.
 <Custom Action="CloseAppsPrompt" After="CostFinalize"/>

But never tried to capture FileInUse in MBA....

On 25 April 2016 at 20:49, Rob Mensching <rob at firegiant.com> wrote:

> Annoying specifics of the Windows Installer behavior showing through.
>
> _____________________________________________________________
>  Short replies here. Complete answers over there:
> http://www.firegiant.com/
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Parkes, Kevin
> Sent: Monday, April 25, 2016 8:48 AM
> To: wix-users at lists.wixtoolset.org
> Subject: [wix-users] ExecuteFileInUse
>
> I am trying to add support for Files In Use to my MBA and I see my 
> ExecuteFilesInUse gets called twice:
> - the first time, event args Files list contains what appears to be 
> the PID of the running app, the Window title and 6 empty strings
> - the second time, Files list contains 2 strings: Window title and 
> Window title with " (Process Id: nnnn)" appended.
>
> I've looked at the WiX sources but I can't quite figure out what's 
> going
on
>   1) why 2 calls?
>   2) will there always be 2 calls? Can I reliably "ignore" one and 
> only display an "in use" message in the other?
>   3) can I "fix" it so I only get 1 call?
>   4) is there an (simple) example anywhere implementing ExecuteFilesInUse?
>   5) any guidelines for handling Files In Use in an MBA?
>
> Thanks
> Kevin Parkes
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list