Failed to grab execution mutex. System error 258.

The error in the title can happen during MSI installations, if the msiexec global mutex is not available.

I encountered it while developing a small script that would uninstall all existing JRE versions on the machine and install the latest one (using the msi package).

Apparently the JRE uninstall command spawns the Java Automatic Update (AU) uninstaller, but returns control immediately to the caller. Hence, if I perform a JRE uninstall and immediately start another installation, it would sometime fail with MSI error 258 since Windows Installer is still busy with the AU uninstall.

The best solution I found so far is as mentioned in this Stack Overflow thread. I wrote a small program based on that code, that waits until the mutex is available (or until a certain timeout). So my script now runs the JRE uninstall, then the ‘wait for mutex’ program, and only then it launches the JRE installer, and everyone’s happy 🙂

Adding Clickable UNC paths to JIRA

I was tasked with the mission to find a way to add a UNC link to a certain shared document, in a way that every user will be able to access it.

The easiest way I found, so far, is to add a default, read-only field to each issue, so whenever creating or working on an issue, the link is available.

Yes, it’s an overkill, but other options such as adding it to the menu bar seem to require too much research and development (and perhaps being affected by the next JIRA update).

Turns out adding a clickable UNC field is a bit tricky… since there is no such field type (UNC link), and writing UNC paths in text fields doesn’t make them clickable, i figured out the following eay:

  • Add a URL field
  • Set the default value to the document path, for example: file://servername/folder/subfolder/filename.doc
  • Make it read-only using the behaviors plug-in.
  • Use a bulk action to update the field for the relevant issues (since setting a default only affects newly created issues).

Simple, effective, and future proof (and yes, database space wasting… but it’s a price I’m happy to pay).


UPDATE: It works fine in IE 11, but doesn’t work in recent Chrome and FireFox versions due to their default security settings. See this KB article for more information.