View Full Version : Checking if program is open..
3rd July 2001, 22:28
How would i check if the program ( the .exe that my nsi installs ) is open?
Becuase if somone uninstalls while they have the program open, it wont delete the program..
4th July 2001, 16:57
FindWindow close|closeinstant|prompt|goto:label windowclass [messageboxtext]
Checks for a window whose class name is 'windowclass'. If the window is found, the action is based on what 'mode' is set to.
- If mode is 'close', this command will attempt to close the window using WM_CLOSE for up to 8 seconds.
- If mode is 'closeinstant', this command will send a WM_CLOSE message to the window and continue.
- If mode is 'prompt', this command will prompt the user with 'messageboxtext' until the window is closed manually.
- If mode is 'goto:label', FindWindow will Goto label.
FindWindowByTitle close|closeinstant|prompt|goto:label windowtitle [messageboxtext]
Acts like FindWindow, only searches for a window based on title instead of class.
FindWindowByTitle goto:lbl_found 'Program v1.x'
MessageBox MB_YESNO 'Your program is active at the moment. Do you want to close it?' IDNO lbl_end
FindWindowByTitle close 'Program v1.x'
Declare the function in the un-istall section. And call the function before you're going to remove everything.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.