diff --git a/deploy/qgroundcontrol_installer.nsi b/deploy/qgroundcontrol_installer.nsi index 0d8b3a45e11a868f289486935b76b9bdaab02c1d..322a17f38c15c59a110d16065a01a3be23fce0a3 100644 --- a/deploy/qgroundcontrol_installer.nsi +++ b/deploy/qgroundcontrol_installer.nsi @@ -11,21 +11,24 @@ UninstPage instfiles LicenseData license.txt -Section "" - +Section SetOutPath $INSTDIR File /r release\*.* WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "DisplayName" "QGroundControl" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" "UninstallString" "$\"$INSTDIR\QGroundControl_uninstall.exe$\"" SectionEnd Section "Uninstall" + SetShellVarContext all Delete $INSTDIR\QGroundControl_uninstall.exe RMDir /r /REBOOTOK $INSTDIR RMDir /r /REBOOTOK "$SMPROGRAMS\QGroundControl\" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QGroundControl" SectionEnd Section "create Start Menu Shortcuts" + SetShellVarContext all CreateDirectory "$SMPROGRAMS\QGroundControl" - CreateShortCut "$SMPROGRAMS\QGroundControl\uninstall.lnk" "$INSTDIR\QGroundControl_uninstall.exe" "" "$INSTDIR\QGroundControl_uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\QGroundControl\QGroundControl.lnk" "$INSTDIR\qgroundcontrol.exe" "" "$INSTDIR\qgroundcontrol.exe" 0 SectionEnd \ No newline at end of file