Reputation: 445
An old installer script I have inherited has the following peculiar behaviour I'd like to clean up:
WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT
to enable the always-present checkbox on the Finish
controlDialog='ExitDialog' Control='Finish'
a CustomAction
conditional on WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND NOT INSTALLED
that generates a PDF in a temporary folder and displays it onceNow, I'd have liked to change this behaviour to one a bit more reasonable:
CustomAction
always, in-sequence, Before='InstallFinalize'
to put that PDF directly into the installation folder, where it can stay instead of being functionally lost after one useWIXUI_EXITDIALOGOPTIONALCHECKBOX
Am I right in thinking that I cannot actually use the WIXUI_EXITDIALOGOPTIONALCHECKBOX
for that?
My understanding is, that in order to (be allowed to) write into the installation directory, I must Execute='deferred'
, for that I must order it Before='InstallFinalize'
and this means it is run before the user sees the checkbox.
Do I really need a manually created extra dialog with a manually placed extra checkbox, both requiring magic numbers for their non-optional X
and Y
attributes, instead of using the checkbox that is automagically placed correctly onto the dialog that itself is automagically always present?
Currently the PDF generator also does the displaying. Can I create a different Publish
element that only displays the file? (Reading from installation directory should be fine out-of-sequence, right?)
(In case you wonder, why: The installed application has a button to display the generated PDF - and currently the generator is bundled with the application to generate it again , instead of displaying the perfectly good original lost to some temporary folder. If I can put the original with the installed files, I can have the application display the original and strip the generator code from it, decoupling these concerns. I fell over it, because - as such things are bound to happen - the application-generated PDF had a wrong date filled in. Can't happen with a Single Source of Truth(TM). Of course I'd like to not add another dialog to the installer, as nothing was added - I am taking away!)
Upvotes: 0
Views: 15