diff --git a/resources/installer.nsh b/resources/installer.nsh index fc9ef163cf..48b48dced2 100644 --- a/resources/installer.nsh +++ b/resources/installer.nsh @@ -32,6 +32,9 @@ RequestExecutionLevel admin !macro customInstall Var /GLOBAL DriverDir + Var /GLOBAL Installer_x64 + Var /GLOBAL Installer_x86 + StrCpy $DriverDir "$INSTDIR\resources\driver" ; Add our certificate to the local store to prevent unnecessary pop-up @@ -41,24 +44,32 @@ RequestExecutionLevel admin ${If} ${IsWin10} ; Windows 10 uses drivers with attestation signing - CopyFiles $DriverDir\win10\* $DriverDir + CopyFiles /SILENT $DriverDir\win10\* $DriverDir ${EndIf} + + StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe /q" + StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe /q" + + IfSilent +3 ; don't use quiet flag if not silent install + StrCpy $Installer_x64 "$DriverDir\TidepoolUSBDriver_x64.exe" + StrCpy $Installer_x86 "$DriverDir\TidepoolUSBDriver_x86.exe" + ${If} ${RunningX64} ${If} ${IsWin7} ; 64-bit Windows 7 CopyFiles $DriverDir\win7x64\* $DriverDir\amd64 - ExecWait "$DriverDir\TidepoolUSBDriver_x64.exe" + ExecWait $Installer_x64 ${Else} - ExecWait "$DriverDir\TidepoolUSBDriver_x64.exe" + ExecWait $Installer_x64 ${EndIf} ${Else} ${If} ${IsWin7} ; 32-bit Windows 7 CopyFiles $DriverDir\win7x86\* $DriverDir\i386 - ExecWait "$DriverDir\TidepoolUSBDriver_x86.exe" + ExecWait $Installer_x86 ${Else} - ExecWait "$DriverDir\TidepoolUSBDriver_x86.exe" + ExecWait $Installer_x86 ${EndIf} ${EndIf}