0

I'm creating a Wix installer and I want to show a README note (stored in a .txt file) before the user clicks the Finish button.

I tried using the WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT property to allow users to open the README file after installation by checking a box, but even when I check the box, the file doesn't open.

Here’s what I’ve added to my Wix project:

<!-- Custom Action to launch readme.txt with Notepad -->
<CustomAction Id="LaunchReadme" Directory="x64Folder" ExeCommand="notepad.exe readme.txt" Return="asyncNoWait" Execute="deferred" Impersonate="yes" />

<!-- Trigger the custom action if checkbox is checked -->
<Custom Action="LaunchReadme" Before="InstallFinalize" Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND NOT Installed" />

I also set this property to show the checkbox on the exit dialog:

<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="View README file" />

Even with this setup, checking the box doesn't launch the file. Am I missing something in the sequence or configuration?

1 Answer 1

0

Do you have the readme file included in the project.wms file?

 <Fragment>
   <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
      <Component Id="README.txt">
        <File Source="README.txt" Id="README.txt" />
      </Component>
   </ComponentGroup>
 <Fragment>

I also used WixShellExecTarget to open the file, that means the user will have it open in whatever text editor they have as default.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.