I made a small installer that initiate download the main package upon starting installer while processing user registration.
I use this command to run it silently:
ExecCmd::exec /ASYNC "$EXEDIR\Moonstius_downloader_silent.exe /S"
however it crashes ! I have no idea why, here is the code for this:
!define PRODUCT_NAME "Moontius Downloader"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "Moontius"
!define PRODUCT_WEB_SITE "http://www.moontius.com"
SetCompressor lzma
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
; Language files
!insertmacro MUI_LANGUAGE "English"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Moonstius_downloader_silent.exe"
ShowInstDetails show
Function .oninit
FunctionEnd
Section "MainSection" SEC01
InetLoad::load "http://www.ultratone.com.my/downloads/Moontius-2.2-setup-release-4.exe" "$EXEDIR\Moontius-package.exe"
SectionEnd
Section -Post
SectionEnd