Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 3rd July 2001, 22:28   #1
spoonified
Junior Member
 
Join Date: Jul 2001
Location: Michigan
Posts: 3
Send a message via ICQ to spoonified Send a message via AIM to spoonified
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..
spoonified is offline   Reply With Quote
Old 4th July 2001, 16:57   #2
Kaboon
Moderator
 
Kaboon's Avatar
 
Join Date: Jun 2000
Location: Netherlands
Posts: 2,485
Send a message via ICQ to Kaboon
[list][*]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.

An example:

Function un.CloseApp

FindWindowByTitle goto:lbl_found 'Program v1.x'
goto lbl_end

lbl_found:
MessageBox MB_YESNO 'Your program is active at the moment. Do you want to close it?' IDNO lbl_end
FindWindowByTitle close 'Program v1.x'

lbl_end:

FunctionEnd

Declare the function in the un-istall section. And call the function before you're going to remove everything.
Kaboon is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump