Baffled using ExecWait and rtf file
I'm stumped getting an rtf file to show up in "wait" mode in the middle of a script. I want an option to look at something like MyAppMiniTutorial.rtf midway thru installation.
I can get ExecShell to "open" the file, but I don't see how it can be made to "wait". That would be ok for .onInstSuccess being done right at the end, but I'm hoping to be able to do this "midway" thru the install.
Without being able to "wait", a whole series of components are showing up, rather than one at a time.
;Name and file
Name "Demo of Rtf problem"
OutFile "RtfDemoSetup.exe"
;Default installation folder
InstallDir "$PROGRAMFILES\RtfProblem"
Page directory
Page components
Page instfiles
;--------------------------------
;Installer Sections
Section /o "Install exe and rtf file"
SetOutPath "$INSTDIR"
File RtfExample.rtf
WriteUninstaller "$INSTDIR\Uninstall.exe"
ExecWait "WordPad RtfExample.rtf"
SectionEnd
Section /o "Try WordPad (no path for its exe given)"
ExecWait "WordPad RtfExample.rtf"
SectionEnd
Section /o "Try WordPad (provide its full path)"
ExecWait "$PROGRAMFILES\Windows NT\Accessories\WordPad.exe RtfExample.rtf"
SectionEnd
Section /o "Try WordPad (provide both full path)"
ExecWait '"$PROGRAMFILES\Windows NT\Accessories\WordPad.exe $INSTDIR\RtfExample.rtf"'
SectionEnd
Section /o "Try no app named ... just $INSTDIR rtf file"
ExecWait '"$INSTDIR\RtfExample.rtf"'
SectionEnd
Section /o "Try no app named ... just rtf file"
ExecWait "RtfExample.rtf"
SectionEnd
Section /o "Try ExecShell"
ExecShell "open" "$INSTDIR\RtfExample.rtf"
SectionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
RMDir /r "$INSTDIR"
SectionEnd
Function .onInstSuccess
;; ExecWait "$INSTDIR\RtfExample.rtf"
ExecShell "open" '"$INSTDIR\RtfExample.rtf"' ; works except invokes winword rather than notepad
;; ExecShell "open with" '"$INSTDIR\RtfExample.rtf"' ; works ... winword
; ExecWait "$PROGRAMFILES\Windows NT\Accessories\WordPad.exe RtfExample.rtf"
;; ExecWait "WordPad RtfExample.rtf"
;; ExecWait "WordPad $INSTDIR\RtfExample.rtf"
FunctionEnd