mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-22 10:07:37 +00:00
[Installer] Gracefully terminate PowerToys process before updating do… (#20430)
* [Installer] Gracefully terminate PowerToys process before updating dotnet
This commit is contained in:
parent
7b0f97597d
commit
f19ba94a2c
7
.github/actions/spell-check/expect.txt
vendored
7
.github/actions/spell-check/expect.txt
vendored
@ -112,7 +112,6 @@ atlstr
|
|||||||
Attribs
|
Attribs
|
||||||
attrs
|
attrs
|
||||||
Atyrau
|
Atyrau
|
||||||
augustkarlstedt
|
|
||||||
aumid
|
aumid
|
||||||
Aut
|
Aut
|
||||||
Authenticode
|
Authenticode
|
||||||
@ -144,7 +143,6 @@ bck
|
|||||||
Belarus
|
Belarus
|
||||||
betadele
|
betadele
|
||||||
betsegaw
|
betsegaw
|
||||||
bezgumption
|
|
||||||
BGR
|
BGR
|
||||||
bgra
|
bgra
|
||||||
bhid
|
bhid
|
||||||
@ -540,6 +538,7 @@ eltociear
|
|||||||
emmintrin
|
emmintrin
|
||||||
Emoji
|
Emoji
|
||||||
emptyrecyclebin
|
emptyrecyclebin
|
||||||
|
ENABLEDELAYEDEXPANSION
|
||||||
ENABLEDPOPUP
|
ENABLEDPOPUP
|
||||||
endforeach
|
endforeach
|
||||||
endian
|
endian
|
||||||
@ -560,6 +559,7 @@ ERASEBKGND
|
|||||||
EREOF
|
EREOF
|
||||||
EResize
|
EResize
|
||||||
ERole
|
ERole
|
||||||
|
ERRORLEVEL
|
||||||
ERRORMESSAGE
|
ERRORMESSAGE
|
||||||
ERRORTITLE
|
ERRORTITLE
|
||||||
ESettings
|
ESettings
|
||||||
@ -1352,6 +1352,7 @@ NDEBUG
|
|||||||
Ndombe
|
Ndombe
|
||||||
ndp
|
ndp
|
||||||
NEEDDISPATCH
|
NEEDDISPATCH
|
||||||
|
NEQ
|
||||||
NESW
|
NESW
|
||||||
netcore
|
netcore
|
||||||
netcoreapp
|
netcoreapp
|
||||||
@ -1470,7 +1471,6 @@ openxmlformats
|
|||||||
OPTIMIZEFORINVOKE
|
OPTIMIZEFORINVOKE
|
||||||
ORAW
|
ORAW
|
||||||
ORPHANEDDIALOGTITLE
|
ORPHANEDDIALOGTITLE
|
||||||
osfanbuff
|
|
||||||
oss
|
oss
|
||||||
ostr
|
ostr
|
||||||
ostream
|
ostream
|
||||||
@ -1752,7 +1752,6 @@ RNumber
|
|||||||
roadmap
|
roadmap
|
||||||
robmensching
|
robmensching
|
||||||
Roboto
|
Roboto
|
||||||
rohanrdy
|
|
||||||
rooler
|
rooler
|
||||||
roslyn
|
roslyn
|
||||||
Rothera
|
Rothera
|
||||||
|
@ -72,6 +72,16 @@
|
|||||||
<util:RegistrySearch Variable="DetectedVCRedistVersion" Root="HKLM" Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\$(var.PowerToysPlatform)" Value="Minor" Result="value" Format="raw" />
|
<util:RegistrySearch Variable="DetectedVCRedistVersion" Root="HKLM" Key="Software\Microsoft\VisualStudio\14.0\VC\Runtimes\$(var.PowerToysPlatform)" Value="Minor" Result="value" Format="raw" />
|
||||||
|
|
||||||
<Chain>
|
<Chain>
|
||||||
|
<ExePackage
|
||||||
|
Name="terminate_powertoys.cmd"
|
||||||
|
Cache="no"
|
||||||
|
Compressed="yes"
|
||||||
|
Id="TerminatePowerToys"
|
||||||
|
SourceFile="terminate_powertoys.cmd"
|
||||||
|
Permanent="yes"
|
||||||
|
PerMachine="yes"
|
||||||
|
Vital="no">
|
||||||
|
</ExePackage>
|
||||||
<ExePackage
|
<ExePackage
|
||||||
Name="windowsdesktop-runtime-6.0.8-win-$(var.PowerToysPlatform).exe"
|
Name="windowsdesktop-runtime-6.0.8-win-$(var.PowerToysPlatform).exe"
|
||||||
Compressed="no"
|
Compressed="no"
|
||||||
|
12
installer/PowerToysSetup/terminate_powertoys.cmd
Normal file
12
installer/PowerToysSetup/terminate_powertoys.cmd
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
@REM We loop here until taskkill cannot find a PowerToys process. We can't use /F flag, because it
|
||||||
|
@REM doesn't give application an opportunity to cleanup. Thus we send WM_CLOSE which is being caught
|
||||||
|
@REM by multiple windows running a msg loop in PowerToys.exe process, which we close one by one.
|
||||||
|
for /l %%x in (1, 1, 100) do (
|
||||||
|
taskkill /IM PowerToys.exe 1>NUL 2>NUL
|
||||||
|
if !ERRORLEVEL! NEQ 0 goto quit
|
||||||
|
)
|
||||||
|
|
||||||
|
:quit
|
Loading…
x
Reference in New Issue
Block a user