Hi,

you must set the appropriate conditions:

<InstallExecuteSequence>
       <Custom Action="DeleteRPPFilesProp"
After="InstallInitialize"></Custom>
       <Custom Action="DeleteRPPFiles"
After="DeleteRPPFilesProp">Installed</Custom>

       <Custom Action="CopyRPPFilesProp" After="InstallInitialize"></Custom>
       <Custom Action="CopyRPPFiles" After="CopyRPPFilesProp">NOT
Installed</Custom>

     </InstallExecuteSequence>

The custom action will fire if the condition is evaluated to true.

Kind regards,

Hans

>
> Hi,
>
> I have two custom actions one should run on install, one should run on
> uninstall, but both my custom actions are running in install only. please
> see my wix xml.
>
> Please help me in the rollback.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>         <Product Id="bfb13c62-6766-47a5-b1b4-f0fc1694ba58"
> Name="CustomActionsSetup" Language="1033" Version="1.0.0.0"
> Manufacturer="CustomActionsSetup"
> UpgradeCode="5a508d87-31ff-4b19-b64e-30014cd9fe70">
>                 <Package InstallerVersion="200" Compressed="yes" />
>
>                 <Media Id="1" Cabinet="CustomActionsSetup.cab"
> EmbedCab="yes" />
>
>     <Property Id="MYRPPBKPATH"><![CDATA[D:\]]></Property>
>     <Directory Id="TARGETDIR" Name="SourceDir">
>       <Directory Id="ProgramFilesFolder">
>         <Directory Id="MYRPPBKPATH" Name=".">
>          <Component Id="Component1"
> Guid="{bfb13c62-6766-47a5-b1b4-f0fc1694ba59}">
>             <File Id="ReadMe" DiskId="1" Name="Readme.txt"
> Source="Readme.txt" Vital="yes" KeyPath="yes" />
>          </Component>
>         </Directory>
>       </Directory>
>     </Directory>
>
>     <Feature Id="ProductFeature" Title="RPPDSSSetup" Level="1">
>       <ComponentRef Id="Component1"/>
>     </Feature>
>     <Binary Id="MyCA"
> SourceFile="D:\Samples\MySetup\CustomAction\CustomAction\bin\Debug\CustomAction.exe"/>
>
>     <CustomAction Id='CopyRPPFiles' BinaryKey='MyCA'
> ExeCommand='"D:\Samples\EnvironmentConfig.xml" "RPP" "BACKUP" "INSTALL"'
> Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />
>     <CustomAction Id='CopyRPPFilesProp' Property='CopyRPPFiles' Value='
> /installtype=notransaction /action=install' />
>     <CustomAction Id='DeleteRPPFiles' BinaryKey='MyCA'
> ExeCommand='"D:\Samples\EnvironmentConfig.xml" "RPP" "DELETE" "INSTALL"'
> Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />
>     <CustomAction Id='DeleteRPPFilesProp' Property='DeleteRPPFiles'
> Value='
> /installtype=notransaction /action=uninstall' />
>
>
>         <InstallExecuteSequence>
>
>
>       <Custom Action="DeleteRPPFilesProp"
> After="InstallInitialize"></Custom>
>       <Custom Action="DeleteRPPFiles" After="DeleteRPPFilesProp"></Custom>
>
>       <Custom Action="CopyRPPFilesProp"
> After="InstallInitialize"></Custom>
>       <Custom Action="CopyRPPFiles" After="CopyRPPFilesProp"></Custom>
>
>     </InstallExecuteSequence>
>
>
>
>   </Product>
> </Wix>
>
> Thank You
>
>
> --
> View this message in context:
> http://n2.nabble.com/How-can-I-run-a-custom-action-only-on-uninstall-tp1332356p1332356.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to