PDA

Click to See Complete Forum and Search --> : [RESOLVED] [InnoSetup] Close Before Installation


Matchlighter
Mar 13th, 2010, 07:04 PM
I am getting ready to deploy an Application of mine with Inno Setup (5.3.6). I have the installer and un-installer completly tested, but I would like to know if there is a way to have Inno close the application before it Un-Installs? I don't want to have it saying "Not all files could be removed, you can remove them yourself if you want to." My program is made using VB.Net 2008. I'd appreciate your help! :) Also, The program uses an on Form Closing event to save data, so if you could tell me how to do this and still make that Event fire, that would be great! Thanks!

E

Radjesh Klauke
Mar 14th, 2010, 06:11 PM
After an hour searching, 'cause I also want this, I found this:

const
WM_CLOSE = $0010;
function InitializeSetup: Boolean;
var
Wnd: HWND;
begin
Wnd := FindWindowByWindowName('<window name>');
if Wnd <> 0 then SendMessage(Wnd, WM_CLOSE, 0, 0);
Result := True;
end;
but I don't know how to implement this. Let me know how it works if you can make it work.

Radjesh Klauke
Mar 14th, 2010, 06:31 PM
Also look at this: http://www.vincenzo.net/isxkb/index.php?title=Detect_if_an_application_is_running
and http://news.jrsoftware.org/news/innosetup/msg23956.html

Radjesh Klauke
Mar 16th, 2010, 03:16 AM
Here's a code which checks the processes.

http://news.jrsoftware.org/news/innosetup.code/msg14513.html

Matchlighter
Mar 16th, 2010, 02:37 PM
Thanks For your help! One of those links contains the perfect code, although, I might just go with a Mutex We will see :D

Thanks!
E

Radjesh Klauke
Mar 23rd, 2010, 06:35 AM
Let me know ;)