diff options
Diffstat (limited to 'src/WixTestTools/WixTestContext.cs')
-rw-r--r-- | src/WixTestTools/WixTestContext.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/WixTestTools/WixTestContext.cs b/src/WixTestTools/WixTestContext.cs index c00f5723..a4e666f1 100644 --- a/src/WixTestTools/WixTestContext.cs +++ b/src/WixTestTools/WixTestContext.cs | |||
@@ -42,9 +42,10 @@ namespace WixTestTools | |||
42 | /// <remarks> | 42 | /// <remarks> |
43 | /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). | 43 | /// The package or bundle must install into [ProgramFilesFolder]\~Test WiX\[TestGroupName]\([Additional]). |
44 | /// </remarks> | 44 | /// </remarks> |
45 | public string GetTestInstallFolder(string additionalPath = null) | 45 | public string GetTestInstallFolder(bool x64, string additionalPath = null) |
46 | { | 46 | { |
47 | return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); | 47 | var baseDirectory = x64 ? Environment.SpecialFolder.ProgramFiles : Environment.SpecialFolder.ProgramFilesX86; |
48 | return Path.Combine(Environment.GetFolderPath(baseDirectory), "~Test WiX", this.TestGroupName, additionalPath ?? String.Empty); | ||
48 | } | 49 | } |
49 | 50 | ||
50 | /// <summary> | 51 | /// <summary> |
@@ -55,9 +56,10 @@ namespace WixTestTools | |||
55 | /// <remarks> | 56 | /// <remarks> |
56 | /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). | 57 | /// The package must write into HKLM\Software\WiX\Tests\[TestGroupName]\([Additional]). |
57 | /// </remarks> | 58 | /// </remarks> |
58 | public RegistryKey GetTestRegistryRoot(string additionalPath = null) | 59 | public RegistryKey GetTestRegistryRoot(bool x64, string additionalPath = null) |
59 | { | 60 | { |
60 | var key = String.Format(@"Software\WOW6432Node\WiX\Tests\{0}\{1}", this.TestGroupName, additionalPath ?? String.Empty); | 61 | var baseKey = x64 ? "Software" : @"Software\WOW6432Node"; |
62 | var key = String.Format(@"{0}\WiX\Tests\{1}\{2}", baseKey, this.TestGroupName, additionalPath ?? String.Empty); | ||
61 | return Registry.LocalMachine.OpenSubKey(key, true); | 63 | return Registry.LocalMachine.OpenSubKey(key, true); |
62 | } | 64 | } |
63 | 65 | ||