Skip to content
⌘ NSIS Forum Archive

Making SilentInstall Configurable

3 posts

miraz.zaidi#

Making SilentInstall Configurable

Hi All.

In my installer I am using some configurable values (by including a config.nsh at compile time)

I want to achieve such a situation when one of the values in the config.nsh is set to true my installer should install in silent mode and when it is set false , it should install in normal mode.

for instance what I want to do is

config.nsh

!define Silent_Install true

${if} ${ Silent_Install } == "true"
SilentInstall silent
${else}
;Do nothing proceed normally
${endIf}

So is it possible to achieve this ?

Thanks.
Anders#
config:
!define silentinstall

nsi:
!ifdef silentinstall
...
!endif

or if you really want to test the value, use !if