What I want is to detect 2 instances:
1. Whether the installer is running
2. Whther the application I am installing is actually running.
I can use the one instance already supplied on the FAQ for detecting the installer without issue. When attempting to use the CreateMutexA again It detects the application is running and posts the Retry Cancel options but the Retry always believes the actual application is still running even when it has been killed?!? It is in a loop somehow with the again: label before the CreatMutexA command is executed again apparently and I do not know why?
Here is my Code Script:
Function .onInit
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${PRODUCT_NAME} Installer") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK "${PRODUCT_NAME} installer is already running"
Abort
again:
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${PRODUCT_NAME}") i .r1 ?e'
Pop $R1
StrCmp $R1 0 +3
MessageBox MB_RETRYCANCEL|MB_ICONSTOP "${PRODUCT_NAME} must not be running in order to proceeed with installation" IDRETRY again IDCANCEL
Abort
FunctionEnd If someone can point out what I am doing wrong or how I can do it differently (other than FindWindow since window name has not been officially established as yet") I would appreciate the help.Thanks