Skip to content
⌘ NSIS Forum Archive

Conditional SilentInstall

5 posts

yazno#
hi,

on compiletime --> yes

;!define silent

!ifdef silent
SilentInstall Silent
!endif

on runtime --> nope

cu yzo
saivert#
Conditional SilentInstall on runtime

You may have to installers, one silent and one verbose.
Then make a third installer that runs one of these depending on something. An example script for such function is as follows:

Name Installer checker
; The installer checker is ofcourse silent itself.
Silent

Section ""
StrCmp $1 $2 silent notsilent

silent:
ExecWait $TEMP\verboseinstaller.exe
goto end

notsilent:
ExecWait $TEMP\silentinstaller.exe
end:
SectionEnd
You have to fiddle with the example a bit ofcourse...
yazno#
hi,

did you recognize that this would double the installer size?

Then better use the param /S (1.42 only)

Setup.exe --> normal
Setup.exe /S --> silent

cu yzo

rfb#
ahh, alhought not the answer I was looking for, /S works prefectly for my application.

thank alot!
-ryan