Fix/usoclient (#669)

* cargo update

* Implementing a check for Windows 11 and, if detected, skipping Windows Update via usoclient.exe. It is suggested to install PSWindowsUpdate.

* Revert "cargo update"

This reverts commit 43a4d321cf.

* Revert "Implementing a check for Windows 11 and, if detected, skipping Windows Update via usoclient.exe. It is suggested to install PSWindowsUpdate."

This reverts commit e1ef2e4bc5.

* Removed the usoclient step and added an error message.

* cargo fmt
This commit is contained in:
Nils
2024-01-29 02:02:40 +01:00
committed by GitHub
parent b07288e674
commit 37608a338c

View File

@@ -209,18 +209,14 @@ pub fn windows_update(ctx: &ExecutionContext) -> Result<()> {
if powershell.supports_windows_update() {
print_separator("Windows Update");
return powershell.windows_update(ctx);
powershell.windows_update(ctx)
} else {
Err(SkipStep(
"Consider installing PSWindowsUpdate as the use of Windows Update via usoclient is not supported."
.to_string(),
)
.into())
}
let usoclient = require("UsoClient")?;
print_separator("Windows Update");
println!("Running Windows Update. Check the control panel for progress.");
ctx.run_type()
.execute(&usoclient)
.arg("ScanInstallWait")
.status_checked()?;
ctx.run_type().execute(&usoclient).arg("StartInstall").status_checked()
}
pub fn reboot() -> Result<()> {