This plugin is used mainly installers Inno Setup but we tried to use it and NSIS
I'm not sure if this is the correct configuration.
# INFO #
Name "itdownload"
OutFile "itdownload.exe"
InstallDir "$TEMP\itdownload"
# COMPRESSOR #
SetCompressor /SOLID /FINAL lzma
# RUNTIME #
RequestExecutionLevel "USER"
# HIDE # SHOW #
ShowInstDetails nevershow
ShowUninstDetails NeverShow
# INCLUDES #
!include "MUI2.nsh"
# STYLE & ICON #
BrandingText ` `
# PAGE #
Page instfiles "" ""
# LANGUAGE #
!insertmacro MUI_LANGUAGE English
# INIT #
Function .onInit
InitPluginsDir
SetOverwrite try
AllowSkipFiles off
Setoutpath "$PLUGINSDIR"
File "${NSISDIR}\Plugins\itdownload.dll"
FunctionEnd
# SECTION #
Section "MAIN" SEC01
ClearErrors
CreateDirectory "C:\Downloads"
DetailPrint `Downloading ... Please wait ...`
System::Call '$PLUGINSDIR\itdownload.dll::itd_downloadfile(t"http://download.iobit.com/unlocker-setup.exe", t"C:\Downloads\unlocker-setup.exe",i0)i.s'
Pop $0
${If} $0 = 0
DetailPrint `$0`
${Else}
DetailPrint `$0`
${Endif}
Setautoclose "True"
SectionEnd
# END #
Function .onGUIEnd
FunctionEnd