diff options
| author | Bob Arnson <bob@firegiant.com> | 2026-02-04 20:47:04 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2026-02-04 20:47:04 -0500 |
| commit | edccb203c421d2bd820062024088c6698424d9ee (patch) | |
| tree | 6b47c3eb5ca53bd9f79f3d032dc1a596d411bf38 /src/test/burn/WixTestTools/GenericArpRegistration.cs | |
| parent | a3d3963f806117ce123d95e8b77e73e1c1545b25 (diff) | |
| download | wix-bob/ConfigurableScopeBundles.tar.gz wix-bob/ConfigurableScopeBundles.tar.bz2 wix-bob/ConfigurableScopeBundles.zip | |
Support dual-purpose packages in Burn.bob/ConfigurableScopeBundles
Fixes https://github.com/wixtoolset/issues/issues/8958
Diffstat (limited to 'src/test/burn/WixTestTools/GenericArpRegistration.cs')
| -rw-r--r-- | src/test/burn/WixTestTools/GenericArpRegistration.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/test/burn/WixTestTools/GenericArpRegistration.cs b/src/test/burn/WixTestTools/GenericArpRegistration.cs index dfddd9a3..f3590fa4 100644 --- a/src/test/burn/WixTestTools/GenericArpRegistration.cs +++ b/src/test/burn/WixTestTools/GenericArpRegistration.cs | |||
| @@ -4,6 +4,8 @@ namespace WixTestTools | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using Microsoft.Win32; | 6 | using Microsoft.Win32; |
| 7 | using Xunit; | ||
| 8 | using Xunit.Abstractions; | ||
| 7 | 9 | ||
| 8 | public class GenericArpRegistration | 10 | public class GenericArpRegistration |
| 9 | { | 11 | { |
| @@ -69,23 +71,23 @@ namespace WixTestTools | |||
| 69 | 71 | ||
| 70 | public string UrlUpdateInfo { get; set; } | 72 | public string UrlUpdateInfo { get; set; } |
| 71 | 73 | ||
| 72 | public static bool TryGetPerMachineRegistrationById(string id, bool x64, out GenericArpRegistration registration) | 74 | public static bool TryGetPerMachineRegistrationById(string id, bool x64, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 73 | { | 75 | { |
| 74 | return TryGetRegistrationById(id, x64, false, out registration); | 76 | return TryGetRegistrationById(id, x64, perUser: false, testOutputHelper, out registration); |
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | public static bool TryGetPerUserRegistrationById(string id, out GenericArpRegistration registration) | 79 | public static bool TryGetPerUserRegistrationById(string id, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 78 | { | 80 | { |
| 79 | return TryGetRegistrationById(id, true, true, out registration); | 81 | return TryGetRegistrationById(id, x64: true, perUser: true, testOutputHelper, out registration); |
| 80 | } | 82 | } |
| 81 | 83 | ||
| 82 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, out GenericArpRegistration registration) | 84 | private static bool TryGetRegistrationById(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, out GenericArpRegistration registration) |
| 83 | { | 85 | { |
| 84 | registration = GetGenericArpRegistration(id, x64, perUser, key => new GenericArpRegistration()); | 86 | registration = GetGenericArpRegistration(id, x64, perUser, testOutputHelper, key => new GenericArpRegistration()); |
| 85 | return registration != null; | 87 | return registration != null; |
| 86 | } | 88 | } |
| 87 | 89 | ||
| 88 | protected static T GetGenericArpRegistration<T>(string id, bool x64, bool perUser, Func<RegistryKey, T> fnCreate) | 90 | protected static T GetGenericArpRegistration<T>(string id, bool x64, bool perUser, ITestOutputHelper testOutputHelper, Func<RegistryKey, T> fnCreate) |
| 89 | where T : GenericArpRegistration | 91 | where T : GenericArpRegistration |
| 90 | { | 92 | { |
| 91 | var baseKey = perUser ? Registry.CurrentUser : Registry.LocalMachine; | 93 | var baseKey = perUser ? Registry.CurrentUser : Registry.LocalMachine; |
| @@ -95,6 +97,8 @@ namespace WixTestTools | |||
| 95 | 97 | ||
| 96 | if (idKey == null) | 98 | if (idKey == null) |
| 97 | { | 99 | { |
| 100 | testOutputHelper.WriteLine($"Failed to open key {baseKey} {registrationKeyPath} (per-user {perUser})."); | ||
| 101 | |||
| 98 | return null; | 102 | return null; |
| 99 | } | 103 | } |
| 100 | 104 | ||
