Skip to content
⌘ NSIS Forum Archive

passive installer with nsis

4 posts

kahuna83#

passive installer with nsis

ji everybody,

i found an installer which was made with nsis i think



if i used the "/S" parameter at command line the instfiles page is shown as you can see here:
Host your images online with an easy to use image uploader, albums, photo hosting, sharing, dynamic image resizing on web and mobile.


could somebody told me how to do this. if i use the "/S" on my installers there will be no window shown.
MSG#
NSIS does (almost) nothing automatically. If you want your installer to respond to a parameter, you have to code that behavior yourself.

First step, the manual: http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.11
Anders#
Try something like this:
outfile test.exe
requestexecutionlevel user
InstallDir "$programfiles\myapp"
!include LogicLib.nsh

page directory SkipPageIfSilent
page components SkipPageIfSilent
page instfiles

Var MySilent

Function .onInit
${If} ${Silent}
SetSilent normal
StrCpy $MySilent 1
SetAutoClose true
${EndIf}
FunctionEnd

Function SkipPageIfSilent
${IfThen} $MySilent <> 0 ${|} Abort ${|}
FunctionEnd

section
Sleep 333
Sleep 333
Sleep 333
Sleep 333
sectionend