You could have a race condition (we did).  I don't know if it's Windows
Installer or a WiX Custom Action that stops services but, it appears
that it continues when the service controller reports that the service
is stopped.  The service controller reports a service as stopped when
the service successfully responds to a stop request (i.e. a ServiceBase
based class' OnStop method completes successfully). But, the files are
in-use until the process exits.  If your OnStop method just starts the
shutdown and then returns, you have a problem.  Your OnStop method
should start the shutdown of the service threads and then wait for them
to complete before it exits. 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bei Liu
(Volt)
Sent: Thursday, March 29, 2007 5:54 PM
To: Rob Mensching; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] problem when run custom action before
costinitialize

 

I did that, 

 

<Component...>

<File ... Name="MyService.exe" >

</File>

 

<ServiceControl Id="MyService" Name="MyService.exe" Stop="uninstall"
Remove="uninstall" Wait="yes">

              <ServiceArgument> /d "[INSTALLDIR]EF.G"</ServiceArgument>

</ServiceControl>

</Component>

 

I still get "file-in-use" popup when uninstall.(Stop service is happened
after CostFinilize, InstallValidate)

 

 

From: Rob Mensching 
Sent: Thursday, March 29, 2007 2:41 PM
To: Bei Liu (Volt); wix-users@lists.sourceforge.net
Subject: RE: problem when run custom action before costinitialize

 

You should be able to just schedule the service to be stopped and no
file-in-use error should occur.

 

From: Bei Liu (Volt) 
Sent: Thursday, March 29, 2007 2:11 PM
To: Rob Mensching; wix-users@lists.sourceforge.net
Subject: RE: problem when run custom action before costinitialize

 

I have a service installed by my installer.  I'll run after install. I
want to remove it before uninstall. Also don't want to get the "file in
use" popup.

 

From: Rob Mensching 
Sent: Thursday, March 29, 2007 2:09 PM
To: Bei Liu (Volt); wix-users@lists.sourceforge.net
Subject: RE: problem when run custom action before costinitialize

 

Why?  What are you trying to do?

 

From: Bei Liu (Volt) 
Sent: Thursday, March 29, 2007 1:30 PM
To: Rob Mensching; wix-users@lists.sourceforge.net
Subject: RE: problem when run custom action before costinitialize

 

2. I just want to run it when uninstall. Is that possible?

 

Thanks,

 

 

 

From: Rob Mensching 
Sent: Thursday, March 29, 2007 1:25 PM
To: Bei Liu (Volt); wix-users@lists.sourceforge.net
Subject: RE: problem when run custom action before costinitialize

 

1.  Not as far as I know.

 

2.  That doesn't make any sense to me.  CostInitialize happens long
before the transaction that installs things happens.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bei Liu
(Volt)
Sent: Thursday, March 29, 2007 1:12 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] problem when run custom action before
costinitialize

 

Can I schedule a custom action that using the directory manager before
costinitialize?

 

If not, is there a way to run an application that installed by the msi
before costinitialize?

 

Thanks,

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to