-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/9.0] Add registry search for upgrade policy keys (#15048)
Co-authored-by: Jacques Eloff <[email protected]>
- Loading branch information
1 parent
bcba693
commit 04b9022
Showing
5 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/Microsoft.DotNet.Build.Tasks.Installers/build/wix/bundle/upgradePolicies.wxs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | ||
<Fragment> | ||
<!-- Bundle variables become unset if a search fails. The global key is retrieved first. If this fails, | ||
RemoveUpgradeRelatedBundle becomes unset, allowing the version specific search to potentially set | ||
or override the bundle variable. --> | ||
<util:RegistrySearch Id="RemovePreviousVersionRegistryKeySearch" | ||
Root="HKLM" | ||
Key="SOFTWARE\Microsoft\.NET" | ||
Value="RemovePreviousVersion" | ||
Result="value" | ||
Variable="RemoveUpgradeRelatedBundle" | ||
Win64="yes" /> | ||
|
||
<!-- The version specific key matching the major/minor of the .NET bundle takes precedence. The first search | ||
checks whether the registry value exists and creates a variable that can be used as a condition | ||
to executes the second part of the search to retrieve it. If the value doesn't exist, RemoveUpgradeRelatedBundle | ||
retains its original value, or if it wasn't set, will be assigned a proper default through the BA (wixstdba). --> | ||
<util:RegistrySearch Id="RemoveSpecificPreviousVersionRegistryKeyExistsSearch" | ||
After="RemovePreviousVersionRegistryKeySearch" | ||
Root="HKLM" | ||
Key="SOFTWARE\Microsoft\.NET\$(var.MajorVersion).$(var.MinorVersion)" | ||
Value="RemovePreviousVersion" | ||
Result="exists" | ||
Variable="RemoveSpecificPreviousVersionRegistryKeyExists" | ||
Win64="yes" /> | ||
<util:RegistrySearch Id="RemoveSpecificPreviousVersionRegistryKeySearch" | ||
After="RemoveSpecificPreviousVersionRegistryKeyExistsSearch" | ||
Condition="RemoveSpecificPreviousVersionRegistryKeyExists=1" | ||
Root="HKLM" | ||
Key="SOFTWARE\Microsoft\.NET\$(var.MajorVersion).$(var.MinorVersion)" | ||
Value="RemovePreviousVersion" | ||
Result="value" | ||
Variable="RemoveUpgradeRelatedBundle" | ||
Win64="yes" /> | ||
</Fragment> | ||
</Wix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters