// ========================================================================================= // Constructors // ========================================================================================= /// <summary> /// Initializes a new instance of the <see cref="WixPackageSettings"/> class. /// </summary> /// <param name="serviceProvider">The <see cref="IServiceProvider"/> to use.</param> public WixPackageSettings(IServiceProvider serviceProvider) { WixHelperMethods.VerifyNonNullArgument(serviceProvider, "serviceProvider"); // get the Visual Studio registry root ILocalRegistry3 localRegistry = WixHelperMethods.GetService <ILocalRegistry3, SLocalRegistry>(serviceProvider); ErrorHandler.ThrowOnFailure(localRegistry.GetLocalRegistryRoot(out this.visualStudioRegistryRoot)); this.machineRootPath = WixHelperMethods.RegistryPathCombine(this.visualStudioRegistryRoot, @"InstalledProducts\WiX"); // initialize all of the machine settings this.toolsDirectory = new MachineSettingString(this.machineRootPath, KeyNames.ToolsDirectory, String.Empty); }
//========================================================================================== // Constructors //========================================================================================== /// <summary> /// Initializes a new instance of the <see cref="WixPackageSettings"/> class. /// </summary> /// <param name="serviceProvider">The <see cref="ServiceProvider"/> to use.</param> public WixPackageSettings(ServiceProvider serviceProvider) : base(serviceProvider, MachineSettingsRegKey) { // Initialize all of the machine settings. this.toolsDirectory = new MachineSettingString(this.MachineRootPath, KeyNames.ToolsDirectory, System.String.Empty); }
//========================================================================================== // Constructors //========================================================================================== /// <summary> /// Initializes a new instance of the <see cref="WixPackageSettings"/> class. /// </summary> /// <param name="serviceProvider">The <see cref="ServiceProvider"/> to use.</param> public WixPackageSettings(ServiceProvider serviceProvider) : base(serviceProvider, MachineSettingsRegKey) { // Initialize all of the machine settings. this.toolsDirectory = new MachineSettingString(this.MachineRootPath, KeyNames.ToolsDirectory, System.String.Empty); }