35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using Microsoft.Win32;
|
|
using System.ComponentModel;
|
|
using System.IO;
|
|
|
|
namespace VMwareLauncher
|
|
{
|
|
public class CheckDependencies
|
|
{
|
|
private BackgroundWorker performInitialChecks = new BackgroundWorker();
|
|
|
|
public void PerformCheck()
|
|
{
|
|
// Check Vmware Workstation has been installed.
|
|
if (!File.Exists(ProcessControl.DefaultVmwarePath))
|
|
{
|
|
MessageHandler.Show(MessageHandler.MessageCode.VmwareNotInstalled);
|
|
|
|
ApplicationControl.BlockingErrors = true;
|
|
}
|
|
|
|
// Determine if VML has ever run before.
|
|
string vmlPath = @"HKEY_LOCAL_MACHINE\SOFTWARE\VmwareLauncher";
|
|
string vmlKey = "HasBeenSetup";
|
|
|
|
if (Registry.GetValue(vmlPath, vmlKey, null) == null)
|
|
{
|
|
Registry.SetValue(vmlPath, vmlKey, 1);
|
|
MessageHandler.Show(MessageHandler.MessageCode.WelcomeMessage);
|
|
}
|
|
|
|
// Modify service status to manual.
|
|
ApplicationControl.BlockingErrors = Startup.serviceControl.ForceServicesManual();
|
|
}
|
|
}
|
|
} |