Looking more closely, you may also have problems with repairs and upgrades
as well as removals.

OK, here is what I see (I will take your SIFilterServer feature as an
example, but the issue is the same across all of them):

You are asking for your installation action to happen if both of the
following conditions are met:
1- this product is new (also true during the install phase of major
upgrades)
2- the "Action" state of the SIFilterServer feature is LOCAL (happens if
that feature is or will be installed).

You are asking for your removal action to happen if both of the following
conditions are met:
1- this product is already installed and REMOVE happens to be "ALL" (there
are full product removal scenarios where it will have a different value)
2- the "Action" state of the SIFilterServer feature is LOCAL (happens if
that feature is or will be installed). This is unlikely when uninstalling
the entire product.

Most of the time custom actions act on a particular component, and the
components have the capability for better versioning (helps with navigating
upgrades, etc.) than features. Because of this, action states on a component
related to the custom action tend to be better than any and all other
conditions. The action values you want are 3 for LOCAL and 2 for ABSENT (the
action state when the component is being removed). Thus, a simple condition
that looks like "$IISFilterExtension=3" for install and
"$IISFilterExtension=2" for removal (assuming a component named
IISFilterExtension assigned to the SIFilterServer feature) stands a better
chance of being correct across repairs, upgrades, patches, and removals
along with installations (as long as the custom action sets the system in
the correct state and can stand being rerun in the case of a repair where
the state may or may not already be correct).

-----Original Message-----
From: Polazhenko Sergey [mailto:s_polazhe...@tut.by] 
Sent: Wednesday, September 30, 2009 10:24 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] do not executing custom actions on uninstall

The target OS is Windows 2003 Server.

______________________
WBR, Polazhenko Sergey




> -----Original Message-----
> From: Blair [mailto:os...@live.com]
> Sent: Wednesday, September 30, 2009 7:52 PM
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: Re: [WiX-users] do not executing custom actions on uninstall
> 
> What is your OS?
> 
> Generally speaking custom actions that affect the state of the machine
> should generally be "deferred" actions instead of "immediate" actions,
> as
> those are part of the generated "installation" script and have access
> to
> elevated privileges and can participate in rollback protections.
> 
> -----Original Message-----
> From: Polazhenko Sergey [mailto:s_polazhe...@tut.by]
> Sent: Wednesday, September 30, 2009 7:50 AM
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: [WiX-users] do not executing custom actions on uninstall
> 
> Hi, all.
> 
> Can you help with a strange trouble.
> I have few custom actions (calls for c++ functions in external dll),
> all
> custom actions works fine on install, but neither on uninstall, thanks.
> 
> I have problems with custom actions: RemoveIISExtension and
> UnRegDocSource.
> I tried running it before RemoveFiles and also after InstallInitialize.
> Also I tried condition: <![CDATA[Installed AND REMOVE = "ALL"]]>
> 
> Thanks.
> 
>     <InstallExecuteSequence>
>       <Custom Action="RemoveIISExtension" Before="RemoveFiles">
>         <![CDATA[Installed AND REMOVE = "ALL" AND
> (&SIFilterServer=3)]]>
>       </Custom>
>       <Custom Action="UnRegDocSource" Before="RemoveFiles">
>         <![CDATA[Installed AND REMOVE = "ALL" AND
> ((&SIFilterDocSource=3) OR
> (&SIFilterClientConsole=3))]]>
>       </Custom>
> 
>       <Custom Action="InstallAndConfigureIIS" After="InstallFinalize">
>         <![CDATA[NOT Installed AND (&SIFilterServer=3)]]>
>       </Custom>
>       <Custom Action="CheckForSdk" After="InstallAndConfigureIIS">
>         <![CDATA[NOT Installed AND ((&SIFilterDocSource=3) OR
> (&SIFilterClientConsole=3))]]>
>       </Custom>
>       <Custom Action="RegDocSource" After="CheckForSdk">
>         <![CDATA[NOT Installed AND ((&SIFilterDocSource=3) OR
> (&SIFilterClientConsole=3))]]>
>       </Custom>
>       <Custom Action="NotifyAboutServerConsole" After="RegDocSource">
>         <![CDATA[NOT Installed AND (&SIFilterServer=3)]]>
>       </Custom>
>     </InstallExecuteSequence>
> 
> 
> 
>     <Binary Id="ServerCA"
> SourceFile="..\ServerCA\bin\Release\ServerCA.dll"
> />
> 
>     <CustomAction Id="RemoveIISExtension" BinaryKey="ServerCA"
> DllEntry="RemoveIISExtenstion" Execute="immediate" Return="check"
> HideTarget="no" />
>     <CustomAction Id="UnRegDocSource"  BinaryKey="ServerCA"
> DllEntry="UnregDocumentSource" Execute="immediate" Return="check"
> HideTarget="no" />
> 
>     <CustomAction Id="InstallAndConfigureIIS" BinaryKey="ServerCA"
> DllEntry="InstallAndConfigureIIS" Execute="immediate" Return="check"
> HideTarget="no" />
>     <CustomAction Id="NotifyAboutServerConsole"  BinaryKey="ServerCA"
> DllEntry="NotifyAboutServerConsole" Execute="immediate" Return="check"
> HideTarget="no" />
>     <CustomAction Id="CheckForSdk"  BinaryKey="ServerCA"
> DllEntry="CheckForSdk" Execute="immediate" Return="check"
> HideTarget="no" />
>     <CustomAction Id="RegDocSource"  BinaryKey="ServerCA"
> DllEntry="RegDocumentSource" Execute="immediate" Return="check"
> HideTarget="no" />
> ______________________
> WBR, Polazhenko Sergey
> 
> 
> 
> -----------------------------------------------------------------------
> -----
> --
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 
> -----------------------------------------------------------------------
> -------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to