From 997c8acb4660674e24cbbafa753c29f1fd3b7adc Mon Sep 17 00:00:00 2001 From: moooyo <42196638+moooyo@users.noreply.github.com> Date: Wed, 19 Mar 2025 02:21:04 +0800 Subject: [PATCH] Fix the MSI installer issue when App plugin is running. (#557) Our App plugin used the ShellLink.Open to retrieve the FullPath. But it would open the ink file exclusively. This may cause some problem. Especially when we try to upgrade some installed App through MSI installer, installer would throw exception and show a prompt to user. Original discussion here: 1. https://github.com/microsoft/PowerToys/pull/37654 2. https://github.com/microsoft/PowerToys/pull/37924 3. https://github.com/microsoft/PowerToys/pull/37987 Tested locally with VS. --------- Co-authored-by: Yu Leng (from Dev Box) --- .../Storage/Win32ProgramRepository.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/modules/cmdpal/exts/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs b/src/modules/cmdpal/exts/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs index 0b7e6e641b..1308556893 100644 --- a/src/modules/cmdpal/exts/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs +++ b/src/modules/cmdpal/exts/Microsoft.CmdPal.Ext.Apps/Storage/Win32ProgramRepository.cs @@ -101,11 +101,17 @@ internal sealed class Win32ProgramRepository : ListRepository + { + await OnAppRenamedAsync(sender, e).ConfigureAwait(false); + }).ConfigureAwait(false); + } + private void OnAppDeleted(object sender, FileSystemEventArgs e) { var path = e.FullPath;