From 242c3d718760684cd918014c57e9953cd7d671f8 Mon Sep 17 00:00:00 2001 From: Easton Pillay Date: Mon, 25 Jul 2022 08:48:14 -0400 Subject: [PATCH] Add DisplayVersion for rustup to registry on Windows. --- src/cli/self_update/windows.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli/self_update/windows.rs b/src/cli/self_update/windows.rs index 04b2ed891a..0406174f1a 100644 --- a/src/cli/self_update/windows.rs +++ b/src/cli/self_update/windows.rs @@ -523,10 +523,14 @@ pub(crate) fn do_add_to_programs() -> Result<()> { vtype: RegType::REG_SZ, }; + let current_version: &str = env!("CARGO_PKG_VERSION"); + key.set_raw_value("UninstallString", ®_value) .context("Failed to set uninstall string")?; key.set_value("DisplayName", &"Rustup: the Rust toolchain installer") .context("Failed to set display name")?; + key.set_value("DisplayVersion", ¤t_version) + .context("Failed to set display version")?; Ok(()) }