I have set the verbose logging on using a property but I was already using '/L*v' to enable logging. I think this is the relevant trace:
Info 1603. The file C:\Program Files\xxx\xxx\NetSvrUI.exe is being held in use by the following process: Name: NetSvrUI, Id: 328, Window Title: '(not determined yet)'. Close that application and retry. MSI (s) (E8:DC) [20:52:51:937]: 2 application(s) had been reported to have files in use. MSI (c) (AC:A8) [20:52:51:937]: File In Use: -CommsServerService- Window could not be found. Process ID: 1652 MSI (c) (AC:A8) [20:52:51:937]: Note: 1: 2262 2: ListBox 3: -2147287038 Action ended 20:52:59: InstallValidate. Return value 2. Action ended 20:52:59: INSTALL. Return value 2. As far as I can see this is happening during InstallValidate and WixCloseApplications doesn't happen until before InstallFiles. If I try to move WixCloseApplications before InstallValidate then I get this: Action ended 21:23:49: CostFinalize. Return value 1. MSI (s) (60:6C) [21:23:49:375]: Doing action: WixCloseApplications Action 21:23:49: WixCloseApplications. Action start 21:23:49: WixCloseApplications. MSI (s) (60:C8) [21:23:49:375]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI7.tmp, Entrypoint: WixCloseApplications MSI (s) (60:60) [21:23:49:375]: Generating random cookie. MSI (s) (60:60) [21:23:49:406]: Created Custom Action Server with PID 1868 (0x74C). MSI (s) (60:B0) [21:23:49:437]: Running as a service. MSI (s) (60:08) [21:23:49:437]: Hello, I'm your 32bit Impersonated custom action server. WixCloseApplications: Checking App: NetSvrUI.exe WixCloseApplications: App: NetSvrUI.exe found running, 1 processes, attempting to send close message. WixCloseApplications: Attempting to send close message to process id 0x148 WixCloseApplications: Sending close message to process id 0x148 MSI (s) (60!A0) [21:23:49:687]: PROPERTY CHANGE: Adding WixCloseApplicationsDeferred property. Its value is 'NetSvrUI.exe3'. MSI (s) (60!A0) [21:23:49:687]: Doing action: WixCloseApplicationsDeferred Action 21:23:49: WixCloseApplicationsDeferred. Action start 21:23:49: WixCloseApplicationsDeferred. MSI (s) (60!A0) [21:23:49:687]: Note: 1: 2762 DEBUG: Error 2762: Unable to schedule operation. The action must be scheduled between InstallInitialize and InstallFinalize. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2762. The arguments are: , , MSI (s) (60!A0) [21:23:56:046]: Product: Net2 Access Control -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2762. The arguments are: , , Action ended 21:23:56: WixCloseApplicationsDeferred. Return value 3. WixCloseApplications: Error 0x80070643: Failed MsiDoAction on deferred action WixCloseApplications: Error 0x80070643: failed to schedule WixCloseApplicationsDeferred action Action ended 21:23:56: WixCloseApplications. Return value 1. MSI (s) (60:6C) [21:23:56:046]: Doing action: InstallValidate Action 21:23:56: InstallValidate. Validating install Action start 21:23:56: InstallValidate. For some reason my application is failing to respond to the WM_CLOSE which I need to investigate but the error is happening because the WixCloseApplicationsDeferred action is reporting a scheduling error. I have tried replacing my application close with a close of notepad and that works but because it works it doesn't try to schedule WixCloseApplicationsDeferred. But if I get notepad in to a state where it is prompting to save a file then you get the " DEBUG: Error 2762:" error. Any help in solving this would be greatly appreciated. Neil -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Arnson Sent: 19 August 2008 21:47 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] util:CloseApplication - how do I use it Neil Sleightholm wrote: > I am struggling to get <util:CloseApplication> to work and wondered if > anyone else has got it working (I am using 3.0.4415.0). First, what I > would expect to see is a dialog offering to close my application if it > is still running - is this what it does? > No, it doesn't have UI. (Ideally, it could integrate into the existing files-in-use functionality, but it's not clear it's really extensible.) CloseApplication exists mostly for things like tray apps that don't have a main window in the sense MSI expects (top-level visible window with a title) and shows in the FilesInUse dialog. Also, when you use Property, it lets you control the UI via conditions. > I have added a line like this to my installation: > > <util:CloseApplication Id="MyApp" CloseMessage="yes" > Target="MyApp.exe" /> > When CloseMessage='yes', it should send a WM_CLOSE message to the target's main window. Turn on verbose logging from WcaUtil <http://www.joyofsetup.com/2008/07/15/verbose-logging-from-wcautil/> and you'll get the details of what it's doing. > DEBUG: Error 2762: Unable to schedule operation. The > action must be scheduled between InstallInitialize and InstallFinalize. > By default, CloseApplication schedules a deferred custom action to schedule a reboot if the target process is still running. RebootPrompt='no' turns that off so it should be usable outside InstallInitialize/InstallFinalize. -- sig://boB http://joyofsetup.com/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users