diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-03 17:48:57 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-07 19:44:36 -0500 |
commit | 648f370f7966b2738c1446601057d888bbd2c70f (patch) | |
tree | 9022566b1016f94127dfb7e84c9b4dfa057993cd /src/test/burn/WixTestTools/BundleVerifier.cs | |
parent | 6b0f2d978504da82070523eb6adb0b59f9812e93 (diff) | |
download | wix-648f370f7966b2738c1446601057d888bbd2c70f.tar.gz wix-648f370f7966b2738c1446601057d888bbd2c70f.tar.bz2 wix-648f370f7966b2738c1446601057d888bbd2c70f.zip |
Make PathGetSystemPath return an array of paths ordered by preference.
Diffstat (limited to 'src/test/burn/WixTestTools/BundleVerifier.cs')
-rw-r--r-- | src/test/burn/WixTestTools/BundleVerifier.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/burn/WixTestTools/BundleVerifier.cs b/src/test/burn/WixTestTools/BundleVerifier.cs index 594b19aa..103171cd 100644 --- a/src/test/burn/WixTestTools/BundleVerifier.cs +++ b/src/test/burn/WixTestTools/BundleVerifier.cs | |||
@@ -15,7 +15,8 @@ namespace WixTestTools | |||
15 | public partial class BundleInstaller | 15 | public partial class BundleInstaller |
16 | { | 16 | { |
17 | public const string DependencyRegistryRoot = "Software\\Classes\\Installer\\Dependencies"; | 17 | public const string DependencyRegistryRoot = "Software\\Classes\\Installer\\Dependencies"; |
18 | public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; | 18 | public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\Policies\\WiX\\Burn"; |
19 | public const string FULL_BURN_POLICY_REGISTRY_PATH_WOW6432NODE = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn"; | ||
19 | public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; | 20 | public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache"; |
20 | 21 | ||
21 | public string BundlePdb { get; } | 22 | public string BundlePdb { get; } |
@@ -35,12 +36,19 @@ namespace WixTestTools | |||
35 | return this.BundleSymbol; | 36 | return this.BundleSymbol; |
36 | } | 37 | } |
37 | 38 | ||
39 | public string GetFullBurnPolicyRegistryPath() | ||
40 | { | ||
41 | var bundleSymbol = this.GetBundleSymbol(); | ||
42 | var x64 = bundleSymbol.Platform != Platform.X86; | ||
43 | return x64 ? FULL_BURN_POLICY_REGISTRY_PATH : FULL_BURN_POLICY_REGISTRY_PATH_WOW6432NODE; | ||
44 | } | ||
45 | |||
38 | public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) | 46 | public string GetPackageCachePathForCacheId(string cacheId, bool perMachine) |
39 | { | 47 | { |
40 | string cachePath; | 48 | string cachePath; |
41 | if (perMachine) | 49 | if (perMachine) |
42 | { | 50 | { |
43 | using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH); | 51 | using var policyKey = Registry.LocalMachine.OpenSubKey(this.GetFullBurnPolicyRegistryPath()); |
44 | var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; | 52 | var redirectedCachePath = policyKey?.GetValue("PackageCache") as string; |
45 | cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); | 53 | cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME); |
46 | } | 54 | } |