mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Revert "NSIS: Create a mutex to ensure only one installer is running" (#23540)
This reverts commit 530c7d1bbd.
The installer uses the `UAC` plugin which creates two instances of the
installer when launched. One runs with admin privileges while the other
with user privileges. Creating a mutex in the first instance stops the
other one from continuing.
PR #23540
This commit is contained in:
12
dist/windows/installer.nsh
vendored
12
dist/windows/installer.nsh
vendored
@@ -112,18 +112,6 @@ SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
Function .onInit
|
||||
; create a mutex to ensure only one installer is running
|
||||
System::Call 'kernel32::CreateMutex(p 0, b 0, t "qbt_installer") p . r1 ?e'
|
||||
Var /GLOBAL CreateMutexResult
|
||||
Pop $CreateMutexResult
|
||||
IntCmpU $CreateMutexResult 183 isDuplicateInstance isUniqueInstance isUniqueInstance
|
||||
|
||||
isDuplicateInstance:
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_already_running) /SD IDOK
|
||||
SetErrorLevel 183 # WinError.h: `ERROR_ALREADY_EXISTS`
|
||||
Abort
|
||||
|
||||
isUniqueInstance:
|
||||
|
||||
!insertmacro Init "installer"
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
|
||||
Reference in New Issue
Block a user