kahuna83
18th November 2011 16:29 UTC
passive installer with nsis
ji everybody,
i found an installer which was made with nsis i think
http://www2.kodakdental.com/files/dr...uprvgtwain.exe
if i used the "/S" parameter at command line the instfiles page is shown as you can see here:
http://imageshack.us/photo/my-images...benanntby.jpg/
could somebody told me how to do this. if i use the "/S" on my installers there will be no window shown.
MSG
18th November 2011 16:44 UTC
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
18th November 2011 16:50 UTC
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
MSG
18th November 2011 17:20 UTC
Ah yes, I keep forgetting about the bloody silent flag. Hate that feature. ~_~