Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 update: FAILED #482

Open
GotAnAccount opened this issue Jun 30, 2023 · 14 comments
Open

Windows 11 update: FAILED #482

GotAnAccount opened this issue Jun 30, 2023 · 14 comments
Labels
C-bug Something isn't working help wanted Extra attention is needed P-Windows Windows issue

Comments

@GotAnAccount
Copy link

GotAnAccount commented Jun 30, 2023

Looking in the code, you seem to be executing the update command twice. Is this normal?

Erroneous Behavior

With a vanilla installation of topgrade through scoop, I keep getting a failed Windows update.

Expected Behavior

I would expect that topgrade do start a "Windows Update" process.

Steps to reproduce

open a command prompt and execute topgrade.

Problem persists without calling from topgrade

I can successfully start the Windows update process via the GUI with no issues.

Configuration file (Optional)

this is a vanilla installation with a vanilla configuration file.

Additional Details

  • Operation System/Version
    Windows 11

  • Installation
    installed through scoop

  • Topgrade version (topgrade -V)

Verbose Output (topgrade -v)

this is the portion where the problem araises.

── 05:40:34 - Windows Update ───────────────────────────────────────────────────
Running Windows Update. Check the control panel for progress.
DEBUG Executing command C:\WINDOWS\system32\UsoClient.EXE ScanInstallWait
DEBUG Command failed: Err(
0: Command failed: C:\WINDOWS\system32\UsoClient.EXE ScanInstallWait
1: C:\WINDOWS\system32\UsoClient.EXE failed: exit code: 0x80070057

Location:
src\steps\os\windows.rs:157

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.)
DEBUG Step "Windows update" failed:
0: Command failed: C:\WINDOWS\system32\UsoClient.EXE ScanInstallWait
1: C:\WINDOWS\system32\UsoClient.EXE failed: exit code: 0x80070057

Location:
src\steps\os\windows.rs:157

@GotAnAccount GotAnAccount added the C-bug Something isn't working label Jun 30, 2023
@bb010g
Copy link

bb010g commented Jun 30, 2023

Related to #345, an issue about UsoClient specifically failing on Windows 11. This issue is about topgrade more generally failing to invoke Windows Update on Windows 11.

@SteveLauC SteveLauC changed the title Windows update: FAILED Windows 11 update: FAILED Jul 2, 2023
@SteveLauC SteveLauC added the help wanted Extra attention is needed label Jul 16, 2023
@SteveLauC
Copy link
Member

SteveLauC commented Jul 20, 2023

My VM is on Windows 10 Pro 22H2, I got no outputs either by involving the command directly or using Command::new("UsoClient").arg("ScanInstallWait") in Rust code...

Seems like this tool does not work on Windows 10 either:(

@niStee
Copy link
Contributor

niStee commented Nov 25, 2023

#94 maybe this feature as a workaround in the meantime?

@SteveLauC
Copy link
Member

#94 maybe this feature as a workaround in the meantime?

Yeah, it can be seen as a workaround for this issue, but we should still try to find a usable way to do the system update on Windows

@SteveLauC SteveLauC mentioned this issue Jan 28, 2024
10 tasks
@niStee
Copy link
Contributor

niStee commented Feb 11, 2024

Implemented #671 as a working way to update the system on Windows 10/11. @GotAnAccount let me know if it works for you.

@endquote
Copy link

endquote commented Feb 16, 2024

Doesn't work for me in an elevated powershell 7.4.1 prompt on a new machine with topgrade 14.0.1. I have run Set-ExecutionPolicy RemoteSigned and Install-Module -Name PSWindowsUpdate but still get the error:

Import-Module : File C:\Users\jsantangelo\Documents\PowerShell\Modules\PSWindowsUpdate\2.2.1.4\PSWindowsUpdate.psm1
cannot be loaded because running scripts is disabled on this system.

I would just disable Windows Update but it doesn't look like there's a config option for that.

@SteveLauC
Copy link
Member

I would just disable Windows Update but it doesn't look like there's a config option for that.

You can do this with disabling the system step

@endquote
Copy link

I would just disable Windows Update but it doesn't look like there's a config option for that.

You can do this with disabling the system step

Thanks — I was looking for it under the windows section.

@niStee
Copy link
Contributor

niStee commented Jul 31, 2024

#842

@SteveLauC
Copy link
Member

Gentle ping on @GotAnAccount, do you want to try the Topgrade with the latest commit and see if this issue is resolved now?

@GotAnAccount
Copy link
Author

I've been out of the loop. So I did the update and the error disapeared, but now I simply get this instead:

── 07:16:55 - Windows Update ───────────────────────────────────────────────────
Consider installing PSWindowsUpdate as the use of Windows Update via USOClient is not supported.

And I installed the module using this command:

Install-Module -Name PSWindowsUpdate -AllowClobber -Force

@SteveLauC
Copy link
Member

Does it work after installing the module?

@GotAnAccount
Copy link
Author

No, it did not.

@SteveLauC
Copy link
Member

No, it did not.

Could you please provide more information, did it give an error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working help wanted Extra attention is needed P-Windows Windows issue
Projects
None yet
Development

No branches or pull requests

5 participants