Closed
Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue+is%3Aopen%2Cclosed and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
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]