mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
msi: detect and set previous installation path via a custom action (#2108)
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
<ComponentGroupRef Id="CoreComponents" />
|
||||
<ComponentGroupRef Id="ResourcesComponents" />
|
||||
</Feature>
|
||||
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" />
|
||||
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
|
||||
<UI>
|
||||
<UIRef Id="WixUI_PTInstallDir"/>
|
||||
@@ -71,6 +73,9 @@
|
||||
<RegistrySearch Id="ExistingImageResizerPath" Root="HKCU" Key="Software\Classes\CLSID\{51B4D7E5-7568-4234-B4BB-47FB3C016A69}\InprocServer32" Type="raw"/>
|
||||
</Property>
|
||||
|
||||
<InstallUISequence>
|
||||
<Custom Action="DetectPrevInstallPath" After="CostFinalize" />
|
||||
</InstallUISequence>
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="SetRegisterPowerToysSchTaskParam" Before="RegisterPowerToysSchTask" />
|
||||
<Custom Action="RegisterPowerToysSchTask" After="InstallFiles">
|
||||
@@ -163,6 +168,13 @@
|
||||
DllEntry="TelemetryLogRepairFailCA"
|
||||
/>
|
||||
|
||||
<CustomAction Id="DetectPrevInstallPath"
|
||||
Return="check"
|
||||
Impersonate="yes"
|
||||
BinaryKey="PTCustomActions"
|
||||
DllEntry="DetectPrevInstallPathCA"
|
||||
/>
|
||||
|
||||
<!-- Close 'PowerToys.exe' before uninstall-->
|
||||
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" />
|
||||
<!-- Restart explorer.exe if we detect existing PowerRenameExt.dll or ImageResizerExt.dll installation -->
|
||||
@@ -233,7 +245,7 @@
|
||||
</Shortcut>
|
||||
</File>
|
||||
|
||||
<RegistryKey Root="HKCR" Key="powertoys" Action="createAndRemoveOnUninstall">
|
||||
<RegistryKey Root="HKCR" Key="powertoys">
|
||||
<RegistryValue Type="string" Name="URL Protocol" Value=""/>
|
||||
<RegistryValue Type="string" Value="URL:PowerToys custom internal URI protocol"/>
|
||||
<RegistryKey Key="DefaultIcon">
|
||||
|
||||
Reference in New Issue
Block a user