Say, we have the following scenario:

  • a user has installed my software using BitRock installer already
  • a user downloads a new version (doesn't matter manually or using auto update tool)
  • a user runs installation process but previous version of my software is still running in backgournd.

I would like to do the following: I would like to send some message to my application to ask it to quit. Then the installer should wait until my application is finished and run installation. Than it should restart software if it was terminated on previous step.

I found how to notify a user if my process is running but I haven't found any way to to communicate with external proccess. I would like to have cross-platform solution but it is ok if you suggest something for Windows only.

asked 14 Feb '12, 05:38

Alexander's gravatar image

accept rate: 0%

You can use built-in actions and rules to implement checking that process exists and waiting for it to exit. You can either bundle an application that sends an appropriate message (i.e. using SendMessage() API) or use the built-in <kill> action.

The example with shipping an application to quit is as follows:

        <title>Requesting myapp to exit</title>

This checks that myapp.exe is running, if it is, it asks the application to exit and waits for it to exit. It also shows a progress dialog so user is aware what is happening.

It keeps sending the quit message until the process exits. It can be moved to before the <while> action so that sending the message is only done once.

As for using the <kill> action, you can simply replace <runProgram> with:


This will terminate the application, however, it will prevent asking user to perform certain actions - i.e. ask if it should write unsaved data.


answered 14 Feb '12, 05:55

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Thank you very much!

(14 Feb '12, 06:14) Alexander
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 14 Feb '12, 05:38

Seen: 1,709 times

Last updated: 14 Feb '12, 06:14