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

Force uninstall before new install

parent b2e9e134
......@@ -33,4 +33,14 @@ Section "create Start Menu Shortcuts"
SetShellVarContext all
CreateDirectory "$SMPROGRAMS\QGroundControl"
CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0
SectionEnd
\ No newline at end of file
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