Cosmos/source2/Debug/Cosmos.Debug.VSDebugEngine/Host/VMWareWorkstation.cs
kudzu_cp f00f425a74
2012-06-24 19:02:20 +00:00

36 lines
1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Win32;
using Vestris.VMWareLib;
namespace Cosmos.Debug.VSDebugEngine.Host {
public class VMwareWorkstation : VMware {
public VMwareWorkstation(string aVmxFile)
: base(aVmxFile) {
}
public static bool IsInstalled {
get {
return GetWorkstationPathname() != null;
}
}
protected override string GetParams() {
// -x: Auto power on VM. Must be small x, big X means something else.
// -q: Close VMWare when VM is powered off.
// Options must come beore the vmx, and cannot use shellexecute
return "\"" + GetWorkstationPathname() + "\" -x -q \"" + mVmxFile + "\"";
}
protected static string GetWorkstationPathname() {
return GetPathname("VMware Workstation", "vmware.exe");
}
protected override void ConnectToVMWare(VMWareVirtualHost aHost) {
aHost.ConnectToVMWareWorkstation();
}
}
}