From e8717981a2f658c47fb718ecda9b107056ecbf7e Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Thu, 27 May 2021 20:02:13 +0200 Subject: [PATCH] check if EZPPClient Installer is already running --- EZPPClient Installer/MainWindow.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EZPPClient Installer/MainWindow.xaml.cs b/EZPPClient Installer/MainWindow.xaml.cs index 8908b6b..92f536b 100644 --- a/EZPPClient Installer/MainWindow.xaml.cs +++ b/EZPPClient Installer/MainWindow.xaml.cs @@ -36,6 +36,9 @@ namespace EZPPClient_Installer public MainWindow() { + var alreadyRunning = System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Count() > 1; + if (alreadyRunning) + this.Close(); Instance = this; InitializeComponent(); Init();