One of my users had recently ran into a situation when he had an instance of our application "LabX" running while on his computer, while at the same time he launched an installer for the same application, "LabX", in order to install newer version. Installer failed because it tried to copy a dll file which was, at the same time, in use by the running instance. Is there a way in BitRock to check if an instance of an application it is about to install, is currently running (on both windows, mac, linux)?


asked 16 Aug '12, 17:41

Sasha's gravatar image

accept rate: 0%

You can check if a specific process is running with the processTest rule:


Though that will not tell you whether the process was launched for the exact same path that you want to write to, though it probably is.

You can also use the isFileLocked to detect whether a specific file is locked. This will be useful mostly for Windows, as in most cases OS X and Linux will let you overwrite a file in use.

On Windows you can also set the property replaceLockedFilesOnReboot and if any files are in use, the user will be prompted for a reboot at the end of the installation and when that happens the files will be replaced during the Windows boot process


answered 19 Aug '12, 09:30

ridruejo's gravatar image

ridruejo ♦♦
accept rate: 27%

Can I pass in a full path to the processTest so it only detects the process from that particular path?


answered 08 Jan '13, 15:47

gt8967884's gravatar image

accept rate: 12%

how can i test if "clientinstalldir/index.html" is running..?? i want to abort installation or uninstallation if "clientinstalldir/index.html" is opened in any of the browsers(like firefox or chrome or Internet Explorer) if the "clientinstalldir/index.html" is opened in any of the browser then i want to give warning to user saying "Quit all browsers before installation or uninstallation"


answered 03 Mar '15, 09:27

Mahantesh's gravatar image

accept rate: 0%

This can be done using <fileIsLocked> rule.

Please see http://answers.bitrock.com/questions/4712/check-for-html-file-is-in-use-or-not?page=1#4719 answer for more details.

(03 Mar '15, 10:55) wojciechka ♦♦
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](http://url.com/ "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: 16 Aug '12, 17:41

Seen: 2,873 times

Last updated: 03 Mar '15, 10:55