/// <summary> /// Get the install path for the admin extension /// </summary> /// <returns></returns> public static string GetAdminExtensionInstallPath() { if (SetupConstants.adminExtensionInstallationPath == null) { SetupConstants.adminExtensionInstallationPath = SetupConstants.GetInstallPathFromRegistry(SetupConstants.ServerSetupInfoRegKey); } return(SetupConstants.adminExtensionInstallationPath); }
public override bool ValidatePage() { try { String selectedLocation = this.textBoxInstallationLocation.Text; if (!selectedLocation.EndsWith(Path.DirectorySeparatorChar.ToString())) { selectedLocation = selectedLocation + Path.DirectorySeparatorChar.ToString(); } // If this is an upgrade, we cannot let the user choose the same location as // the previous installation if (PropertyBagDictionary.Instance.PropertyExists(PropertyBagConstants.VMMSupportedVersionInstalled)) { if (PropertyBagDictionary.Instance.PropertyExists(PropertyBagConstants.ServerVersion) && selectedLocation.Equals(SetupConstants.GetServerInstallPath(), StringComparison.OrdinalIgnoreCase)) { throw new Exception("An installation already exists at this location"); } } SetupInputs.Instance.EditItem(SetupInputTags.BinaryInstallLocationTag, selectedLocation); // Need to save the installation location in property bag for prerequisite check PropertyBagDictionary.Instance.SafeAdd(PropertyBagConstants.InstallationLocation, this.textBoxInstallationLocation.Text); } catch (Exception backEndErrorException) { SetupLogger.LogException(backEndErrorException); SetupHelpers.ShowError(backEndErrorException.Message); return(false); } return(true); }
public static string GetServerSetupPath() { return(Path.Combine(SetupConstants.GetServerInstallPath(), SetupConstants.SetupDirectory)); }