I know about WIXUI_EXITDIALOGOPTIONALCHECKBOX and WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT.
As I understand it, those things can be used to trigger a custom action.
The examples I've seen run an EXE, or invoke a custom action in code.How can I run a .CHM file if the checkbox is checked?
If I just specify the chm file as the FileKey, as below, it does not work. I think that approach works only for EXE files.
<CustomAction Id="LaunchHelp"
FileKey="chmfile"
ExeCommand=""
Impersonate="yes"
Return="ignore"开发者_如何学Go
/>
Thanks to Sascha for the answer... This worked for me :
<CustomAction Id="LaunchHelp"
Directory="INSTALLDIR"
ExeCommand='[WindowsFolder]hh.exe MyHelpFile.chm'
Execute="immediate"
Return="asyncNoWait" />
Use hh.exe
to launch your CHM file, rather than launching the CHM directly. (hh.exe
is what is launched when you double click on a .CHM
file)
See the Microsoft HTML Help FAQ for more information.
EDIT: You can rely on hh.exe
being present for all currently supported Windows versions. Who knows about future releases, but it's in the same location on all OS's I've tested on. (Win2k right through to Win7 and 2008 R2)
精彩评论