Archive: Baffled using ExecWait and rtf file


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

<alert comment="hold your nose">

I can sort of get a work-around to be nearly acceptable by having multiple license pages.

I can use


Caption "Revised Caption for License"
LicenseText "Revised License Text" "RevButton"
LicenseData RtfLicense.rtf
Page license
Page directory
Page components
LicenseText "Revised Tutorial Text" "TutButton"
LicenseData RtfTutorial.rtf
Caption "Revised Caption for Tutorial"
Page license
Page instfiles

The remaining problems is that the TitleBar caption still has "License Agreement" and I don't see how to change or remove this. Can this be done?

Is this a flawed approach and a better approach would be ...?

Should I be looking more closely at PageEx?

</alert>

With PageEx you should be able to change the caption.

PageEx license
Caption "blah"
PageExEnd

Worked fine ... thanks for the prompt and very informed reply

(and patience with this struggling nsis wannabe ... I have been spoiled by the helpfulness of members of this forum ... and need to be conscious of not getting lazier and doing inadequate research before asking ... let me know if that is already the case or if I'm getting borderline)