diff --git a/gns3server/compute/dynamips/__init__.py b/gns3server/compute/dynamips/__init__.py index b1211a47..eae8ab61 100644 --- a/gns3server/compute/dynamips/__init__.py +++ b/gns3server/compute/dynamips/__init__.py @@ -252,6 +252,9 @@ class Dynamips(BaseManager): # look for Dynamips dynamips_path = self.config.settings.Dynamips.dynamips_path if not os.path.isabs(dynamips_path): + if sys.platform.startswith("win") and hasattr(sys, "frozen"): + dynamips_dir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "dynamips")) + os.environ["PATH"] = os.pathsep.join(dynamips_dir) + os.pathsep + os.environ.get("PATH", "") dynamips_path = shutil.which(dynamips_path) if not dynamips_path: diff --git a/gns3server/compute/vpcs/vpcs_vm.py b/gns3server/compute/vpcs/vpcs_vm.py index 47e66473..b42c4095 100644 --- a/gns3server/compute/vpcs/vpcs_vm.py +++ b/gns3server/compute/vpcs/vpcs_vm.py @@ -142,6 +142,9 @@ class VPCSVM(BaseNode): vpcs_path = self._manager.config.settings.VPCS.vpcs_path if not os.path.isabs(vpcs_path): + if sys.platform.startswith("win") and hasattr(sys, "frozen"): + vpcs_dir = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.executable)), "vpcs")) + os.environ["PATH"] = os.pathsep.join(vpcs_dir) + os.pathsep + os.environ.get("PATH", "") vpcs_path = shutil.which(vpcs_path) return vpcs_path