mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 06:13:36 -07:00
Fix running the uninstaller if the user chose a different path in the installer. Closes #6080.
This commit is contained in:
parent
444c2bdf19
commit
d487c69dcc
1 changed files with 10 additions and 4 deletions
14
dist/windows/installer.nsi
vendored
14
dist/windows/installer.nsi
vendored
|
@ -1,14 +1,17 @@
|
||||||
Section "-hidden"
|
Var uninstallerPath
|
||||||
|
|
||||||
|
Section "-hidden"
|
||||||
|
|
||||||
;Search if qBittorrent is already installed.
|
;Search if qBittorrent is already installed.
|
||||||
FindFirst $0 $1 "$INSTDIR\uninst.exe"
|
FindFirst $0 $1 "$uninstallerPath\uninst.exe"
|
||||||
FindClose $0
|
FindClose $0
|
||||||
StrCmp $1 "" done
|
StrCmp $1 "" done
|
||||||
|
|
||||||
;Run the uninstaller of the previous install.
|
;Run the uninstaller of the previous install.
|
||||||
DetailPrint $(inst_unist)
|
DetailPrint $(inst_unist)
|
||||||
ExecWait '"$INSTDIR\uninst.exe" /S _?=$INSTDIR'
|
ExecWait '"$uninstallerPath\uninst.exe" /S _?=$uninstallerPath'
|
||||||
Delete "$INSTDIR\uninst.exe"
|
Delete "$uninstallerPath\uninst.exe"
|
||||||
|
RMDir "$uninstallerPath"
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
||||||
|
@ -208,6 +211,9 @@ Function .onInit
|
||||||
FindClose $0
|
FindClose $0
|
||||||
StrCmp $1 "" done
|
StrCmp $1 "" done
|
||||||
|
|
||||||
|
;Copy old value to var so we can call the correct uninstaller
|
||||||
|
StrCpy $uninstallerPath $INSTDIR
|
||||||
|
|
||||||
;Inform the user
|
;Inform the user
|
||||||
MessageBox MB_OKCANCEL|MB_ICONINFORMATION $(inst_uninstall_question) /SD IDOK IDOK done
|
MessageBox MB_OKCANCEL|MB_ICONINFORMATION $(inst_uninstall_question) /SD IDOK IDOK done
|
||||||
Quit
|
Quit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue