Welcome Guest.   Make a donation to an author on the site October 24, 2014, 07:46:57 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DLL Helper and INNO Setup Example: Closing/Messaging Apps for Install/Uninstall  (Read 5787 times)
mouser
First Author
Administrator
*****
Posts: 33,581



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: December 04, 2010, 01:02:50 PM »

Ok I will try to package this up better with a readme, but in the effort of getting this out now, i'm uploading now.

This zip includes a sample inno setup script along with closeapp2.dll, a 50k utility that can be used with installers to force a running program to exit before installation and after uninstallation, in order to avoid problems with replacing files in use.

The closeapp2.dll can also send windows messages to a target application, useful for things like signaling an app to unload and reload plugins during installation/uninstallation (FARR uses this technique).

Download here:
http://www.donationcoder..../CloseApp_InstallTest.zip

You will see 2 versions of the inno setup script; one is traditional and one is for if you do not pack your setup files inside the installer itself (i use this to manually pack my installation files in a self-extracting zip file).

The inno script is a tiny bit hairy because of the tricky case of uninstalling something and needing to signal plugin reloading after normal inno uninstallation processes complete.

The important part of the INNO script is the complete
[copy or print]
section, and the one [files] line regarding closeapp2.dll.
Logged
mouser
First Author
Administrator
*****
Posts: 33,581



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: December 04, 2010, 06:29:28 PM »

Anyone who wants to make their installer force a program to exit during installation and uninstallation so that it can be replaced (or uninstalled) may find this useful.  The example is for Inno Setup, but any installer that can run a dll should be able to use it.  Why this feature isn't built into Inno Setup i'll never understand.  The Inno Setup sample itself may provide useful to people wondering how to do this with Inno Setup.

It's based on code Eugene Polonsky from: http://www.codeproject.co.../threads/killprocess.aspx

Sorry that i haven't written any helpful instructions yet, but the example should make it pretty clear how to use it.  Just ask quesitons and i'm happy to advise.
Logged
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: December 07, 2010, 08:36:21 AM »

Thanks mouser. Works perfectly for installing my plugins with Inno Setup now. I'll post a cleaned up, working example Inno Setup config file in the FARR plugins forum with a link to this topic.
Logged

mouser
First Author
Administrator
*****
Posts: 33,581



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: December 07, 2010, 09:05:41 AM »

i'm just impressed you managed to get something to work from my example.. i know it wasn't very clear.
Logged
phitsc
Honorary Member
**
Posts: 1,010



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: December 07, 2010, 09:11:19 AM »

well, you know, it's not really rocket science either Wink I take it as a compliment though cheesy
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.042s | Server load: 0.07 ]