Results 1 to 6 of 6

Thread: [RESOLVED] [InnoSetup] Close Before Installation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Resolved [RESOLVED] [InnoSetup] Close Before Installation

    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

  2. #2
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: [InnoSetup] Close Before Installation

    After an hour searching, 'cause I also want this, I found this:

    Code:
    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.


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

  3. #3
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244
    Last edited by Radjesh Klauke; Mar 14th, 2010 at 05:35 PM.


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

  4. #4
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: [InnoSetup] Close Before Installation

    Here's a code which checks the processes.

    http://news.jrsoftware.org/news/inno.../msg14513.html


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2009
    Posts
    76

    Re: [InnoSetup] Close Before Installation

    Thanks For your help! One of those links contains the perfect code, although, I might just go with a Mutex We will see

    Thanks!
    E

  6. #6
    PowerPoster Radjesh Klauke's Avatar
    Join Date
    Dec 2005
    Location
    Sexbierum (Netherlands)
    Posts
    2,244

    Re: [InnoSetup] Close Before Installation

    Let me know


    If you found my post helpful, please rate it.

    Codebank Submission: FireFox Browser (Gecko) in VB.NET, Load files, (sub)folders treeview with Windows icons

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width