Files
VMwareLauncher/VmwareLauncher/InstanceCheck.cs
2019-03-05 20:24:01 +00:00

25 lines
549 B
C#

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);
}
}
}
}