Thanks a lot peter, custom actions are working now.
-----Original Message-----
From: Peter Vestergaard [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 14, 2008 6:12 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How can I run a custom action only on uninstall
The custom element should have a condition. This is done by adding a text
element. Your InstallExecuteSequence should look like this:
<InstallExecuteSequence>
<Custom Action="DeleteRPPFilesProp"
After="InstallInitialize">REMOVE</Custom>
<Custom Action="DeleteRPPFiles"
After="DeleteRPPFilesProp">REMOVE</Custom>
<Custom Action="CopyRPPFilesProp" After="InstallInitialize">NOT
Installed AND NOT PATCH</Custom>
<Custom Action="CopyRPPFiles" After="CopyRPPFilesProp">NOT Installed
AND NOT PATCH</Custom>
</InstallExecuteSequence>
the custom element containing REMOVE will run on uninstall and the ones
containing NOT Installed AND NOT PATCH will only run on install...
Best regards
Peter
2008/10/14 MadhaviAthota <[EMAIL PROTECTED]>
>
> 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
> [email protected]
> 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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users