Commit 055addd8 authored by Don Gagne's avatar Don Gagne

Force uninstall before new install

parent b2e9e134
...@@ -34,3 +34,13 @@ Section "create Start Menu Shortcuts" ...@@ -34,3 +34,13 @@ Section "create Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\QGroundControl" CreateDirectory "$SMPROGRAMS\QGroundControl"
CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0 CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd SectionEnd
Function .onInit
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString"
StrCmp $R0 "" done
MessageBox MB_OK|MB_ICONEXCLAMATION \
"QGroundControl is already installed. $\n$\nYou must uninstall the previous version before installing a new one."
Abort
done:
FunctionEnd
\ No newline at end of file
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