From 8b9bc0feadff74c41ea88f77dadbb5fa47961a4a Mon Sep 17 00:00:00 2001 From: Nate Weibley Date: Wed, 28 Jun 2017 14:22:11 -0400 Subject: [PATCH] Support Win 7/10 for #3210 --- deploy/qgroundcontrol_installer.nsi | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/deploy/qgroundcontrol_installer.nsi b/deploy/qgroundcontrol_installer.nsi index 5280accbf..5b07c3cf9 100644 --- a/deploy/qgroundcontrol_installer.nsi +++ b/deploy/qgroundcontrol_installer.nsi @@ -77,24 +77,16 @@ doinstall: WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString" "$\"$INSTDIR\QGroundControl_uninstall.exe$\"" ; Only attempt to install the PX4 driver if the version isn't present - !define ROOTKEY "SYSTEM\CurrentControlSet\Control\Class\{4D36E978-E325-11CE-BFC1-08002BE10318}" - StrCpy $0 0 -loop: - EnumRegKey $1 HKLM ${ROOTKEY} $0 - StrCmp $1 "" notfound cont1 - -cont1: - StrCpy $2 "${ROOTKEY}\$1" - ReadRegStr $3 HKLM $2 "ProviderName" - StrCmp $3 "3D Robotics" found_provider -mismatch: - IntOp $0 $0 + 1 - goto loop + !define ROOTKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\434608CF2B6E31F0DDBA5C511053F957B55F098E" + + SetRegView 64 + ReadRegStr $0 HKLM "${ROOTKEY}" "Publisher" + StrCmp $0 "3D Robotics" found_provider notfound found_provider: - ReadRegStr $3 HKLM $2 "DriverVersion" - StrCmp $3 "2.0.0.4" skip_driver - goto mismatch + ReadRegStr $0 HKLM "${ROOTKEY}" "DisplayVersion" + DetailPrint "Checking USB driver version... $0" + StrCmp $0 "04/11/2013 2.0.0.4" skip_driver notfound notfound: DetailPrint "USB Driver not found... installing" @@ -104,6 +96,7 @@ notfound: skip_driver: DetailPrint "USB Driver found... skipping install" done: + SetRegView lastused SectionEnd Section "Uninstall" -- 2.22.0