A small open source app for deleting mutexes on Windows.

This program, KillMutex, can be used on Windows to delete mutexes even when other processes hold open handles to them.

KillMutex works on all versions of Windows from XP to 11.

Two other programs, Process Explorer and Handle, written by Mark Russinovich and published by Sysinternals (Microsoft), can also be used for this purpose, but KillMutex does this task more conveniently from a bat file because it requires only one call. It's also faster when used for this purpose and smaller.

KillMutex was written originally by Robert Sacks for three programs he published for gamers starting around 2005: LottaCam, HotkeyNet, and Mojo.

The command line syntax for KillMutex is:

KillMutex mutex1 [mutex2 [mutex3 ...] ]

Where mutex1, mutex2, etc., are fully qualified mutex names. There is no limit on the number of names you can include on the command line.

Build this solution with Visual Studio 2019, platform toolset v242, C++ 14. Nothing else is needed and there are no dependencies.\

This program must run as administrator.


On 64-bit windows, always use a 64-bit version of this program.

You may also need

If Windows tells you it can’t find VCRUNTIME140.DLL or some other file, go to this link on Microsoft’s website and install the 64 bit C++ redistributable package for Visual Studio 2019.

How do I use this?

Suppose you want to delete two mutexes called \BaseNamedObjects\Hokum1 and \BaseNamedObjects\Hokum2.

1. Download the executable file from this page, extract it from the zip file, and put it in a folder on your hard disk.

2. In Windows Explorer, right click KillMutex.exe and select "Create shortcut." Drag the shortcut onto your Desktop.

3. Right click the shortcut and select "Properties".

4. Click "Advanced."

5. Check "Run as administrator."

6. Click "OK".

7. Change the Target field by adding a space after the existing text, then the name of the first mutex, then a space, then the name of the second mutex. The target field is small so it will probably be hard to do this. To make it easier, type all the information in Notepad or some other editor, then copy and paste it into the Target field. If there are spaces in the name of a mutex, you need to enclose the name in quotation marks.

8. Click "OK".

You’re done. To delete the mutexes, double click the shortcut.

KillMutex copyright 2005-2021 Robert Sacks.

This page was first published on May 5, 2021 and last revised on June 28, 2021.