Specifically, in my WIX deployment project, I am trying to set TARGETDIR to [ProgramFilesFolder][Manufacturer] so that when my custom modified version of WixUI_InstallDir opens InstallDirDlg it defaults to that path rather than to the drive root.
Based on answers I found to questions about setting TARGETDIR, inserting actions between dialogs, and various data in the documentation, I've been trying various forms of a custom action like this:
<CustomAction Id="SetTARGETDIR" Property="TARGETDIR" Value="[ProgramFilesFolder][Manufacturer]" Execute="immediate" />
I've also tried Property="WIXUI_INSTALLDIR", Execute="firstSequence", and hard-coding Value.
I've tried invoking this with InstallExecuteSequence:
<InstallExecuteSequence>
<Custom Action="SetTARGETDIR" After="FindRelatedProducts"></Custom>
</InstallExecuteSequence>
And of course, I've tried to insert before or after many different events. (One annoying obstacle is that I would expect Before="InstallDirDlg" to be the best place to insert the action, but I get a compile error when I try to use any of the dialogs as events.)
I've also tried to publish the action within the UI fragment at the time that the InstallDirDlg is invoked:
<Publish Dialog="WelcomeDlg" Control="Next" Event="DoAction" Value="SetTARGETDIR">NOT Installed</Publish>
A few things I have tried throw an error, but most of the time, the problem is just that TARGETDIR has not changed. The default install path is still the drive root. My best guess is that there is something about the use of this WixUI that fundamentally changes how I should expect a custom action to fire. But I can't seem to find any clue why this is so.