The problem I believe is that you have the rollback action AFTER 
DeleteUserAdminDeprecatedFiles and it should be BEFORE 
DeleteUserAdminDeprecatedFiles

So <Custom Action="RestoreDeprecatedFiles_Rollback" 
Before="DeleteUserAdminDeprecatedFiles"/>

Steve

-----Original Message-----
From: John Cooper [mailto:jocoo...@jackhenry.com] 
Sent: December-17-13 5:04 PM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] Help with custom action during rollback.

You may need to use early upgrade scheduling, but the major upgrade mechanism 
should be able to do that far more reliably than a custom action.  To boot, it 
stores things as rbf files which facilitates rolling the files back if the 
major upgrade fails.

--
John Merryweather Cooper
Build & Install Engineer - ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com 



-----Original Message-----
From: tyler.w.r...@accenture.com [mailto:tyler.w.r...@accenture.com]
Sent: Tuesday, December 17, 2013 3:43 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Help with custom action during rollback.

Hello,

        I have a custom action that removes some deprecated files when 
upgrading an older InstallShield install, but I can't get my rollback custom 
action to run and put them back.

Below is how I have defined my actions in the WXS file and scheduled them.

                              <CustomAction Id="DeleteUserAdminDeprecatedFiles" 
BinaryKey="FileSearchCA" DllEntry="DeleteUserAdminDeprecatedFiles" 
Execute="immediate" Return="check" />

                              <CustomAction Id="RestoreDeprecatedFiles_Rollback"
                                                                             
BinaryKey="FileSearchCA"
                                                                             
DllEntry="RestoreDeprecatedFiles"
                                                                             
Execute="rollback"
                                                                             
Return="ignore" />

And below is how they are scheduled in the InstallExecuteSequence

<Custom Action="DeleteUserAdminDeprecatedFiles" Before="InstallFinalize">
                                                            OLD_VERSION_FOUND 
OR                                                                              
        <!--Run if we are doing a major upgrade (msi -> msi).-->
                                                            REMOVEINSTALLSHIELD 
                                                                                
          <!--Run if we are upgrading installshield instance.-->
                                             </Custom>
                                             <Custom 
Action="RestoreDeprecatedFiles_Rollback" 
After="DeleteUserAdminDeprecatedFiles"/>

When I run the install the log looks like this for these custom actions:

MSI (s) (CC:3C) [15:26:08:876]: Doing action: DeleteUserAdminDeprecatedFiles 
Action 15:26:08: DeleteUserAdminDeprecatedFiles.
Action start 15:26:08: DeleteUserAdminDeprecatedFiles.
MSI (s) (CC:C4) [15:26:08:886]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSIB23E.tmp, Entrypoint: DeleteUserAdminDeprecatedFiles
SFXCA: Extracting custom action to temporary directory: 
C:\Windows\Installer\MSIB23E.tmp-\
SFXCA: Binding to CLR version v4.0.30319 Calling custom action 
FileSearchCA!FileSearchCA.FileSearchCA.DeleteUserAdminDeprecatedFiles
Starting UserAdmin delete deprecated files Custom Action.
MSI (s) (CC!E4) [15:26:09:145]: PROPERTY CHANGE: Adding DEPRECATEDFILESROOTDIR 
property. Its value is 'C:\Program Files\Duck Creek 
Technologies\ExampleUserAdmin\bin'.
MSI (s) (CC!E4) [15:26:09:150]: PROPERTY CHANGE: Adding DEPRECATEDTEMPORARYDIR 
property. Its value is 'C:\Users\LMUser\AppData\Local\Temp\zs2yfxg5.wdu'.
Action ended 15:26:09: DeleteUserAdminDeprecatedFiles. Return value 1.
MSI (s) (CC:3C) [15:26:09:189]: Doing action: RestoreDeprecatedFiles_Rollback 
Action 15:26:09: RestoreDeprecatedFiles_Rollback.
Action start 15:26:09: RestoreDeprecatedFiles_Rollback.
RestoreDeprecatedFiles_Rollback:
Action ended 15:26:09: RestoreDeprecatedFiles_Rollback. Return value 1.
MSI (s) (CC:3C) [15:26:09:201]: Doing action: InstallFinalize Action 15:26:09: 
InstallFinalize.

The rollback custom action doesn't show up anywhere else in the log file.

Tyler Reid | Operations and Infrastructure | Accenture Software | P&C Insurance
1807 Jones Street | Bolivar, MO 65613| USA
Office: +cc.xxx.xxx.xxxx | Fax: 417.777.3792
E-Mail: tyler.w.r...@accenture.com<mailto:tyler.w.r...@accenture.com> | 
www.accenture.com/pcsoftware<http://www.accenture.com/pcsoftware>



________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise confidential information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the e-mail by you is prohibited. Where allowed by local law, electronic 
communications with Accenture and its affiliates, including e-mail and instant 
messaging (including content), may be scanned by our systems for the purposes 
of information security and assessment of internal compliance with Accenture 
policy. .
______________________________________________________________________________________

www.accenture.com
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance affects 
their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & 
PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended exclusively for the individual or entity to which it is addressed. The 
message, together with any attachment, may contain confidential and/or 
privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution is strictly prohibited. If you have received this message in 
error, please immediately advise the sender by reply email and delete all 
copies.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance affects 
their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & 
PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to