ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Programmer Libs

DLL Helper and INNO Setup Example: Closing/Messaging Apps for Install/Uninstall


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:

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
--- --- section, and the one [files] line regarding closeapp2.dll.

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:

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.

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.

i'm just impressed you managed to get something to work from my example.. i know it wasn't very clear.

well, you know, it's not really rocket science either ;) I take it as a compliment though :D


[0] Message Index

Go to full version