Worked great! Thanks Peter!


Only one thing is

$ProductComponent < 3 and not UPGRADINGPRODUCTCODE



Thanks,

Senthil.



-----Original Message-----
From: Peter Shirtcliffe [mailto:pshirtcli...@sdl.com]
Sent: Thursday, October 25, 2012 2:57 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] wix uninstall of service



You can add a condition to a custom action of



$ProductComponent < 3 and not UPGRADINGPRODUCTCODE



to get it to run only when the service component is being removed but not 
during a major upgrade. If you want it to run during a major upgrade, remove 
the "and not UPGRADINGPRODUCTCODE".





-----Original Message-----

From: Senthil Chandran [mailto:senth...@microsoft.com]

Sent: 25 October 2012 02:07

To: wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>

Subject: [WiX-users] wix uninstall of service



Hi,



I have a windows service project called MyExe.exe, which takes arguments to its 
Main method.

I created below wix installer project to install my service using 
ServiceInstall below, everything works fine.



What I want to accomplish now is do something on the uninstall of this service. 
Is there a way in wix to specify a custom action to perform inside MyExe.exe 
only during the uninstall? I cannot accomplish this task on OnStop, needs to 
accomplished on uninstall.



<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> 
<Directory Id="INSTALLDIR" Name="XXX.YYY"> <Component Id="ProductComponent" 
Guid="f55665d1-5792-4a35-a77a-c38bdd2bf0ab">

<util:User Id="serviceUser" CreateUser="no" FailIfExists="no"

Name="[USER_NAME]" Password="[PASSWORD]" LogonAsService="yes"> </util:User> 
<File Id="F_XXX_YYY" Name="MyExe.exe" Source="$(var.DropTarget)\" Vital="yes"

KeyPath="yes" DiskId="1" /> <ServiceInstall Id="ServiceInstaller"

Type="ownProcess" Vital="yes" Name="XXX.YYY" DisplayName="XXX.YYY"

Description="description" Start="auto" Account="[USER_NAME]"

Password="[PASSWORD]" ErrorControl="normal" Interactive="no"

Arguments="&quot;[LABNAME]&quot; &quot;[LABOWNER]&quot; 
&quot;[LABDESCRIPTION]&quot; [LABACCESS]"> <util:ServiceConfig 
FirstFailureActionType="restart" SecondFailureActionType="none"

ThirdFailureActionType="none"/> </ServiceInstall> <ServiceControl 
Id="StartService" Start="install" Stop="both" Remove="uninstall"

Name="XXX.YYY" Wait="yes" /> </Component> </Directory> </Directory> </Directory>



Thanks,

Senthil.

-----------------------------------------------------------------------------

-

Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics Download AppDynamics Lite for free

today:

http://p.sf.net/sfu/appdyn_sfd2d_oct

_______________________________________________

WiX-users mailing list

WiX-users@lists.sourceforge.net<mailto:WiX-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/wix-users

SDL PLC confidential, all rights reserved.

If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.

SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.

Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.





------------------------------------------------------------------------------

Everyone hates slow websites. So do we.

Make your web apps faster with AppDynamics Download AppDynamics Lite for free 
today:

http://p.sf.net/sfu/appdyn_sfd2d_oct

_______________________________________________

WiX-users mailing list

WiX-users@lists.sourceforge.net<mailto:WiX-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to