Check whether your application is running: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Updated author and download links, and changed format of some pages.)
m (Updated author links.)
Line 1: Line 1:
{|align=right
|<small>Author: [[{{ns:2}}:saabz_500|saabz_500]] ([[{{ns:3}}:saabz_500|talk]], [[{{ns:-1}}:Contributions/saabz_500|contrib]])</small>
|}
<br style="clear:both;">
== The Script ==
== The Script ==
<highlight-nsis>
<highlight-nsis>
Line 16: Line 20:
;For any queries mail me at :saabz_500@yahoo.co.uk
;For any queries mail me at :saabz_500@yahoo.co.uk
</highlight-nsis>
</highlight-nsis>
Page author: [[User:saabz_500|saabz_500]]

Revision as of 23:14, 29 April 2005

Author: saabz_500 (talk, contrib)


The Script

;If application is running during uninstallation,exe file is not removed !!
;This code checks for an instance of application and Prompts the user to close ;application before resuming uninstallation ..
 
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
  FindWindow $0 "WindowClassOfYourApplication" "WindowTitleOfYourApplication"  
  StrCmp $0 "0"  0 +3     ;if window active goto +3 
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +4   
  Abort
  MessageBox MB_ICONEXCLAMATION|MB_OK "Installer Found that Application you are trying to remove is running.Close it and try again!!"
  Abort
FunctionEnd
 
;For any queries mail me at :saabz_500@yahoo.co.uk