!ifndef CONFIG_DIR !define CONFIG_DIR "config" !endif # Ar kādu faila nosaukumu būs gatavā instalācija !ifndef OUTPUT_EXE !define OUTPUT_EXE "vpn-install.exe" !endif BrandingText "VPN Installer" Caption "VPN Installer" CompletedText "VPN Installation Complete" InstProgressFlags colored smooth Name "VPN Installer" OutFile ${OUTPUT_EXE} RequestExecutionLevel admin # Nekad nerādīt instalēšanas detaļas ShowInstDetails nevershow XPStyle off Section "" # Var /GLOBAL targetdir # Maybe warn that directory is not here? # @todo check for OpenVPN Dir in Registry DetailPrint "VPN" IfFileExists "$PROGRAMFILES32\OpenVPN\bin\openvpn-gui-X.X.X.exe" goodVPN failVPN failVPN: SetOutPath $EXEDIR DetailPrint "Extracting OpenVPN $OUTDIR" # Bundle OpenVPN Installer File source\openvpn-x.x.x-install.exe # /S - instalēt klusā režīmā. Neuzdot nekādus jautājumus lietotājam ExecWait "$EXEDIR\openvpn-2.1.1-install.exe /S" $0 # Zero == Success, One == Fail, handle IntCmp $0 0 goodInstall DetailPrint "Failed to Install: $0" MessageBox MB_OK|MB_ICONSTOP "Failed to install OpenVPN, this is required to continue. Installation aborted." Quit goodInstall: Goto doneVPN goodVPN: DetailPrint "OpenVPN Already Installed" doneVPN: # WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$PROGRAMFILES32\OpenVPN\bin\openvpn-gui-x.x.x.exe" "RUNASADMIN" # @todo read registry for install values? # @todo find the registry entries for the OpenVPN configuration # ReadRegStr $0 HKLM Software\ # SetOutPath $0 SetOutPath "$PROGRAMFILES32\OpenVPN" # Full contents of Config File /r /x .svn ${CONFIG_DIR} SectionEnd