Skip to content
⌘ NSIS Forum Archive

Closing an existing application from NSIS befor installation starts.

6 posts

mmsajid#

Closing an existing application from NSIS befor installation starts.

Hi,

It would be great if someone can answer the below question.

How can I identify if the application(MyApp.exe) is running and if it is running I would like to close it before my installation begins.

Thanks for reading the question.
Anders#
thats probably not the best solution, taskkill does not exist on all systems. You are probably better off checking for a mutex or window class and tell the user to close down your app
Animaether#
In its most basic form...

_retry:
FindWindow $0 "Class or Titlebar text"
IntCmp $0 0 _done
MessageBox MB_OK "Please close [application]"
goto _retry
_done: