Commit 30579165 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5356 from NaterGator/win10drivercheck

Support Win 7/10 for #3210
parents 6edd9f6e 8b9bc0fe
...@@ -77,24 +77,16 @@ doinstall: ...@@ -77,24 +77,16 @@ doinstall:
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString" "$\"$INSTDIR\QGroundControl_uninstall.exe$\"" 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 ; Only attempt to install the PX4 driver if the version isn't present
!define ROOTKEY "SYSTEM\CurrentControlSet\Control\Class\{4D36E978-E325-11CE-BFC1-08002BE10318}" !define ROOTKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\434608CF2B6E31F0DDBA5C511053F957B55F098E"
StrCpy $0 0
loop: SetRegView 64
EnumRegKey $1 HKLM ${ROOTKEY} $0 ReadRegStr $0 HKLM "${ROOTKEY}" "Publisher"
StrCmp $1 "" notfound cont1 StrCmp $0 "3D Robotics" found_provider notfound
cont1:
StrCpy $2 "${ROOTKEY}\$1"
ReadRegStr $3 HKLM $2 "ProviderName"
StrCmp $3 "3D Robotics" found_provider
mismatch:
IntOp $0 $0 + 1
goto loop
found_provider: found_provider:
ReadRegStr $3 HKLM $2 "DriverVersion" ReadRegStr $0 HKLM "${ROOTKEY}" "DisplayVersion"
StrCmp $3 "2.0.0.4" skip_driver DetailPrint "Checking USB driver version... $0"
goto mismatch StrCmp $0 "04/11/2013 2.0.0.4" skip_driver notfound
notfound: notfound:
DetailPrint "USB Driver not found... installing" DetailPrint "USB Driver not found... installing"
...@@ -104,6 +96,7 @@ notfound: ...@@ -104,6 +96,7 @@ notfound:
skip_driver: skip_driver:
DetailPrint "USB Driver found... skipping install" DetailPrint "USB Driver found... skipping install"
done: done:
SetRegView lastused
SectionEnd SectionEnd
Section "Uninstall" Section "Uninstall"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment