From 5e4f50fa45a31bab1a78ec76d454073df0f4e69e Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Tue, 27 Jul 2021 01:23:34 +0300 Subject: [PATCH] [Setup] Better prevent FileInUse errors during install (#12512) --- .github/actions/spell-check/expect.txt | 1 + installer/PowerToysSetup/Product.wxs | 3 ++- installer/PowerToysSetupCustomActions/CustomAction.cpp | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 265cdd89e..c6c654db5 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1301,6 +1301,7 @@ MSDN msedge mshtmdid msi +MSIFASTINSTALL MSIHANDLE MSIINSTALLER MSIL diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 419fe6406..f6d00e143 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -197,7 +197,8 @@ /> - + + diff --git a/installer/PowerToysSetupCustomActions/CustomAction.cpp b/installer/PowerToysSetupCustomActions/CustomAction.cpp index bb52d9c70..061b4fef6 100644 --- a/installer/PowerToysSetupCustomActions/CustomAction.cpp +++ b/installer/PowerToysSetupCustomActions/CustomAction.cpp @@ -774,10 +774,14 @@ UINT __stdcall TerminateProcessesCA(MSIHANDLE hInstall) } processes.resize(bytes / sizeof(processes[0])); - std::array processesToTerminate = { + std::array processesToTerminate = { L"PowerLauncher.exe", L"PowerToys.Settings.exe", + L"PowerToys.Awake.exe", + L"PowerToys.FancyZones.exe", L"Microsoft.PowerToys.Settings.UI.exe", + L"FancyZonesEditor.exe", + L"ColorPickerUI.exe", L"PowerToys.exe" };