Skip to content
⌘ NSIS Forum Archive

Plugins itdownload.dll

4 posts

Coby#

Plugins itdownload.dll

How do I download files using this plugin itdownload.dll?
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 
Anders#
You are not sure? Does it work or not? Without knowing the function signature there is nothing I can do to help.
Coby#
Using the above configuration it works.
More about this plugin can be found here: http://www.sherlocksoftware.org/page.php?id=2



I have already contacted the manufacturer of the plugin for a variant of use and NSIS.
Anders#
IDT_DownloadFile only takes 2 parameters, not 3 and you want 'm' not 't' unless they also have a Unicode version.