Hello!
How can I detect that my application is already started before beginning of deinstallation process ?
Thanx.
How can i detect started application ?
10 posts
Make your application set a mutex and use the System plug-in in the installer to check whether the mutex exists.
Originally posted by Joost VerburgShow, please, piece of the script-code demonstrating this possibility.
Make your application set a mutex and use the System plug-in in the installer to check whether the mutex exists.
FindWindow ${TEMP1} "" "My wnd caption"
SendMessage ${TEMP1} ${WM_QUIT} 0 0
not work ;(( why ?
SendMessage ${TEMP1} ${WM_QUIT} 0 0
not work ;(( why ?
Try it this way
You need the label "Win Class" - NSIS can also perfom on special sub windows here called "Win Title".
Pls read the manual to this.
To determine the right window (eg "Becky2MainFrame") uses this lite program:GoTo Running
Exit:
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(MUI_TEXT_ABORTWARNING)" \
IDNO Running
Quit
Running:
FindWindow $R9 "Becky2MainFrame" ""
IntCmp $R9 0 NotRunning
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "Becky! Internet Mail \
is akticv.Pls close Becky." IDCANCEL Exit
GoTo Running
NotRunning:
You need the label "Win Class" - NSIS can also perfom on special sub windows here called "Win Title".
Pls read the manual to this.
Using a mutex is still a better way than finding windows. Check MSDN for the CreateMutex API.
Originally posted by Joost VerburgIt is obviously even for hedgehog 😉 But how I can use WinAPI functions in NSIS-script I haven't found in docs 🙁
Using a mutex is still a better way than finding windows. Check MSDN for the CreateMutex API.
Check out ${NSISDIR}\Contrib\System and examples, with this plugin you can call any API from windows
good luck,
Ramon
good luck,
Ramon
This thread talks about using a mutex with NSIS.
Originally posted by kichikthanx!
This thread talks about using a mutex with NSIS.