private void UpdateUIForSelectedDriver(int idx) { forceCleanChk.Enabled = false; noSignCheckChk.Enabled = false; forceIntegratedChk.Enabled = false; forceDiscreteChk.Enabled = false; forceOneCoreChk.Enabled = false; forceUnifiedChk.Enabled = false; forceLegacyChk.Enabled = false; skipExtrasChk.Enabled = false; if (idx == 0) { return; } DriverInstallerData drv = _driverInstallersList[idx - 1]; forceCleanChk.Enabled = drv.hasCleanInstall; noSignCheckChk.Enabled = drv.hasNoSignCheck; forceIntegratedChk.Enabled = drv.hasForceIntegrated; forceDiscreteChk.Enabled = drv.hasForceDiscrete; forceOneCoreChk.Enabled = drv.hasForceOneCore; forceUnifiedChk.Enabled = drv.hasForceUnified; forceLegacyChk.Enabled = drv.hasForceLegacy; skipExtrasChk.Enabled = drv.hasSkipExtras; }
private DriverInstallerData GetDriverInstallerData(string zipPath, string versionStr) { DriverInstallerData data = new DriverInstallerData { zipPath = zipPath, version = versionStr, exeName = GetDriverInstallerExe(zipPath), hasCleanInstall = false, hasForceIntegrated = false, hasForceDiscrete = false, hasForceUnified = false, hasForceOneCore = false, hasForceLegacy = false, hasNoSignCheck = false, hasSkipExtras = false }; if (data.exeName.Equals("Installer")) { data.downgradeArgs = "-s -o"; data.hasCleanInstall = true; data.hasForceIntegrated = true; data.hasForceDiscrete = true; data.hasForceUnified = true; data.hasForceOneCore = true; data.hasForceLegacy = true; data.hasNoSignCheck = true; data.hasSkipExtras = true; } else { data.downgradeArgs = "-s -overwrite"; } return(data); }
private string GetDowngradeArgsStr(DriverInstallerData drv) { string args = drv.downgradeArgs; if (drv.hasCleanInstall && forceCleanChk.Checked) { args += " -f"; } if (drv.hasNoSignCheck && noSignCheckChk.Checked) { args += " --unsigned"; } if (drv.hasForceIntegrated && forceIntegratedChk.Checked) { args += " --integrated"; } if (drv.hasForceDiscrete && forceDiscreteChk.Checked) { args += " --discrete"; } if (drv.hasForceUnified && forceUnifiedChk.Checked) { args += " --unified"; } if (drv.hasForceOneCore && forceOneCoreChk.Checked) { args += " --onecore"; } if (drv.hasForceLegacy && forceLegacyChk.Checked) { args += " --legacy"; } if (drv.hasSkipExtras && skipExtrasChk.Checked) { args += " --noExtras"; } if (rebootChk.Checked) { args += " -b"; } if (writeDLogChk.Checked) { if (drv.exeName.Equals("Installer")) { args += $" --report \"{_driverInstallLogPath}\""; } else { args += $" -report \"{_driverInstallLogPath}\""; } } return(args); }