Reputation: 127
I have created a patch script where I have three sections but I need to run this only if the currently installed version is say '3.1'. So I have created a custom Page where I can go and check the current version - if it is indeed '3.1' I go and install the patch, otherwise I skip all sections. But DetailPrint in the page function never prints out. Can anyone suggested any other way to solve this simple problem?
Name nsDialogs
OutFile nsDialogs.exe
XPStyle on
Page custom checkInstalledVersion
Page instfiles
Function checkInstalledVersion
; perform some checking to get the currently installed version
DetailPrint "You cannot install the patch on this version."
FunctionEnd
Section
DetailPrint "hello world"
SectionEnd
Upvotes: 0
Views: 832
Reputation: 12882
Let me quote one of developers to answer your question:
DetailPrint
prints to the install log window. That window is only available when theinstfiles
page is reached. Sections are executed when theinstfiles
page shows, and that's why you [only] seeDetailPrint
[when] used in sections.
You can use a MessageBox
instead.
Upvotes: 1