I explained that there was difference between Vista and previous OS versions in 
ServiceControl behavior, and also that there may be a bug in Vista and later 
when you have more than one ServiceControl action. However you didn't say what 
OS you're actually using, or whether you have more than one ServiceControl 
entry. 

Is it an upgrade? I know you refer to uninstall, but there's also a mention of 
install/upgrade. If it is an upgrade, where is RemoveExistingProducts 
sequenced? 

So being nitpicky, you're repeating the question without supplying any more 
information, so the answer to "Are you saying that I don't really have a way to 
do this? I mean the user will have to either stop manually the service before 
an uninstall/upgrade or to reboot the machine after an uninstall/upgrade?" 
depends on the OS you're using, and if you have more than one ServiceControl 
entry. 

a) Doing the uninstall while taking a log might be useful (msiexec /x 
{productcode} /l*vx <path to a text log file> ) because the list of files in 
use should give you a better picture of the files involved (which may not be 
simply your service exe) and whether the in-use is detected at InstallValidate 
time or at file removal time (see b and c). 

b) Sloppy programming can be an issue if there are handles open anywhere that 
refer to the service or the process being watched. Windows can't uninstall a 
service if there are handles open to it. 

c) If ServiceControl isn't set to "wait" the service may not have actually shut 
down by the time Windows tries to delete it, a timing race. Or If the service 
shuts down but the process lingers then the process is still there at file 
removal time requiring a reboot to delete. 

Phil Wilson 


-----Original Message-----
From: Viv Coco [mailto:vcotirl...@hotmail.com] 
Sent: Tuesday, March 30, 2010 3:08 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] stop the service before uninstall

Hi guys,

I really don't want to be pushy but I need to find a solution for this: 
besides my application I also install a service that is babysitting my 
application, eg: restarts it when it crashes or whatever. When the 
product is uninstalled I get the message: "The setup must update files 
or services that cannot be updated while the system is running. If you 
choose to continue, a reboot will be required to complete the setup." 
even though I specify that the service should be stopped when 
uninstalling (and the service will take care to also stop my application).

[code]
<ServiceControl Id='MyServiceControl' Name='MyServiceForTest' 
Start='install' Stop='uninstall' Remove='uninstall'/>
[/code]

If I manually stop the service before uninstalling everything works fine.
How can I solve this problem? I can't really ask the users to manually 
stop the service before uninstalling or to reboot the machine on every 
upgrade. How can I force the shutting down of the service?

Thx,
Viv ;)

On 3/29/2010 12:21 PM, Viv Coco wrote:
>>   On pre-Vista (pre MSI 4.0) the ServiceControl entries aren't considered 
>> for files-in-use situations. On Restart Manager systems with MSI 4.0 and 
>> above, it does look at the ServiceControl table but there have been some 
>> reports that it doesn't work with every entry in the ServiceControl table 
>> and may be unreliable.
>>      
> Are you saying that I don't really have a way to do this? I mean the user 
> will have to either stop manually the service before an uninstall/upgrade or 
> to reboot the machine after an uninstall/upgrade?
>
> Thx,
> Viv
>
>
>
> On 3/26/2010 4:17 PM, Wilson, Phil wrote:
>    
>> On pre-Vista (pre MSI 4.0) the ServiceControl entries aren't considered for 
>> files-in-use situations. On Restart Manager systems with MSI 4.0 and above, 
>> it does look at the ServiceControl table but there have been some reports 
>> that it doesn't work with every entry in the ServiceControl table and may be 
>> unreliable.
>>
>> Start on install and stop on install? It does both. There is a StopServices 
>> action early in the execute sequence that stops services. Later on (after 
>> files have been installed/replaced) there's a StartServices action.
>>
>> Phil Wilson
>>
>> -----Original Message-----
>> From: Viv coco [mailto:vcotirl...@hotmail.com]
>> Sent: Friday, March 26, 2010 2:12 AM
>> To: WiX
>> Subject: [WiX-users] stop the service before uninstall
>>
>>
>> Hi,
>>
>>
>>
>> My installer besides my application installs also a service which is the 
>> "babysitter" for my application, eg takes care to restart my application if 
>> it crashes. When I want to uninstall everything I get the error message: 
>> "The setup must update files or services that cannot be updated while the 
>> system is running. If you choose to continue, a reboot will be required to 
>> complete the setup.". If I manually stop the service before running the 
>> uninstaller I don't get this msg.  But I actually "told" the uninstaller to 
>> stop the service on uninstall:
>>
>>
>>
>> [code]
>> <ServiceControl Id='MyServiceControl' Name='MyServiceForTest' 
>> Start='install' Stop='uninstall' Remove='uninstall'/>
>> [/code]
>>
>>
>>
>> 1) How can I get rid of this problem? I don't want to get the mesasage with 
>> reboot the system as the uninstaller should be itself able to stop de 
>> service and then to do the uninstall.
>>
>>
>> 2) And related to services: what happens if I have:
>>
>>
>>
>> [code]
>> <ServiceControl Id='MyServiceControl' Name='MyServiceForTest' 
>> Start='install' Stop='install' Remove='uninstall'/>
>> [/code]
>>
>>
>>
>> the translation would be: start on install, stop on install. Which one is it 
>> then?
>>
>>
>>
>> TIA,
>> Viv
>>                                      
>> _________________________________________________________________
>> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
>> https://signup.live.com/signup.aspx?id=60969
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>> *** Confidentiality Notice: This e-mail, including any associated or 
>> attached files, is intended solely for the individual or entity to which it 
>> is addressed. This e-mail is confidential and may well also be legally 
>> privileged. If you have received it in error, you are on notice of its 
>> status. Please notify the sender immediately by reply e-mail and then delete 
>> this message from your system. Please do not copy it or use it for any 
>> purposes, or disclose its contents to any other person. This email comes 
>> from a division of the Invensys Group, owned by Invensys plc, which is a 
>> company registered in England and Wales with its registered office at 
>> Portland House, Bressenden Place, London, SW1E 5BF (Registered number 
>> 166023). For a list of European legal entities within the Invensys Group, 
>> please go to 
>> http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77.
>>  You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail 
>> inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be 
>> subject to the terms of any agreements between Invensys (and/or its 
>> subsidiaries and affiliates) and the recipient (and/or its subsidiaries and 
>> affiliates).
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>>
>>
>>
>>      
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>    



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


*** Confidentiality Notice: This e-mail, including any associated or attached 
files, is intended solely for the individual or entity to which it is 
addressed. This e-mail is confidential and may well also be legally privileged. 
If you have received it in error, you are on notice of its status. Please 
notify the sender immediately by reply e-mail and then delete this message from 
your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any other person. This email comes from a division of the Invensys 
Group, owned by Invensys plc, which is a company registered in England and 
Wales with its registered office at Portland House, Bressenden Place, London, 
SW1E 5BF (Registered number 166023). For a list of European legal entities 
within the Invensys Group, please go to 
http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. 
You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail 
inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be 
subject to the terms of any agreements between Invensys (and/or its 
subsidiaries and affiliates) and the recipient (and/or its subsidiaries and 
affiliates).



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to