;-------------------------------- ; Defines !define APPLICATION "Instalator SecureW2 DFNRoaming" !define VERSION "1.0.0" ;-------------------------------- ;Include Modern UI !include "MUI.nsh" ;-------------------------------- ;General ;Name and file Name "${APPLICATION} ${VERSION}" OutFile "SecureW2_312_DFNRoaming.exe" ;-------------------------------- ;Interface Settings !define MUI_ICON "dfnroaming.ico" !define MUI_UNICON "dfnroaming.ico" !define MUI_ABORTWARNING !define CERT_FILE "root.der" !define SECW2_FILE "SecureW2_312.exe" ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Installer Sections Section "${APPLICATION}" SecInstall SectionIn RO ; ; Extract all file to the temp dir ; SetOutPath $TEMPDIR ; ; Define all the files required for the installation here: ; SecureW2_312.exe, ; SecureW2.inf and ; all the certificates ; Note: The locations are relative to the .nsi file ; File ${SECW2_FILE} File "SecureW2.INF" File ${CERT_FILE} ExecWait "rundll32 cryptext.dll,CryptExtOpenCER ${CERT_FILE}" ExecWait ${SECW2_FILE} ; ; If an error occurs then goto Error label else goto Continue label ; IfErrors Error Goto Continue ; ; Error Label, show error box and then quit ; Error: MessageBox MB_OK|MB_ICONEXCLAMATION "Error while installing SecureW2. Please try again, otherwise contact your System Adminstrator" ; ; Continue Label ; Continue: ; ; Remove temporary files ; Delete "$TEMPDIR\SecureW2_312.exe" Delete "$TEMPDIR\SecureW2.INF" Delete "$TEMPDIR\root.der" Quit SectionEnd