Files
Dunestorm 6d7fec03b4 [VMware Launcher 2.0.9.5]
- Refactored code.
- Fixed bug: "#1 Welcome message shows despite VMware not being installed"
2021-03-26 20:20:46 +00:00

33 lines
1.0 KiB
C#

using Microsoft.Win32;
using System.ComponentModel;
using System.IO;
namespace VMwareLauncher
{
public class CheckDependencies
{
private readonly BackgroundWorker performInitialChecks = new BackgroundWorker();
public void PerformCheck()
{
// Check Vmware Workstation has been installed.
if (!File.Exists(ProcessControl.DefaultVmwarePath))
{
MessageHandler.Show(MessageHandler.MessageCode.VmwareNotInstalled);
ApplicationControl.Shutdown(-1);
}
else
{
// 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);
}
}
}
}
}