Skip to content

Commit

Permalink
Wix installer: kill explorer if shellext is detected (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyoyuppe committed Nov 27, 2019
1 parent ee1a1fd commit 40db3a5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions installer/PowerToysSetup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<Property Id="WixShellExecTarget" Value="[#PowerToys.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />

<Property Id ="EXISTINGPOWERRENAMEEXTPATH">
<RegistrySearch Id="ExistingExtPath" Root="HKCR" Key="CLSID\{0440049F-D1DC-4E46-B27B-98393D79486B}\InprocServer32" Type="raw"/>
</Property>

<InstallExecuteSequence>
<Custom Action="SetRegisterPowerToysSchTaskParam" Before="RegisterPowerToysSchTask" />
<Custom Action="RegisterPowerToysSchTask" After="InstallFiles">
Expand Down Expand Up @@ -156,6 +160,10 @@

<!-- Close 'PowerToys.exe' before uninstall-->
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" />
<!-- Restart explorer.exe if we detect existing powerrenameext.dll installation -->
<util:CloseApplication Target="explorer.exe" RebootPrompt="no" TerminateProcess="0">
EXISTINGPOWERRENAMEEXTPATH
</util:CloseApplication>
<util:CloseApplication CloseMessage="yes" Target="PowerToys.exe" ElevatedCloseMessage="yes" RebootPrompt="no" TerminateProcess="0" />
</Product>

Expand Down

0 comments on commit 40db3a5

Please sign in to comment.