diff options
Diffstat (limited to 'src/WixTestTools/BundleRegistration.cs')
-rw-r--r-- | src/WixTestTools/BundleRegistration.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/WixTestTools/BundleRegistration.cs b/src/WixTestTools/BundleRegistration.cs index bf9e2903..75660838 100644 --- a/src/WixTestTools/BundleRegistration.cs +++ b/src/WixTestTools/BundleRegistration.cs | |||
@@ -88,9 +88,10 @@ namespace WixTestTools | |||
88 | 88 | ||
89 | public string Version { get; set; } | 89 | public string Version { get; set; } |
90 | 90 | ||
91 | public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration) | 91 | public static bool TryGetPerMachineBundleRegistrationById(string bundleId, bool x64, out BundleRegistration registration) |
92 | { | 92 | { |
93 | var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE}\\{bundleId}"; | 93 | var baseKeyPath = x64 ? BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY : BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE; |
94 | var registrationKeyPath = $"{baseKeyPath}\\{bundleId}"; | ||
94 | using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); | 95 | using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath); |
95 | var success = registrationKey != null; | 96 | var success = registrationKey != null; |
96 | registration = success ? GetBundleRegistration(registrationKey) : null; | 97 | registration = success ? GetBundleRegistration(registrationKey) : null; |