mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-24 15:06:44 +00:00
Always look at the registry to find vmrun.exe on Windows.
This commit is contained in:
parent
4673424da7
commit
4f61443b20
@ -97,21 +97,11 @@ class VMware(BaseManager):
|
|||||||
if sys.platform.startswith("win"):
|
if sys.platform.startswith("win"):
|
||||||
vmrun_path = shutil.which("vmrun")
|
vmrun_path = shutil.which("vmrun")
|
||||||
if vmrun_path is None:
|
if vmrun_path is None:
|
||||||
# look for vmrun.exe in default VMware Workstation directory
|
# look for vmrun.exe using the VMware Workstation directory listed in the registry
|
||||||
vmrun_ws = os.path.expandvars(r"%PROGRAMFILES(X86)%\VMware\VMware Workstation\vmrun.exe")
|
vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation")
|
||||||
if os.path.exists(vmrun_ws):
|
|
||||||
vmrun_path = vmrun_ws
|
|
||||||
else:
|
|
||||||
# look for vmrun.exe using the directory listed in the registry
|
|
||||||
vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation")
|
|
||||||
if vmrun_path is None:
|
if vmrun_path is None:
|
||||||
# look for vmrun.exe in default VMware VIX directory
|
# look for vmrun.exe using the VIX directory listed in the registry
|
||||||
vmrun_vix = os.path.expandvars(r"%PROGRAMFILES(X86)%\VMware\VMware VIX\vmrun.exe")
|
vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware VIX")
|
||||||
if os.path.exists(vmrun_vix):
|
|
||||||
vmrun_path = vmrun_vix
|
|
||||||
else:
|
|
||||||
# look for vmrun.exe using the directory listed in the registry
|
|
||||||
vmrun_path = self._find_vmrun_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware VIX")
|
|
||||||
elif sys.platform.startswith("darwin"):
|
elif sys.platform.startswith("darwin"):
|
||||||
vmrun_path = "/Applications/VMware Fusion.app/Contents/Library/vmrun"
|
vmrun_path = "/Applications/VMware Fusion.app/Contents/Library/vmrun"
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user