Preventing Multiple Instances of a Windows App — Named Mutexes and Activating the Existing Window on a Second Launch (archived 2026-07-27)
This article organizes the classic requirement for business Windows apps — 'don't let the same app launch twice' — around a named Mutex. We cover the pitfall of RDP environments caused by the difference between the Global\ and Local\ namespaces, the owning-thread constraint and AbandonedMutexException, bringing the existing instance's window to the front despite SetForegroundWindow's restrictions, and passing launch arguments through, all backed by production-ready C# code. Archived version of https://comcomponent.com/en/blog/single-instance-mutex-guide/, as published on 2026-07-27. The live article is maintained and may change after this date. First published 2026-07-04.
Authors
- Go Komura (ORCID: https://orcid.org/0009-0008-8895-8390)
Institutions
- Fujikura (United States) (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-07-27
- DOI
- https://doi.org/10.5281/zenodo.21614731
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00