Can you post the entire verbose log somehere?

Phil 

-----Original Message-----
From: Alain Forget [mailto:afor...@cmu.edu] 
Sent: Saturday, June 15, 2013 11:11 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: [WiX-users] Uninstall restart issue

I'm still wrestling with this request to restart on uninstall. To recap, I
have an MSI that when I install it, and then try to uninstall it, it usually
tells the user that some of the files to be uninstalled are in use and will
require a reboot. However, this should not be, because the services that are
using the files will stop immediately upon request.

The problem seems to be that the installer is making the determination that
the files are in use before even trying to stop services. Looking at the
uninstall log, during FileCost, the installer determines that multiple
"folder had been blocked by the 1 mask argument (the folder pair's
iSwapAttrib member = 0)", which I think means it's in use? Furthermore, at
InstallValidate, "RESTART MANAGER: Did detect that a critical application
holds file[s] in use, so a reboot will be necessary." Note that both
InstallValidate and FileCost come before StopServices (see
http://msdn.microsoft.com/en-us/library/aa372038).

It had been suggested that I should stop the services myself with "net
stop". So I attempted to do so with this in my .wxs:

<!-- Silently stop my services (with elevated privileges;
Execute="deferred", see http://wix.sourceforge.net/manual-wix3/qtexec.htm )
-->
<CustomAction Id="Set_cmdStopMyService"
Property="cmdStopClientCommModuleService" Value="net stop [#myService]" />

<CustomAction Id="cmdStopMyService" Execute="deferred" BinaryKey="WixCA"
DllEntry="CAQuietExec" Return="check" Impersonate="no" />

<InstallExecuteSequence>
        <Custom Action="Set_cmdStopMyService" Before="CostInitialize"
></Custom>
        <Custom Action="cmdStopMyService" Before="CostInitialize" ></Custom>
</InstallExecuteSequence>
                
However, candle / light don't allow it:

error LGHT0204 : ICE77: cmdStopMyService is a in-script custom action.  It
must be sequenced in between the InstallInitialize action and the
InstallFinalize action in the InstallExecuteSequence table

Following Light's recommendation wouldn't solve my problem, because
InstallInitialze happens long after the uninstaller has decided that the
files are in use.

So I'm completely stumped and would appreciate some suggestions.

Alain



----------------------------------------------------------------------------
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to