Created
August 9, 2024 07:15
-
-
Save vurdalakov/43ae44c40c35a7a3690d9c0b3f1e7d5b to your computer and use it in GitHub Desktop.
Check if Windows Installer is running in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Boolean IsMsiRunning() | |
{ | |
try | |
{ | |
return Mutex.TryOpenExisting(@"Global\_MSIExecute", out _); | |
} | |
catch | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment