Skip to content

rustup fails to open non-existing windows registry path #3779

Closed
@fruzitent

Description

@fruzitent

Verification

Problem

https://github.com/rust-lang/rustup/blob/1.27.0/src/cli/self_update/windows.rs#L420-L423

Steps

$ docker run --rm -it mcr.microsoft.com/windows/nanoserver:ltsc2022

C:\>reg query HKCU
HKEY_CURRENT_USER\Console
HKEY_CURRENT_USER\Control Panel
HKEY_CURRENT_USER\Network
HKEY_CURRENT_USER\SOFTWARE

C:\>curl --location --remote-name --remote-header-name "https://static.rust-lang.org/rustup/archive/1.27.0/x86_64-pc-windows-msvc/rustup-init.exe"

C:\>.\rustup-init.exe -y
warning: installing msvc toolchain without its prerequisites
error: Failed opening Environment key: The system cannot find the file specified. (os error 2)

Possible Solution(s)

C:\>reg add HKCU\Environment

Notes

No response

Rustup version

rustup-init 1.27.0 (bbb9276d2 2024-03-08)

Installed toolchains

unknown

OS version

Microsoft Windows [Version 10.0.20348.2402]

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-containersNot really OS-related, but container-specificO-windowsWindows relatedbug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions