File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1616; https://nsis.sourceforge.io/Docs/Modern%20UI%202/Readme.html
1717
1818; TODO:
19- ; * Fix PreventMultipleInstances.
2019; * Add Tesseract icon and images for installer.
2120
2221SetCompressor /FINAL /SOLID lzma
@@ -1456,12 +1455,13 @@ FunctionEnd
14561455
14571456; Prevent running multiple instances of the installer
14581457Function PreventMultipleInstances
1459- ; TODO: Does not work.
14601458 Push $R0
1461- System::Call 'kernel32::CreateMutexA(i 0, i 0, t ${PRODUCT_NAME}) ?e'
1459+ System::Call 'kernel32::CreateMutex(p 0, i 0, t " ${PRODUCT_NAME}") p .r1 ?e'
14621460 Pop $R0
1463- StrCmp $R0 0 +3
1461+ ; 183 is the Windows error code for ERROR_ALREADY_EXISTS
1462+ StrCmp $R0 183 0 +4
14641463 MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK
1464+ Pop $R0
14651465 Abort
14661466 Pop $R0
14671467FunctionEnd
You can’t perform that action at this time.
0 commit comments