diff --git a/cmake/modules/NSIS.template.in b/cmake/modules/NSIS.template.in index 98d5a3df69..8e1b8a5dea 100644 --- a/cmake/modules/NSIS.template.in +++ b/cmake/modules/NSIS.template.in @@ -741,6 +741,8 @@ Function .onInit Quit ${EndSwitch} + ClearError + ;Prevent multiple instances. System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Installer") i .r1 ?e' Pop $R0 @@ -806,6 +808,8 @@ Function un.onInit Quit ${EndSwitch} + ClearError + ;Prevent multiple instances. System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${APPLICATION_SHORTNAME}Uninstaller") i .r1 ?e' Pop $R0