public NetSdkMsiInstallerClient(InstallElevationContextBase elevationContext, ISetupLogger logger, IWorkloadResolver workloadResolver, SdkFeatureBand sdkFeatureBand, INuGetPackageDownloader nugetPackageDownloader = null, VerbosityOptions verbosity = VerbosityOptions.normal, PackageSourceLocation packageSourceLocation = null, IReporter reporter = null) : base(elevationContext, logger, reporter) { _packageSourceLocation = packageSourceLocation; _nugetPackageDownloader = nugetPackageDownloader; _sdkFeatureBand = sdkFeatureBand; _workloadResolver = workloadResolver; _dependent = $"{DependentPrefix},{sdkFeatureBand},{HostArchitecture}"; Log?.LogMessage($"Executing: {CurrentProcess.GetCommandLine()}, PID: {CurrentProcess.Id}, PPID: {ParentProcess.Id}"); Log?.LogMessage($"{nameof(IsElevated)}: {IsElevated}"); Log?.LogMessage($"{nameof(Is64BitProcess)}: {Is64BitProcess}"); Log?.LogMessage($"{nameof(RebootPending)}: {RebootPending}"); Log?.LogMessage($"{nameof(ProcessorArchitecture)}: {ProcessorArchitecture}"); Log?.LogMessage($"{nameof(HostArchitecture)}: {HostArchitecture}"); Log?.LogMessage($"{nameof(SdkDirectory)}: {SdkDirectory}"); Log?.LogMessage($"SDK feature band: {_sdkFeatureBand}"); if (IsElevated) { // Turn off automatic updates. We don't want MU to potentially patch the SDK // and it also reduces the risk of hitting ERROR_INSTALL_ALREADY_RUNNING. UpdateAgent.Stop(); } }
public MsiPackageCache(InstallElevationContextBase elevationContext, ISetupLogger logger, string packageCacheRoot = null) : base(elevationContext, logger) { PackageCacheRoot = string.IsNullOrWhiteSpace(packageCacheRoot) ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads") : packageCacheRoot; }
/// <summary> /// Creates a new <see cref="MsiInstallerBase"/> instance. /// </summary> /// <param name="dispatcher">The command dispatcher used for sending and receiving commands.</param> /// <param name="logger"></param> /// <param name="reporter"></param> public MsiInstallerBase(InstallElevationContextBase elevationContext, ISetupLogger logger, IReporter reporter = null) : base(elevationContext, logger) { Cache = new MsiPackageCache(elevationContext, logger); RecordRepository = new RegistryWorkloadInstallationRecordRepository(elevationContext, logger); UpdateAgent = new WindowsUpdateAgent(logger); Reporter = reporter; }
public BridgeLogger(ISetupLogger setupLogger) { if (setupLogger == null) { throw new ArgumentNullException(); } this.logger = setupLogger; }
public SetupCustomActions(ISetupLogger logger) { var settingsProviderHelper = new SmartShipmentsSettingsHelper(); _settingsHelper = new SettingsSetupHelper(settingsProviderHelper, logger); _upsHelper = new UpsSetupHelper(settingsProviderHelper, logger); _fedexHelper = new FedexSetupHelper(settingsProviderHelper, logger); }
public UpsSetupHelper(SmartShipmentsSettingsHelper settingsProviderHelper, ISetupLogger logger) { _settingsProviderHelper = settingsProviderHelper; _logger = logger; _upsShipmentAppConfigDirectoryLocation = GetUpsRegistryApplicationConfigDirectoryLocation(); _upsShipmentImpExpFilePath = Path.Combine(GetUpsRegistryDataDirectoryLocation(), UPS_BASE_DATA_PATH, "UPSOUT.dat"); }
static SmartShipmentWiXCustomActions() { //If debug needed- uncomment bellow line //System.Diagnostics.Debugger.Launch(); _logger = new SetupLogger(); _customActionsHelper = new SetupCustomActions(_logger); }
public SmartShipmentInstaller() { #if DEBUG System.Diagnostics.Debugger.Launch(); #endif InitializeComponent(); _logger = new SetupLogger(); _customActions = new SetupCustomActions(_logger); }
/// <summary> /// Creates a new <see cref="WindowsUpdateAgent"/> instance. /// </summary> /// <param name="logger">The <see cref="ISetupLogger"/> to write to.</param> public WindowsUpdateAgent(ISetupLogger logger) { _wuauserv = ServiceController.GetServices().Where(s => string.Equals(s.ServiceName, "wuauserv")).FirstOrDefault(); _log = logger; if (_wuauserv == null) { _log?.LogMessage("Unable to locate wuaserv."); } }
public FedexSetupHelper(ISmartShipmentsSettingsHelper settingsProviderHelper, ISetupLogger logger) { _settingsProviderHelper = settingsProviderHelper; _logger = logger; }
internal RegistryWorkloadInstallationRecordRepository(InstallElevationContextBase elevationContext, ISetupLogger logger, RegistryKey baseKey, string basePath) : this(elevationContext, logger) { _baseKey = baseKey; BasePath = basePath; }
internal RegistryWorkloadInstallationRecordRepository(InstallElevationContextBase elevationContext, ISetupLogger logger) : base(elevationContext, logger) { }
/// <summary> /// Creates a new <see cref="InstallerBase"/> instance using the specified elevation context and logger. /// </summary> /// <param name="elevationContext"></param> /// <param name="logger"></param> protected InstallerBase(InstallElevationContextBase elevationContext, ISetupLogger logger) { ElevationContext = elevationContext; Log = logger; }
/// <summary> /// Creates a new <see cref="InstallerBase"/> instance using the specified elevation context and logger. /// </summary> /// <param name="elevationContext"></param> /// <param name="logger"></param> /// <param name="verifySignatures"></param> protected InstallerBase(InstallElevationContextBase elevationContext, ISetupLogger logger, bool verifySignatures) { ElevationContext = elevationContext; Log = logger; VerifySignatures = verifySignatures; }