using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace VmwareLauncher { class InstanceCheck { public void doCheck() { Process[] proc = Process.GetProcessesByName("vmwarelauncher"); if (proc.Count() != 1) { ErrorHandler.ShowError(ErrorHandler.ErrorCode.TooManyVMLInstances); Environment.Exit(0); } } } }