PowerShell / PowerShell

PowerShell for every system!
https://microsoft.com/PowerShell
MIT License
44.66k stars 7.23k forks source link

Automatic updates reset installation settings from previous version #24254

Open MBraedley-CN opened 2 weeks ago

MBraedley-CN commented 2 weeks ago

Prerequisites

Steps to reproduce

Whenever PowerShell is automatically updated, it resets the settings I had set during the previous installation. In particular, I set the "Open Here" context menu option. If I want to get these settings back, I have to completely uninstall and reinstall PowerShell. The fix for this should also be applied to manually installing an update, as previous settings are not automatically set, however the user at least has the chance to set those values.

Expected behavior

Settings from previous PowerShell version are maintained

Actual behavior

Settings get overridden with defaults when automatic updates are enabled

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.5
PSEdition                      Core
GitCommitId                    7.4.5
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

OS Data

Version    Caption
-------    -------
10.0.19045 Microsoft Windows 10 Pro

Windows update log

added as attachment

Visuals

WindowsUpdate.log

SteveL-MSFT commented 2 weeks ago

Can you be specific on what version you installed and what version you upgraded to? It was a relatively recent change that persisted MSI installer options.

MBraedley-CN commented 2 weeks ago

I had version 7.4.4 and the auto-updater installed 7.4.5 without persisting the installer options.

SteveL-MSFT commented 1 week ago

Can you check if HKLM:\Software\Microsoft\PowerShellCore\InstallerProperties in the registry has the expected installer options?

MBraedley commented 1 week ago
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShellCore\InstallerProperties]
"InstallFolder"="C:\\Program Files\\PowerShell\\"
"AddToPath"="1"
"RegisterManifest"="1"
"EnablePSRemoting"="0"
"DisableTelemetry"="1"
"AddExplorerContextMenuOpenPowerShell"="1"
"AddFileContextMenuRunPowerShell"="1"
"UseMU"="0"
"EnableMU"="0"

Looks like what I had set.