Hi Eric, You want to append string to HostDir, which means that HostDir must be resolved already. That requires custom action to run after CostFinalize. To change the value of HostDir after CostFinalize you need to use CA Type 35. Read "Changing the Target Location for a Directory" (http://msdn.microsoft.com/en-us/library/aa367852(VS.85).aspx).
According to WiX documentation, SetDirectory is using CA Type 51, not 35. So, it will have the same problem as direct use of CA Type 51. Alex -----Original Message----- From: Eric Napier [mailto:napi...@gmail.com] Sent: Monday, July 27, 2009 7:04 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] conditionally append to a directory If I schedule it after CostFinalize I get the following Light error: error LGHT0204 : ICE12: CustomAction: append_to_install_path is of type: 51 referring to a Directory. Therefore it must come before CostFinalize @ 1000 in Seq Table: InstallExecuteSequence. CA Seq#: 3999 ---------- Forwarded message ---------- From: Eric Napier <napi...@gmail.com> To: wix-users@lists.sourceforge.net Date: Sun, 26 Jul 2009 10:56:50 -0500 Subject: [WiX-users] conditionally append to a directory I want to alter the install path for single user installations. Specifically, when ALLUSERS="", I want to append a 'Software' subdirectory to the end.I've tried a type 51 action like this: <CustomAction Id="append_to_install_path" Property="HostDir" Value="[HostDir]Software" /> (HostDir is the usual end of my install path). I've scheduled this before CostFinalize. I guess [HostDir] is still empty at that time, because when I attempt to append to it all I get is 'Software' (nothing preceeding it). I've also tried a <SetDirectory> action with similar results. Is there a better way to do this? Thanks ---------- Forwarded message ---------- From: "Alexander Shevchuk" <shevc...@live.com> To: "'General discussion for Windows Installer XML toolset.'" < wix-users@lists.sourceforge.net> Date: Sun, 26 Jul 2009 10:19:16 -0700 Subject: Re: [WiX-users] conditionally append to a directory >I've scheduled this before CostFinalize. Directory resolution happens during CostFinalize. You need to schedule your CA after CostFinalize. Why are you scheduling your CA before CostFinalize? Any concerns that after CostFinalize it will be too late to change the installation folder? Alex ---------------------------------------------------------------------------- -- _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users