diff options
Diffstat (limited to 'src')
3 files changed, 44 insertions, 2 deletions
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs index d13f1a68..84f31344 100644 --- a/src/wix/WixToolset.Core/Compiler.cs +++ b/src/wix/WixToolset.Core/Compiler.cs | |||
| @@ -1948,10 +1948,10 @@ namespace WixToolset.Core | |||
| 1948 | signature = this.ParseComponentSearchElement(child); | 1948 | signature = this.ParseComponentSearchElement(child); |
| 1949 | break; | 1949 | break; |
| 1950 | case "DirectorySearch": | 1950 | case "DirectorySearch": |
| 1951 | signature = this.ParseDirectorySearchElement(child, String.Empty); | 1951 | signature = this.ParseDirectorySearchElement(child, null); |
| 1952 | break; | 1952 | break; |
| 1953 | case "DirectorySearchRef": | 1953 | case "DirectorySearchRef": |
| 1954 | signature = this.ParseDirectorySearchRefElement(child, String.Empty); | 1954 | signature = this.ParseDirectorySearchRefElement(child, null); |
| 1955 | break; | 1955 | break; |
| 1956 | case "IniFileSearch": | 1956 | case "IniFileSearch": |
| 1957 | signature = this.ParseIniFileSearchElement(child); | 1957 | signature = this.ParseIniFileSearchElement(child); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index a8b9c3e8..3194ed7a 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | |||
| @@ -116,6 +116,39 @@ namespace WixToolsetTest.CoreIntegration | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | [Fact] | 118 | [Fact] |
| 119 | public void PopulatesAppSearchTablesFromDirectorySearchInMergeModule() | ||
| 120 | { | ||
| 121 | var folder = TestData.Get(@"TestData"); | ||
| 122 | |||
| 123 | using (var fs = new DisposableFileSystem()) | ||
| 124 | { | ||
| 125 | var baseFolder = fs.GetFolder(); | ||
| 126 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 127 | var msmPath = Path.Combine(baseFolder, @"bin\test.msm"); | ||
| 128 | |||
| 129 | var result = WixRunner.Execute(new[] | ||
| 130 | { | ||
| 131 | "build", | ||
| 132 | Path.Combine(folder, "AppSearch", "DirectorySearchInModule.wxs"), | ||
| 133 | "-bindpath", Path.Combine(folder, "SingleFile", "data"), | ||
| 134 | "-intermediateFolder", intermediateFolder, | ||
| 135 | "-o", msmPath, | ||
| 136 | "-sw1079", | ||
| 137 | }); | ||
| 138 | |||
| 139 | result.AssertSuccess(); | ||
| 140 | |||
| 141 | Assert.True(File.Exists(msmPath)); | ||
| 142 | var results = Query.QueryDatabase(msmPath, new[] { "AppSearch", "DrLocator", "IniLocator" }); | ||
| 143 | WixAssert.CompareLineByLine(new[] | ||
| 144 | { | ||
| 145 | "AppSearch:SYSTEM32FOLDER.7361203A_597E_4DA2_9024_27246B8446B2\tWindowsDrLocator.7361203A_597E_4DA2_9024_27246B8446B2", | ||
| 146 | "DrLocator:WindowsDrLocator.7361203A_597E_4DA2_9024_27246B8446B2\t\t[WindowsFolder.7361203A_597E_4DA2_9024_27246B8446B2]System32\t", | ||
| 147 | }, results); | ||
| 148 | } | ||
| 149 | } | ||
| 150 | |||
| 151 | [Fact] | ||
| 119 | public void PopulatesAppSearchTablesFromRegistrySearch() | 152 | public void PopulatesAppSearchTablesFromRegistrySearch() |
| 120 | { | 153 | { |
| 121 | var folder = TestData.Get(@"TestData"); | 154 | var folder = TestData.Get(@"TestData"); |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DirectorySearchInModule.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DirectorySearchInModule.wxs new file mode 100644 index 00000000..9f4cb47e --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DirectorySearchInModule.wxs | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 3 | <Module Id="DirectorySearchModule" Language="1033" Version="1.0.0.0" | ||
| 4 | Guid="{7361203A-597E-4DA2-9024-27246B8446B2}"> | ||
| 5 | <Property Id="SYSTEM32FOLDER"> | ||
| 6 | <DirectorySearch Id="WindowsDrLocator" Path="[WindowsFolder]System32" /> | ||
| 7 | </Property> | ||
| 8 | </Module> | ||
| 9 | </Wix> | ||
