[MSI_WINETEST]
[reactos.git] / rostests / winetests / msi / install.c
1 /*
2 * Copyright (C) 2006 James Hawkins
3 *
4 * A test program for installing MSI products.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #define _WIN32_MSI 300
22 #define COBJMACROS
23
24 #include <stdio.h>
25
26 #include <windows.h>
27 #include <msiquery.h>
28 #include <msidefs.h>
29 #include <msi.h>
30 #include <fci.h>
31 #include <objidl.h>
32 #include <srrestoreptapi.h>
33
34 #include "wine/test.h"
35
36 static UINT (WINAPI *pMsiQueryComponentStateA)
37 (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*);
38 static UINT (WINAPI *pMsiSetExternalUIRecord)
39 (INSTALLUI_HANDLER_RECORD, DWORD, LPVOID, PINSTALLUI_HANDLER_RECORD);
40 static UINT (WINAPI *pMsiSourceListEnumSourcesA)
41 (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, DWORD, LPSTR, LPDWORD);
42 static UINT (WINAPI *pMsiSourceListGetInfoA)
43 (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, DWORD, LPCSTR, LPSTR, LPDWORD);
44
45 static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*);
46
47 static HMODULE hsrclient = 0;
48 static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD);
49 static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*);
50
51 static BOOL on_win9x = FALSE;
52
53 static const char *msifile = "msitest.msi";
54 static const char *msifile2 = "winetest2.msi";
55 static const char *mstfile = "winetest.mst";
56 static CHAR CURR_DIR[MAX_PATH];
57 static CHAR PROG_FILES_DIR[MAX_PATH];
58 static CHAR COMMON_FILES_DIR[MAX_PATH];
59
60 /* msi database data */
61
62 static const CHAR component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
63 "s72\tS38\ts72\ti2\tS255\tS72\n"
64 "Component\tComponent\n"
65 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
66 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
67 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n"
68 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
69 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
70 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
71 "component\t\tMSITESTDIR\t0\t1\tfile\n"
72 "service_comp\t\tMSITESTDIR\t0\t1\tservice_file";
73
74 static const CHAR directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n"
75 "s72\tS72\tl255\n"
76 "Directory\tDirectory\n"
77 "CABOUTDIR\tMSITESTDIR\tcabout\n"
78 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
79 "FIRSTDIR\tMSITESTDIR\tfirst\n"
80 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
81 "NEWDIR\tCABOUTDIR\tnew\n"
82 "ProgramFilesFolder\tTARGETDIR\t.\n"
83 "TARGETDIR\t\tSourceDir";
84
85 static const CHAR feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
86 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
87 "Feature\tFeature\n"
88 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
89 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
90 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
91 "Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
92 "Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
93 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n"
94 "service_feature\t\t\t\t2\t1\tTARGETDIR\t0";
95
96 static const CHAR feature_comp_dat[] = "Feature_\tComponent_\n"
97 "s38\ts72\n"
98 "FeatureComponents\tFeature_\tComponent_\n"
99 "Five\tFive\n"
100 "Four\tFour\n"
101 "One\tOne\n"
102 "Three\tThree\n"
103 "Two\tTwo\n"
104 "feature\tcomponent\n"
105 "service_feature\tservice_comp\n";
106
107 static const CHAR file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
108 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
109 "File\tFile\n"
110 "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
111 "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
112 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
113 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
114 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
115 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
116 "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1";
117
118 static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
119 "s72\tS255\tI2\n"
120 "InstallExecuteSequence\tAction\n"
121 "AllocateRegistrySpace\tNOT Installed\t1550\n"
122 "CostFinalize\t\t1000\n"
123 "CostInitialize\t\t800\n"
124 "FileCost\t\t900\n"
125 "ResolveSource\t\t950\n"
126 "MoveFiles\t\t1700\n"
127 "InstallFiles\t\t4000\n"
128 "DuplicateFiles\t\t4500\n"
129 "WriteEnvironmentStrings\t\t4550\n"
130 "CreateShortcuts\t\t4600\n"
131 "InstallServices\t\t5000\n"
132 "InstallFinalize\t\t6600\n"
133 "InstallInitialize\t\t1500\n"
134 "InstallValidate\t\t1400\n"
135 "LaunchConditions\t\t100\n"
136 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000";
137
138 static const CHAR media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
139 "i2\ti4\tL64\tS255\tS32\tS72\n"
140 "Media\tDiskId\n"
141 "1\t3\t\t\tDISK1\t\n"
142 "2\t5\t\tmsitest.cab\tDISK2\t\n";
143
144 static const CHAR property_dat[] = "Property\tValue\n"
145 "s72\tl0\n"
146 "Property\tProperty\n"
147 "DefaultUIFont\tDlgFont8\n"
148 "HASUIRUN\t0\n"
149 "INSTALLLEVEL\t3\n"
150 "InstallMode\tTypical\n"
151 "Manufacturer\tWine\n"
152 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
153 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
154 "ProductID\tnone\n"
155 "ProductLanguage\t1033\n"
156 "ProductName\tMSITEST\n"
157 "ProductVersion\t1.1.1\n"
158 "PROMPTROLLBACKCOST\tP\n"
159 "Setup\tSetup\n"
160 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
161 "AdminProperties\tPOSTADMIN\n"
162 "ROOTDRIVE\tC:\\\n"
163 "SERVNAME\tTestService\n"
164 "SERVDISP\tTestServiceDisp\n";
165
166 static const CHAR aup_property_dat[] = "Property\tValue\n"
167 "s72\tl0\n"
168 "Property\tProperty\n"
169 "DefaultUIFont\tDlgFont8\n"
170 "HASUIRUN\t0\n"
171 "ALLUSERS\t1\n"
172 "INSTALLLEVEL\t3\n"
173 "InstallMode\tTypical\n"
174 "Manufacturer\tWine\n"
175 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
176 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
177 "ProductID\tnone\n"
178 "ProductLanguage\t1033\n"
179 "ProductName\tMSITEST\n"
180 "ProductVersion\t1.1.1\n"
181 "PROMPTROLLBACKCOST\tP\n"
182 "Setup\tSetup\n"
183 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
184 "AdminProperties\tPOSTADMIN\n"
185 "ROOTDRIVE\tC:\\\n"
186 "SERVNAME\tTestService\n"
187 "SERVDISP\tTestServiceDisp\n";
188
189 static const CHAR aup2_property_dat[] = "Property\tValue\n"
190 "s72\tl0\n"
191 "Property\tProperty\n"
192 "DefaultUIFont\tDlgFont8\n"
193 "HASUIRUN\t0\n"
194 "ALLUSERS\t2\n"
195 "INSTALLLEVEL\t3\n"
196 "InstallMode\tTypical\n"
197 "Manufacturer\tWine\n"
198 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
199 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
200 "ProductID\tnone\n"
201 "ProductLanguage\t1033\n"
202 "ProductName\tMSITEST\n"
203 "ProductVersion\t1.1.1\n"
204 "PROMPTROLLBACKCOST\tP\n"
205 "Setup\tSetup\n"
206 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
207 "AdminProperties\tPOSTADMIN\n"
208 "ROOTDRIVE\tC:\\\n"
209 "SERVNAME\tTestService\n"
210 "SERVDISP\tTestServiceDisp\n";
211
212 static const CHAR shortcut_dat[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
213 "s72\ts72\tl128\ts72\ts72\tS255\tL255\tI2\tS72\tI2\tI2\tS72\n"
214 "Shortcut\tShortcut\n"
215 "Shortcut\tMSITESTDIR\tShortcut\tcomponent\tShortcut\t\tShortcut\t\t\t\t\t\n";
216
217 static const CHAR environment_dat[] = "Environment\tName\tValue\tComponent_\n"
218 "s72\tl255\tL255\ts72\n"
219 "Environment\tEnvironment\n"
220 "Var1\t=-MSITESTVAR1\t1\tOne\n"
221 "Var2\tMSITESTVAR2\t1\tOne\n"
222 "Var3\t=-MSITESTVAR3\t1\tOne\n"
223 "Var4\tMSITESTVAR4\t1\tOne\n"
224 "Var5\t-MSITESTVAR5\t\tOne\n"
225 "Var6\tMSITESTVAR6\t\tOne\n"
226 "Var7\t!-MSITESTVAR7\t\tOne\n"
227 "Var8\t!-*MSITESTVAR8\t\tOne\n"
228 "Var9\t=-MSITESTVAR9\t\tOne\n"
229 "Var10\t=MSITESTVAR10\t\tOne\n"
230 "Var11\t+-MSITESTVAR11\t[~];1\tOne\n"
231 "Var12\t+-MSITESTVAR11\t[~];2\tOne\n"
232 "Var13\t+-MSITESTVAR12\t[~];1\tOne\n"
233 "Var14\t=MSITESTVAR13\t[~];1\tOne\n"
234 "Var15\t=MSITESTVAR13\t[~];2\tOne\n"
235 "Var16\t=MSITESTVAR14\t;1;\tOne\n"
236 "Var17\t=MSITESTVAR15\t;;1;;\tOne\n"
237 "Var18\t=MSITESTVAR16\t 1 \tOne\n"
238 "Var19\t+-MSITESTVAR17\t1\tOne\n"
239 "Var20\t+-MSITESTVAR17\t;;2;;[~]\tOne\n"
240 "Var21\t+-MSITESTVAR18\t1\tOne\n"
241 "Var22\t+-MSITESTVAR18\t[~];;2;;\tOne\n"
242 "Var23\t+-MSITESTVAR19\t1\tOne\n"
243 "Var24\t+-MSITESTVAR19\t[~]2\tOne\n"
244 "Var25\t+-MSITESTVAR20\t1\tOne\n"
245 "Var26\t+-MSITESTVAR20\t2[~]\tOne\n";
246
247 /* Expected results, starting from MSITESTVAR11 onwards */
248 static const CHAR *environment_dat_results[] = {"1;2", /*MSITESTVAR11*/
249 "1", /*MSITESTVAR12*/
250 "1;2", /*MSITESTVAR13*/
251 ";1;", /*MSITESTVAR14*/
252 ";;1;;", /*MSITESTVAR15*/
253 " 1 ", /*MSITESTVAR16*/
254 ";;2;;1", /*MSITESTVAR17*/
255 "1;;2;;", /*MSITESTVAR18*/
256 "1", /*MSITESTVAR19*/
257 "1", /*MSITESTVAR20*/
258 NULL};
259
260 static const CHAR condition_dat[] = "Feature_\tLevel\tCondition\n"
261 "s38\ti2\tS255\n"
262 "Condition\tFeature_\tLevel\n"
263 "One\t4\t1\n";
264
265 static const CHAR up_property_dat[] = "Property\tValue\n"
266 "s72\tl0\n"
267 "Property\tProperty\n"
268 "DefaultUIFont\tDlgFont8\n"
269 "HASUIRUN\t0\n"
270 "INSTALLLEVEL\t3\n"
271 "InstallMode\tTypical\n"
272 "Manufacturer\tWine\n"
273 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
274 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
275 "ProductID\tnone\n"
276 "ProductLanguage\t1033\n"
277 "ProductName\tMSITEST\n"
278 "ProductVersion\t1.1.1\n"
279 "PROMPTROLLBACKCOST\tP\n"
280 "Setup\tSetup\n"
281 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
282 "AdminProperties\tPOSTADMIN\n"
283 "ROOTDRIVE\tC:\\\n"
284 "SERVNAME\tTestService\n"
285 "SERVDISP\tTestServiceDisp\n"
286 "RemovePreviousVersions\t1\n";
287
288 static const CHAR up2_property_dat[] = "Property\tValue\n"
289 "s72\tl0\n"
290 "Property\tProperty\n"
291 "DefaultUIFont\tDlgFont8\n"
292 "HASUIRUN\t0\n"
293 "INSTALLLEVEL\t3\n"
294 "InstallMode\tTypical\n"
295 "Manufacturer\tWine\n"
296 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
297 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
298 "ProductID\tnone\n"
299 "ProductLanguage\t1033\n"
300 "ProductName\tMSITEST\n"
301 "ProductVersion\t1.1.2\n"
302 "PROMPTROLLBACKCOST\tP\n"
303 "Setup\tSetup\n"
304 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
305 "AdminProperties\tPOSTADMIN\n"
306 "ROOTDRIVE\tC:\\\n"
307 "SERVNAME\tTestService\n"
308 "SERVDISP\tTestServiceDisp\n";
309
310 static const CHAR up3_property_dat[] = "Property\tValue\n"
311 "s72\tl0\n"
312 "Property\tProperty\n"
313 "DefaultUIFont\tDlgFont8\n"
314 "HASUIRUN\t0\n"
315 "INSTALLLEVEL\t3\n"
316 "InstallMode\tTypical\n"
317 "Manufacturer\tWine\n"
318 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
319 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
320 "ProductID\tnone\n"
321 "ProductLanguage\t1033\n"
322 "ProductName\tMSITEST\n"
323 "ProductVersion\t1.1.2\n"
324 "PROMPTROLLBACKCOST\tP\n"
325 "Setup\tSetup\n"
326 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
327 "AdminProperties\tPOSTADMIN\n"
328 "ROOTDRIVE\tC:\\\n"
329 "SERVNAME\tTestService\n"
330 "SERVDISP\tTestServiceDisp\n"
331 "RemovePreviousVersions\t1\n";
332
333 static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
334 "s72\ti2\tl255\tL255\tL0\ts72\n"
335 "Registry\tRegistry\n"
336 "Apples\t2\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
337 "Oranges\t2\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
338 "regdata\t2\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
339 "OrderTest\t2\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
340
341 static const CHAR service_install_dat[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
342 "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
343 "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
344 "ServiceInstall\tServiceInstall\n"
345 "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t";
346
347 static const CHAR service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
348 "s72\tl255\ti2\tL255\tI2\ts72\n"
349 "ServiceControl\tServiceControl\n"
350 "ServiceControl\tTestService\t8\t\t0\tservice_comp";
351
352 static const CHAR sss_service_control_dat[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
353 "s72\tl255\ti2\tL255\tI2\ts72\n"
354 "ServiceControl\tServiceControl\n"
355 "ServiceControl\tSpooler\t1\t\t0\tservice_comp";
356
357 static const CHAR sss_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
358 "s72\tS255\tI2\n"
359 "InstallExecuteSequence\tAction\n"
360 "CostFinalize\t\t1000\n"
361 "CostInitialize\t\t800\n"
362 "FileCost\t\t900\n"
363 "ResolveSource\t\t950\n"
364 "MoveFiles\t\t1700\n"
365 "InstallFiles\t\t4000\n"
366 "DuplicateFiles\t\t4500\n"
367 "WriteEnvironmentStrings\t\t4550\n"
368 "CreateShortcuts\t\t4600\n"
369 "StartServices\t\t5000\n"
370 "DeleteServices\t\t5500\n"
371 "InstallFinalize\t\t6600\n"
372 "InstallInitialize\t\t1500\n"
373 "InstallValidate\t\t1400\n"
374 "LaunchConditions\t\t100\n";
375
376 /* tables for test_continuouscabs */
377 static const CHAR cc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
378 "s72\tS38\ts72\ti2\tS255\tS72\n"
379 "Component\tComponent\n"
380 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
381 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
382 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n";
383
384 static const CHAR cc2_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
385 "s72\tS38\ts72\ti2\tS255\tS72\n"
386 "Component\tComponent\n"
387 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
388 "augustus\t\tMSITESTDIR\t0\t0\taugustus\n"
389 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n";
390
391 static const CHAR cc_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
392 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
393 "Feature\tFeature\n"
394 "feature\t\t\t\t2\t1\tTARGETDIR\t0";
395
396 static const CHAR cc_feature_comp_dat[] = "Feature_\tComponent_\n"
397 "s38\ts72\n"
398 "FeatureComponents\tFeature_\tComponent_\n"
399 "feature\tmaximus\n"
400 "feature\taugustus\n"
401 "feature\tcaesar";
402
403 static const CHAR cc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
404 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
405 "File\tFile\n"
406 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
407 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
408 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12";
409
410 static const CHAR cc2_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
411 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
412 "File\tFile\n"
413 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
414 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
415 "tiberius\tmaximus\ttiberius\t500\t\t\t16384\t3\n"
416 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12";
417
418 static const CHAR cc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
419 "i2\ti4\tL64\tS255\tS32\tS72\n"
420 "Media\tDiskId\n"
421 "1\t10\t\ttest1.cab\tDISK1\t\n"
422 "2\t2\t\ttest2.cab\tDISK2\t\n"
423 "3\t12\t\ttest3.cab\tDISK3\t\n";
424
425 static const CHAR co_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
426 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
427 "File\tFile\n"
428 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
429 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
430 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3";
431
432 static const CHAR co_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
433 "i2\ti4\tL64\tS255\tS32\tS72\n"
434 "Media\tDiskId\n"
435 "1\t10\t\ttest1.cab\tDISK1\t\n"
436 "2\t2\t\ttest2.cab\tDISK2\t\n"
437 "3\t3\t\ttest3.cab\tDISK3\t\n";
438
439 static const CHAR co2_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
440 "i2\ti4\tL64\tS255\tS32\tS72\n"
441 "Media\tDiskId\n"
442 "1\t10\t\ttest1.cab\tDISK1\t\n"
443 "2\t12\t\ttest3.cab\tDISK3\t\n"
444 "3\t2\t\ttest2.cab\tDISK2\t\n";
445
446 static const CHAR mm_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
447 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
448 "File\tFile\n"
449 "maximus\tmaximus\tmaximus\t500\t\t\t512\t1\n"
450 "augustus\taugustus\taugustus\t500\t\t\t512\t2\n"
451 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3";
452
453 static const CHAR mm_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
454 "i2\ti4\tL64\tS255\tS32\tS72\n"
455 "Media\tDiskId\n"
456 "1\t3\t\ttest1.cab\tDISK1\t\n";
457
458 static const CHAR ss_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
459 "i2\ti4\tL64\tS255\tS32\tS72\n"
460 "Media\tDiskId\n"
461 "1\t2\t\ttest1.cab\tDISK1\t\n"
462 "2\t2\t\ttest2.cab\tDISK2\t\n"
463 "3\t12\t\ttest3.cab\tDISK3\t\n";
464
465 /* tables for test_uiLevelFlags */
466 static const CHAR ui_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
467 "s72\tS38\ts72\ti2\tS255\tS72\n"
468 "Component\tComponent\n"
469 "maximus\t\tMSITESTDIR\t0\tHASUIRUN=1\tmaximus\n"
470 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
471 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n";
472
473 static const CHAR ui_install_ui_seq_dat[] = "Action\tCondition\tSequence\n"
474 "s72\tS255\tI2\n"
475 "InstallUISequence\tAction\n"
476 "SetUIProperty\t\t5\n"
477 "ExecuteAction\t\t1100\n";
478
479 static const CHAR ui_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
480 "s72\ti2\tS64\tS0\tS255\n"
481 "CustomAction\tAction\n"
482 "SetUIProperty\t51\tHASUIRUN\t1\t\n";
483
484 static const CHAR rof_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
485 "s72\tS38\ts72\ti2\tS255\tS72\n"
486 "Component\tComponent\n"
487 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n";
488
489 static const CHAR rof_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
490 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
491 "Feature\tFeature\n"
492 "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
493 "montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0";
494
495 static const CHAR rof_feature_comp_dat[] = "Feature_\tComponent_\n"
496 "s38\ts72\n"
497 "FeatureComponents\tFeature_\tComponent_\n"
498 "feature\tmaximus\n"
499 "montecristo\tmaximus";
500
501 static const CHAR rof_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
502 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
503 "File\tFile\n"
504 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1";
505
506 static const CHAR rof_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
507 "i2\ti4\tL64\tS255\tS32\tS72\n"
508 "Media\tDiskId\n"
509 "1\t1\t\t\tDISK1\t\n";
510
511 static const CHAR rofc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
512 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
513 "File\tFile\n"
514 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1";
515
516 static const CHAR rofc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
517 "i2\ti4\tL64\tS255\tS32\tS72\n"
518 "Media\tDiskId\n"
519 "1\t1\t\ttest1.cab\tDISK1\t\n";
520
521 static const CHAR lus2_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
522 "i2\ti4\tL64\tS255\tS32\tS72\n"
523 "Media\tDiskId\n"
524 "1\t1\t\t#test1.cab\tDISK1\t\n";
525
526 static const CHAR sdp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
527 "s72\tS255\tI2\n"
528 "InstallExecuteSequence\tAction\n"
529 "AllocateRegistrySpace\tNOT Installed\t1550\n"
530 "CostFinalize\t\t1000\n"
531 "CostInitialize\t\t800\n"
532 "FileCost\t\t900\n"
533 "InstallFiles\t\t4000\n"
534 "InstallFinalize\t\t6600\n"
535 "InstallInitialize\t\t1500\n"
536 "InstallValidate\t\t1400\n"
537 "LaunchConditions\t\t100\n"
538 "SetDirProperty\t\t950";
539
540 static const CHAR sdp_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
541 "s72\ti2\tS64\tS0\tS255\n"
542 "CustomAction\tAction\n"
543 "SetDirProperty\t51\tMSITESTDIR\t[CommonFilesFolder]msitest\\\t\n";
544
545 static const CHAR cie_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
546 "s72\tS38\ts72\ti2\tS255\tS72\n"
547 "Component\tComponent\n"
548 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
549 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
550 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"
551 "gaius\t\tMSITESTDIR\t0\t1\tgaius\n";
552
553 static const CHAR cie_feature_comp_dat[] = "Feature_\tComponent_\n"
554 "s38\ts72\n"
555 "FeatureComponents\tFeature_\tComponent_\n"
556 "feature\tmaximus\n"
557 "feature\taugustus\n"
558 "feature\tcaesar\n"
559 "feature\tgaius";
560
561 static const CHAR cie_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
562 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
563 "File\tFile\n"
564 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
565 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
566 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12\n"
567 "gaius\tgaius\tgaius\t500\t\t\t8192\t11";
568
569 static const CHAR cie_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
570 "i2\ti4\tL64\tS255\tS32\tS72\n"
571 "Media\tDiskId\n"
572 "1\t1\t\ttest1.cab\tDISK1\t\n"
573 "2\t2\t\ttest2.cab\tDISK2\t\n"
574 "3\t12\t\ttest3.cab\tDISK3\t\n";
575
576 static const CHAR ci_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
577 "s72\tS255\tI2\n"
578 "InstallExecuteSequence\tAction\n"
579 "CostFinalize\t\t1000\n"
580 "CostInitialize\t\t800\n"
581 "FileCost\t\t900\n"
582 "InstallFiles\t\t4000\n"
583 "InstallServices\t\t5000\n"
584 "InstallFinalize\t\t6600\n"
585 "InstallInitialize\t\t1500\n"
586 "RunInstall\t\t1600\n"
587 "InstallValidate\t\t1400\n"
588 "LaunchConditions\t\t100";
589
590 static const CHAR ci_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
591 "s72\ti2\tS64\tS0\tS255\n"
592 "CustomAction\tAction\n"
593 "RunInstall\t87\tmsitest\\concurrent.msi\tMYPROP=[UILevel]\t\n";
594
595 static const CHAR ci_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
596 "s72\tS38\ts72\ti2\tS255\tS72\n"
597 "Component\tComponent\n"
598 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n";
599
600 static const CHAR ci2_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
601 "s72\tS38\ts72\ti2\tS255\tS72\n"
602 "Component\tComponent\n"
603 "augustus\t\tMSITESTDIR\t0\tUILevel=3 AND MYPROP=5\taugustus\n";
604
605 static const CHAR ci2_feature_comp_dat[] = "Feature_\tComponent_\n"
606 "s38\ts72\n"
607 "FeatureComponents\tFeature_\tComponent_\n"
608 "feature\taugustus";
609
610 static const CHAR ci2_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
611 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
612 "File\tFile\n"
613 "augustus\taugustus\taugustus\t500\t\t\t8192\t1";
614
615 static const CHAR spf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
616 "s72\ti2\tS64\tS0\tS255\n"
617 "CustomAction\tAction\n"
618 "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n";
619
620 static const CHAR spf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
621 "s72\tS255\tI2\n"
622 "InstallExecuteSequence\tAction\n"
623 "CostFinalize\t\t1000\n"
624 "CostInitialize\t\t800\n"
625 "FileCost\t\t900\n"
626 "SetFolderProp\t\t950\n"
627 "InstallFiles\t\t4000\n"
628 "InstallServices\t\t5000\n"
629 "InstallFinalize\t\t6600\n"
630 "InstallInitialize\t\t1500\n"
631 "InstallValidate\t\t1400\n"
632 "LaunchConditions\t\t100";
633
634 static const CHAR spf_install_ui_seq_dat[] = "Action\tCondition\tSequence\n"
635 "s72\tS255\tI2\n"
636 "InstallUISequence\tAction\n"
637 "CostInitialize\t\t800\n"
638 "FileCost\t\t900\n"
639 "CostFinalize\t\t1000\n"
640 "ExecuteAction\t\t1100\n";
641
642 static const CHAR pp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
643 "s72\tS255\tI2\n"
644 "InstallExecuteSequence\tAction\n"
645 "ValidateProductID\t\t700\n"
646 "CostInitialize\t\t800\n"
647 "FileCost\t\t900\n"
648 "CostFinalize\t\t1000\n"
649 "InstallValidate\t\t1400\n"
650 "InstallInitialize\t\t1500\n"
651 "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
652 "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
653 "RemoveFiles\t\t3500\n"
654 "InstallFiles\t\t4000\n"
655 "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
656 "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
657 "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n"
658 "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
659 "InstallFinalize\t\t6600";
660
661 static const CHAR ppc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
662 "s72\tS38\ts72\ti2\tS255\tS72\n"
663 "Component\tComponent\n"
664 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n"
665 "augustus\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\taugustus\n";
666
667 static const CHAR ppc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
668 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
669 "File\tFile\n"
670 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1\n"
671 "augustus\taugustus\taugustus\t500\t\t\t8192\t2";
672
673 static const CHAR ppc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
674 "i2\ti4\tL64\tS255\tS32\tS72\n"
675 "Media\tDiskId\n"
676 "1\t2\t\t\tDISK1\t\n";
677
678 static const CHAR ppc_feature_comp_dat[] = "Feature_\tComponent_\n"
679 "s38\ts72\n"
680 "FeatureComponents\tFeature_\tComponent_\n"
681 "feature\tmaximus\n"
682 "feature\taugustus\n"
683 "montecristo\tmaximus";
684
685 static const CHAR tp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
686 "s72\tS38\ts72\ti2\tS255\tS72\n"
687 "Component\tComponent\n"
688 "augustus\t\tMSITESTDIR\t0\tprop=\"val\"\taugustus\n";
689
690 static const CHAR cwd_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
691 "s72\tS38\ts72\ti2\tS255\tS72\n"
692 "Component\tComponent\n"
693 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
694
695 static const CHAR adm_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
696 "s72\tS38\ts72\ti2\tS255\tS72\n"
697 "Component\tComponent\n"
698 "augustus\t\tMSITESTDIR\t0\tPOSTADMIN=1\taugustus";
699
700 static const CHAR adm_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
701 "s72\ti2\tS64\tS0\tS255\n"
702 "CustomAction\tAction\n"
703 "SetPOSTADMIN\t51\tPOSTADMIN\t1\t\n";
704
705 static const CHAR adm_admin_exec_seq_dat[] = "Action\tCondition\tSequence\n"
706 "s72\tS255\tI2\n"
707 "AdminExecuteSequence\tAction\n"
708 "CostFinalize\t\t1000\n"
709 "CostInitialize\t\t800\n"
710 "FileCost\t\t900\n"
711 "SetPOSTADMIN\t\t950\n"
712 "InstallFiles\t\t4000\n"
713 "InstallFinalize\t\t6600\n"
714 "InstallInitialize\t\t1500\n"
715 "InstallValidate\t\t1400\n"
716 "LaunchConditions\t\t100";
717
718 static const CHAR amp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
719 "s72\tS38\ts72\ti2\tS255\tS72\n"
720 "Component\tComponent\n"
721 "augustus\t\tMSITESTDIR\t0\tMYPROP=2718 and MyProp=42\taugustus\n";
722
723 static const CHAR rem_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
724 "s72\tS38\ts72\ti2\tS255\tS72\n"
725 "Component\tComponent\n"
726 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t0\t\thydrogen\n"
727 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\thelium\n"
728 "lithium\t\tMSITESTDIR\t2\t\tlithium\n";
729
730 static const CHAR rem_feature_comp_dat[] = "Feature_\tComponent_\n"
731 "s38\ts72\n"
732 "FeatureComponents\tFeature_\tComponent_\n"
733 "feature\thydrogen\n"
734 "feature\thelium\n"
735 "feature\tlithium";
736
737 static const CHAR rem_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
738 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
739 "File\tFile\n"
740 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
741 "helium\thelium\thelium\t0\t\t\t8192\t1\n"
742 "lithium\tlithium\tlithium\t0\t\t\t8192\t1";
743
744 static const CHAR rem_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
745 "s72\tS255\tI2\n"
746 "InstallExecuteSequence\tAction\n"
747 "ValidateProductID\t\t700\n"
748 "CostInitialize\t\t800\n"
749 "FileCost\t\t900\n"
750 "CostFinalize\t\t1000\n"
751 "InstallValidate\t\t1400\n"
752 "InstallInitialize\t\t1500\n"
753 "ProcessComponents\t\t1600\n"
754 "UnpublishFeatures\t\t1800\n"
755 "RemoveFiles\t\t3500\n"
756 "InstallFiles\t\t4000\n"
757 "RegisterProduct\t\t6100\n"
758 "PublishFeatures\t\t6300\n"
759 "PublishProduct\t\t6400\n"
760 "InstallFinalize\t\t6600";
761
762 static const CHAR rem_remove_files_dat[] = "FileKey\tComponent_\tFileName\tDirProperty\tInstallMode\n"
763 "s72\ts72\tS255\ts72\tI2\n"
764 "RemoveFile\tFileKey\n"
765 "furlong\thydrogen\tfurlong\tMSITESTDIR\t1\n"
766 "firkin\thelium\tfirkin\tMSITESTDIR\t1\n"
767 "fortnight\tlithium\tfortnight\tMSITESTDIR\t1\n"
768 "becquerel\thydrogen\tbecquerel\tMSITESTDIR\t2\n"
769 "dioptre\thelium\tdioptre\tMSITESTDIR\t2\n"
770 "attoparsec\tlithium\tattoparsec\tMSITESTDIR\t2\n"
771 "storeys\thydrogen\tstoreys\tMSITESTDIR\t3\n"
772 "block\thelium\tblock\tMSITESTDIR\t3\n"
773 "siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n"
774 "nanoacre\thydrogen\t\tCABOUTDIR\t3\n";
775
776 static const CHAR mov_move_file_dat[] = "FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n"
777 "s72\ts72\tS255\tS255\tS72\ts72\ti2\n"
778 "MoveFile\tFileKey\n"
779 "abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n"
780 "bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n"
781 "cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n"
782 "denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n"
783 "ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n"
784 "fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n"
785 "gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n"
786 "haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n"
787 "iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n"
788 "jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n"
789 "kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n"
790 "laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n"
791 "namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n"
792 "pakistan\taugustus\tperu\tsfn|poland\tSourceDir\tMSITESTDIR\t1\n"
793 "wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n"
794 "single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n"
795 "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
796 "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
797
798 static const CHAR mc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
799 "s72\tS38\ts72\ti2\tS255\tS72\n"
800 "Component\tComponent\n"
801 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
802 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
803 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"
804 "gaius\t\tMSITESTDIR\t0\tGAIUS=1\tgaius\n";
805
806 static const CHAR mc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
807 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
808 "File\tFile\n"
809 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
810 "augustus\taugustus\taugustus\t500\t\t\t0\t2\n"
811 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3\n"
812 "gaius\tgaius\tgaius\t500\t\t\t16384\t4";
813
814 static const CHAR mc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
815 "i2\ti4\tL64\tS255\tS32\tS72\n"
816 "Media\tDiskId\n"
817 "1\t1\t\ttest1.cab\tDISK1\t\n"
818 "2\t2\t\ttest2.cab\tDISK2\t\n"
819 "3\t3\t\ttest3.cab\tDISK3\t\n"
820 "4\t4\t\ttest3.cab\tDISK3\t\n";
821
822 static const CHAR mc_file_hash_dat[] = "File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4\n"
823 "s72\ti2\ti4\ti4\ti4\ti4\n"
824 "MsiFileHash\tFile_\n"
825 "caesar\t0\t850433704\t-241429251\t675791761\t-1221108824";
826
827 static const CHAR df_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n"
828 "s72\tS72\tl255\n"
829 "Directory\tDirectory\n"
830 "THIS\tMSITESTDIR\tthis\n"
831 "DOESNOT\tTHIS\tdoesnot\n"
832 "NONEXISTENT\tDOESNOT\texist\n"
833 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
834 "ProgramFilesFolder\tTARGETDIR\t.\n"
835 "TARGETDIR\t\tSourceDir";
836
837 static const CHAR df_duplicate_file_dat[] = "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
838 "s72\ts72\ts72\tS255\tS72\n"
839 "DuplicateFile\tFileKey\n"
840 "maximus\tmaximus\tmaximus\taugustus\t\n"
841 "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n"
842 "augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n";
843
844 static const CHAR wrv_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
845 "s72\tS38\ts72\ti2\tS255\tS72\n"
846 "Component\tComponent\n"
847 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
848
849 static const CHAR wrv_registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
850 "s72\ti2\tl255\tL255\tL0\ts72\n"
851 "Registry\tRegistry\n"
852 "regdata\t2\tSOFTWARE\\Wine\\msitest\tValue\t[~]one[~]two[~]three\taugustus";
853
854 static const CHAR ca51_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
855 "s72\tS38\ts72\ti2\tS255\tS72\n"
856 "Component\tComponent\n"
857 "augustus\t\tMSITESTDIR\t0\tMYPROP=42\taugustus\n";
858
859 static const CHAR ca51_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
860 "s72\tS255\tI2\n"
861 "InstallExecuteSequence\tAction\n"
862 "ValidateProductID\t\t700\n"
863 "GoodSetProperty\t\t725\n"
864 "BadSetProperty\t\t750\n"
865 "CostInitialize\t\t800\n"
866 "ResolveSource\t\t810\n"
867 "FileCost\t\t900\n"
868 "SetSourceDir\tSRCDIR\t910\n"
869 "CostFinalize\t\t1000\n"
870 "InstallValidate\t\t1400\n"
871 "InstallInitialize\t\t1500\n"
872 "InstallFiles\t\t4000\n"
873 "InstallFinalize\t\t6600";
874
875 static const CHAR ca51_custom_action_dat[] = "Action\tType\tSource\tTarget\n"
876 "s72\ti2\tS64\tS0\n"
877 "CustomAction\tAction\n"
878 "GoodSetProperty\t51\tMYPROP\t42\n"
879 "BadSetProperty\t51\t\tMYPROP\n"
880 "SetSourceDir\t51\tSourceDir\t[SRCDIR]\n";
881
882 static const CHAR is_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
883 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
884 "Feature\tFeature\n"
885 "one\t\t\t\t2\t1\t\t0\n" /* favorLocal */
886 "two\t\t\t\t2\t1\t\t1\n" /* favorSource */
887 "three\t\t\t\t2\t1\t\t4\n" /* favorAdvertise */
888 "four\t\t\t\t2\t0\t\t0"; /* disabled */
889
890 static const CHAR is_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
891 "s72\tS38\ts72\ti2\tS255\tS72\n"
892 "Component\tComponent\n"
893 "alpha\t\tMSITESTDIR\t0\t\talpha_file\n" /* favorLocal:Local */
894 "beta\t\tMSITESTDIR\t1\t\tbeta_file\n" /* favorLocal:Source */
895 "gamma\t\tMSITESTDIR\t2\t\tgamma_file\n" /* favorLocal:Optional */
896 "theta\t\tMSITESTDIR\t0\t\ttheta_file\n" /* favorSource:Local */
897 "delta\t\tMSITESTDIR\t1\t\tdelta_file\n" /* favorSource:Source */
898 "epsilon\t\tMSITESTDIR\t2\t\tepsilon_file\n" /* favorSource:Optional */
899 "zeta\t\tMSITESTDIR\t0\t\tzeta_file\n" /* favorAdvertise:Local */
900 "iota\t\tMSITESTDIR\t1\t\tiota_file\n" /* favorAdvertise:Source */
901 "eta\t\tMSITESTDIR\t2\t\teta_file\n" /* favorAdvertise:Optional */
902 "kappa\t\tMSITESTDIR\t0\t\tkappa_file\n" /* disabled:Local */
903 "lambda\t\tMSITESTDIR\t1\t\tlambda_file\n" /* disabled:Source */
904 "mu\t\tMSITESTDIR\t2\t\tmu_file\n"; /* disabled:Optional */
905
906 static const CHAR is_feature_comp_dat[] = "Feature_\tComponent_\n"
907 "s38\ts72\n"
908 "FeatureComponents\tFeature_\tComponent_\n"
909 "one\talpha\n"
910 "one\tbeta\n"
911 "one\tgamma\n"
912 "two\ttheta\n"
913 "two\tdelta\n"
914 "two\tepsilon\n"
915 "three\tzeta\n"
916 "three\tiota\n"
917 "three\teta\n"
918 "four\tkappa\n"
919 "four\tlambda\n"
920 "four\tmu";
921
922 static const CHAR is_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
923 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
924 "File\tFile\n"
925 "alpha_file\talpha\talpha\t500\t\t\t8192\t1\n"
926 "beta_file\tbeta\tbeta\t500\t\t\t8291\t2\n"
927 "gamma_file\tgamma\tgamma\t500\t\t\t8192\t3\n"
928 "theta_file\ttheta\ttheta\t500\t\t\t8192\t4\n"
929 "delta_file\tdelta\tdelta\t500\t\t\t8192\t5\n"
930 "epsilon_file\tepsilon\tepsilon\t500\t\t\t8192\t6\n"
931 "zeta_file\tzeta\tzeta\t500\t\t\t8192\t7\n"
932 "iota_file\tiota\tiota\t500\t\t\t8192\t8\n"
933 "eta_file\teta\teta\t500\t\t\t8192\t9\n"
934 "kappa_file\tkappa\tkappa\t500\t\t\t8192\t10\n"
935 "lambda_file\tlambda\tlambda\t500\t\t\t8192\t11\n"
936 "mu_file\tmu\tmu\t500\t\t\t8192\t12";
937
938 static const CHAR is_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
939 "i2\ti4\tL64\tS255\tS32\tS72\n"
940 "Media\tDiskId\n"
941 "1\t12\t\t\tDISK1\t\n";
942
943 static const CHAR sp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
944 "s72\tS38\ts72\ti2\tS255\tS72\n"
945 "Component\tComponent\n"
946 "augustus\t\tTWODIR\t0\t\taugustus\n";
947
948 static const CHAR sp_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n"
949 "s72\tS72\tl255\n"
950 "Directory\tDirectory\n"
951 "TARGETDIR\t\tSourceDir\n"
952 "ProgramFilesFolder\tTARGETDIR\t.\n"
953 "MSITESTDIR\tProgramFilesFolder\tmsitest:.\n"
954 "ONEDIR\tMSITESTDIR\t.:shortone|longone\n"
955 "TWODIR\tONEDIR\t.:shorttwo|longtwo";
956
957 static const CHAR mcp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
958 "s72\tS38\ts72\ti2\tS255\tS72\n"
959 "Component\tComponent\n"
960 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t2\t\thydrogen\n"
961 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t2\t\thelium\n"
962 "lithium\t{4AF28FFC-71C7-4307-BDE4-B77C5338F56F}\tMSITESTDIR\t2\tPROPVAR=42\tlithium\n";
963
964 static const CHAR mcp_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
965 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
966 "Feature\tFeature\n"
967 "hydroxyl\t\thydroxyl\thydroxyl\t2\t1\tTARGETDIR\t0\n"
968 "heliox\t\theliox\theliox\t2\t5\tTARGETDIR\t0\n"
969 "lithia\t\tlithia\tlithia\t2\t10\tTARGETDIR\t0";
970
971 static const CHAR mcp_feature_comp_dat[] = "Feature_\tComponent_\n"
972 "s38\ts72\n"
973 "FeatureComponents\tFeature_\tComponent_\n"
974 "hydroxyl\thydrogen\n"
975 "heliox\thelium\n"
976 "lithia\tlithium";
977
978 static const CHAR mcomp_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
979 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
980 "File\tFile\n"
981 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
982 "helium\thelium\thelium\t0\t\t\t8192\t1\n"
983 "lithium\tlithium\tlithium\t0\t\t\t8192\t1\n"
984 "beryllium\tmissingcomp\tberyllium\t0\t\t\t8192\t1";
985
986 static const CHAR ai_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
987 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
988 "File\tFile\n"
989 "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
990 "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
991 "one.txt\tOne\tone.txt\t1000\t\t\t16384\t1\n"
992 "three.txt\tThree\tthree.txt\t1000\t\t\t16384\t3\n"
993 "two.txt\tTwo\ttwo.txt\t1000\t\t\t16384\t2\n"
994 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
995 "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1";
996
997 static const CHAR ip_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
998 "s72\tS255\tI2\n"
999 "InstallExecuteSequence\tAction\n"
1000 "CostFinalize\t\t1000\n"
1001 "ValidateProductID\t\t700\n"
1002 "CostInitialize\t\t800\n"
1003 "FileCost\t\t900\n"
1004 "RemoveFiles\t\t3500\n"
1005 "InstallFiles\t\t4000\n"
1006 "RegisterUser\t\t6000\n"
1007 "RegisterProduct\t\t6100\n"
1008 "PublishFeatures\t\t6300\n"
1009 "PublishProduct\t\t6400\n"
1010 "InstallFinalize\t\t6600\n"
1011 "InstallInitialize\t\t1500\n"
1012 "ProcessComponents\t\t1600\n"
1013 "UnpublishFeatures\t\t1800\n"
1014 "InstallValidate\t\t1400\n"
1015 "LaunchConditions\t\t100\n"
1016 "TestInstalledProp\tInstalled AND NOT REMOVE\t950\n";
1017
1018 static const CHAR ip_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
1019 "s72\ti2\tS64\tS0\tS255\n"
1020 "CustomAction\tAction\n"
1021 "TestInstalledProp\t19\t\tTest failed\t\n";
1022
1023 static const CHAR aup_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1024 "s72\tS255\tI2\n"
1025 "InstallExecuteSequence\tAction\n"
1026 "CostFinalize\t\t1000\n"
1027 "ValidateProductID\t\t700\n"
1028 "CostInitialize\t\t800\n"
1029 "FileCost\t\t900\n"
1030 "RemoveFiles\t\t3500\n"
1031 "InstallFiles\t\t4000\n"
1032 "RegisterUser\t\t6000\n"
1033 "RegisterProduct\t\t6100\n"
1034 "PublishFeatures\t\t6300\n"
1035 "PublishProduct\t\t6400\n"
1036 "InstallFinalize\t\t6600\n"
1037 "InstallInitialize\t\t1500\n"
1038 "ProcessComponents\t\t1600\n"
1039 "UnpublishFeatures\t\t1800\n"
1040 "InstallValidate\t\t1400\n"
1041 "LaunchConditions\t\t100\n"
1042 "TestAllUsersProp\tALLUSERS AND NOT REMOVE\t50\n";
1043
1044 static const CHAR aup2_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1045 "s72\tS255\tI2\n"
1046 "InstallExecuteSequence\tAction\n"
1047 "CostFinalize\t\t1000\n"
1048 "ValidateProductID\t\t700\n"
1049 "CostInitialize\t\t800\n"
1050 "FileCost\t\t900\n"
1051 "RemoveFiles\t\t3500\n"
1052 "InstallFiles\t\t4000\n"
1053 "RegisterUser\t\t6000\n"
1054 "RegisterProduct\t\t6100\n"
1055 "PublishFeatures\t\t6300\n"
1056 "PublishProduct\t\t6400\n"
1057 "InstallFinalize\t\t6600\n"
1058 "InstallInitialize\t\t1500\n"
1059 "ProcessComponents\t\t1600\n"
1060 "UnpublishFeatures\t\t1800\n"
1061 "InstallValidate\t\t1400\n"
1062 "LaunchConditions\t\t100\n"
1063 "TestAllUsersProp\tALLUSERS=2 AND NOT REMOVE\t50\n";
1064
1065 static const CHAR aup3_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1066 "s72\tS255\tI2\n"
1067 "InstallExecuteSequence\tAction\n"
1068 "CostFinalize\t\t1000\n"
1069 "ValidateProductID\t\t700\n"
1070 "CostInitialize\t\t800\n"
1071 "FileCost\t\t900\n"
1072 "RemoveFiles\t\t3500\n"
1073 "InstallFiles\t\t4000\n"
1074 "RegisterUser\t\t6000\n"
1075 "RegisterProduct\t\t6100\n"
1076 "PublishFeatures\t\t6300\n"
1077 "PublishProduct\t\t6400\n"
1078 "InstallFinalize\t\t6600\n"
1079 "InstallInitialize\t\t1500\n"
1080 "ProcessComponents\t\t1600\n"
1081 "UnpublishFeatures\t\t1800\n"
1082 "InstallValidate\t\t1400\n"
1083 "LaunchConditions\t\t100\n"
1084 "TestAllUsersProp\tALLUSERS=1 AND NOT REMOVE\t50\n";
1085
1086 static const CHAR aup_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
1087 "s72\ti2\tS64\tS0\tS255\n"
1088 "CustomAction\tAction\n"
1089 "TestAllUsersProp\t19\t\tTest failed\t\n";
1090
1091 static const CHAR cf_create_folders_dat[] = "Directory_\tComponent_\n"
1092 "s72\ts72\n"
1093 "CreateFolder\tDirectory_\tComponent_\n"
1094 "FIRSTDIR\tOne\n";
1095
1096 static const CHAR cf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1097 "s72\tS255\tI2\n"
1098 "InstallExecuteSequence\tAction\n"
1099 "CostFinalize\t\t1000\n"
1100 "ValidateProductID\t\t700\n"
1101 "CostInitialize\t\t800\n"
1102 "FileCost\t\t900\n"
1103 "RemoveFiles\t\t3500\n"
1104 "CreateFolders\t\t3700\n"
1105 "InstallExecute\t\t3800\n"
1106 "TestCreateFolders\t\t3900\n"
1107 "InstallFiles\t\t4000\n"
1108 "RegisterUser\t\t6000\n"
1109 "RegisterProduct\t\t6100\n"
1110 "PublishFeatures\t\t6300\n"
1111 "PublishProduct\t\t6400\n"
1112 "InstallFinalize\t\t6600\n"
1113 "InstallInitialize\t\t1500\n"
1114 "ProcessComponents\t\t1600\n"
1115 "UnpublishFeatures\t\t1800\n"
1116 "InstallValidate\t\t1400\n"
1117 "LaunchConditions\t\t100\n";
1118
1119 static const CHAR cf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
1120 "s72\ti2\tS64\tS0\tS255\n"
1121 "CustomAction\tAction\n"
1122 "TestCreateFolders\t19\t\tHalts installation\t\n";
1123
1124 static const CHAR rf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1125 "s72\tS255\tI2\n"
1126 "InstallExecuteSequence\tAction\n"
1127 "CostFinalize\t\t1000\n"
1128 "ValidateProductID\t\t700\n"
1129 "CostInitialize\t\t800\n"
1130 "FileCost\t\t900\n"
1131 "RemoveFiles\t\t3500\n"
1132 "CreateFolders\t\t3600\n"
1133 "RemoveFolders\t\t3700\n"
1134 "InstallExecute\t\t3800\n"
1135 "TestCreateFolders\t\t3900\n"
1136 "InstallFiles\t\t4000\n"
1137 "RegisterUser\t\t6000\n"
1138 "RegisterProduct\t\t6100\n"
1139 "PublishFeatures\t\t6300\n"
1140 "PublishProduct\t\t6400\n"
1141 "InstallFinalize\t\t6600\n"
1142 "InstallInitialize\t\t1500\n"
1143 "ProcessComponents\t\t1600\n"
1144 "UnpublishFeatures\t\t1800\n"
1145 "InstallValidate\t\t1400\n"
1146 "LaunchConditions\t\t100\n";
1147
1148
1149 static const CHAR sr_selfreg_dat[] = "File_\tCost\n"
1150 "s72\tI2\n"
1151 "SelfReg\tFile_\n"
1152 "one.txt\t1\n";
1153
1154 static const CHAR sr_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1155 "s72\tS255\tI2\n"
1156 "InstallExecuteSequence\tAction\n"
1157 "CostFinalize\t\t1000\n"
1158 "CostInitialize\t\t800\n"
1159 "FileCost\t\t900\n"
1160 "ResolveSource\t\t950\n"
1161 "MoveFiles\t\t1700\n"
1162 "SelfUnregModules\t\t3900\n"
1163 "InstallFiles\t\t4000\n"
1164 "DuplicateFiles\t\t4500\n"
1165 "WriteEnvironmentStrings\t\t4550\n"
1166 "CreateShortcuts\t\t4600\n"
1167 "InstallFinalize\t\t6600\n"
1168 "InstallInitialize\t\t1500\n"
1169 "InstallValidate\t\t1400\n"
1170 "LaunchConditions\t\t100\n";
1171
1172 static const CHAR font_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
1173 "i2\ti4\tL64\tS255\tS32\tS72\n"
1174 "Media\tDiskId\n"
1175 "1\t3\t\t\tDISK1\t\n";
1176
1177 static const CHAR font_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1178 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1179 "File\tFile\n"
1180 "font.ttf\tfonts\tfont.ttf\t1000\t\t\t8192\t1\n";
1181
1182 static const CHAR font_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1183 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1184 "Feature\tFeature\n"
1185 "fonts\t\t\tfont feature\t1\t2\tMSITESTDIR\t0\n";
1186
1187 static const CHAR font_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1188 "s72\tS38\ts72\ti2\tS255\tS72\n"
1189 "Component\tComponent\n"
1190 "fonts\t{F5920ED0-1183-4B8F-9330-86CE56557C05}\tMSITESTDIR\t0\t\tfont.ttf\n";
1191
1192 static const CHAR font_feature_comp_dat[] = "Feature_\tComponent_\n"
1193 "s38\ts72\n"
1194 "FeatureComponents\tFeature_\tComponent_\n"
1195 "fonts\tfonts\n";
1196
1197 static const CHAR font_dat[] = "File_\tFontTitle\n"
1198 "s72\tS128\n"
1199 "Font\tFile_\n"
1200 "font.ttf\tmsi test font\n";
1201
1202 static const CHAR font_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1203 "s72\tS255\tI2\n"
1204 "InstallExecuteSequence\tAction\n"
1205 "ValidateProductID\t\t700\n"
1206 "CostInitialize\t\t800\n"
1207 "FileCost\t\t900\n"
1208 "CostFinalize\t\t1000\n"
1209 "InstallValidate\t\t1400\n"
1210 "InstallInitialize\t\t1500\n"
1211 "ProcessComponents\t\t1600\n"
1212 "UnpublishFeatures\t\t1800\n"
1213 "RemoveFiles\t\t3500\n"
1214 "InstallFiles\t\t4000\n"
1215 "RegisterFonts\t\t4100\n"
1216 "UnregisterFonts\t\t4200\n"
1217 "RegisterUser\t\t6000\n"
1218 "RegisterProduct\t\t6100\n"
1219 "PublishFeatures\t\t6300\n"
1220 "PublishProduct\t\t6400\n"
1221 "InstallFinalize\t\t6600";
1222
1223 static const CHAR vp_property_dat[] = "Property\tValue\n"
1224 "s72\tl0\n"
1225 "Property\tProperty\n"
1226 "HASUIRUN\t0\n"
1227 "INSTALLLEVEL\t3\n"
1228 "InstallMode\tTypical\n"
1229 "Manufacturer\tWine\n"
1230 "PIDTemplate\t###-#######\n"
1231 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
1232 "ProductLanguage\t1033\n"
1233 "ProductName\tMSITEST\n"
1234 "ProductVersion\t1.1.1\n"
1235 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n";
1236
1237 static const CHAR vp_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
1238 "s72\ti2\tS64\tS0\tS255\n"
1239 "CustomAction\tAction\n"
1240 "SetProductID1\t51\tProductID\t1\t\n"
1241 "SetProductID2\t51\tProductID\t2\t\n"
1242 "TestProductID1\t19\t\t\tHalts installation\n"
1243 "TestProductID2\t19\t\t\tHalts installation\n";
1244
1245 static const CHAR vp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1246 "s72\tS255\tI2\n"
1247 "InstallExecuteSequence\tAction\n"
1248 "LaunchConditions\t\t100\n"
1249 "CostInitialize\t\t800\n"
1250 "FileCost\t\t900\n"
1251 "CostFinalize\t\t1000\n"
1252 "InstallValidate\t\t1400\n"
1253 "InstallInitialize\t\t1500\n"
1254 "SetProductID1\tSET_PRODUCT_ID=1\t3000\n"
1255 "SetProductID2\tSET_PRODUCT_ID=2\t3100\n"
1256 "ValidateProductID\t\t3200\n"
1257 "InstallExecute\t\t3300\n"
1258 "TestProductID1\tProductID=1\t3400\n"
1259 "TestProductID2\tProductID=\"123-1234567\"\t3500\n"
1260 "InstallFiles\t\t4000\n"
1261 "InstallFinalize\t\t6000\n";
1262
1263 static const CHAR odbc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1264 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1265 "File\tFile\n"
1266 "ODBCdriver.dll\todbc\tODBCdriver.dll\t1000\t\t\t8192\t1\n"
1267 "ODBCdriver2.dll\todbc\tODBCdriver2.dll\t1000\t\t\t8192\t2\n"
1268 "ODBCtranslator.dll\todbc\tODBCtranslator.dll\t1000\t\t\t8192\t3\n"
1269 "ODBCtranslator2.dll\todbc\tODBCtranslator2.dll\t1000\t\t\t8192\t4\n"
1270 "ODBCsetup.dll\todbc\tODBCsetup.dll\t1000\t\t\t8192\t5\n";
1271
1272 static const CHAR odbc_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1273 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1274 "Feature\tFeature\n"
1275 "odbc\t\t\todbc feature\t1\t2\tMSITESTDIR\t0\n";
1276
1277 static const CHAR odbc_feature_comp_dat[] = "Feature_\tComponent_\n"
1278 "s38\ts72\n"
1279 "FeatureComponents\tFeature_\tComponent_\n"
1280 "odbc\todbc\n";
1281
1282 static const CHAR odbc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1283 "s72\tS38\ts72\ti2\tS255\tS72\n"
1284 "Component\tComponent\n"
1285 "odbc\t{B6F3E4AE-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t0\t\tODBCdriver.dll\n";
1286
1287 static const CHAR odbc_driver_dat[] = "Driver\tComponent_\tDescription\tFile_\tFile_Setup\n"
1288 "s72\ts72\ts255\ts72\tS72\n"
1289 "ODBCDriver\tDriver\n"
1290 "ODBC test driver\todbc\tODBC test driver\tODBCdriver.dll\t\n"
1291 "ODBC test driver2\todbc\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n";
1292
1293 static const CHAR odbc_translator_dat[] = "Translator\tComponent_\tDescription\tFile_\tFile_Setup\n"
1294 "s72\ts72\ts255\ts72\tS72\n"
1295 "ODBCTranslator\tTranslator\n"
1296 "ODBC test translator\todbc\tODBC test translator\tODBCtranslator.dll\t\n"
1297 "ODBC test translator2\todbc\tODBC test translator2\tODBCtranslator2.dll\tODBCsetup.dll\n";
1298
1299 static const CHAR odbc_datasource_dat[] = "DataSource\tComponent_\tDescription\tDriverDescription\tRegistration\n"
1300 "s72\ts72\ts255\ts255\ti2\n"
1301 "ODBCDataSource\tDataSource\n"
1302 "ODBC data source\todbc\tODBC data source\tODBC driver\t0\n";
1303
1304 static const CHAR odbc_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1305 "s72\tS255\tI2\n"
1306 "InstallExecuteSequence\tAction\n"
1307 "LaunchConditions\t\t100\n"
1308 "CostInitialize\t\t800\n"
1309 "FileCost\t\t900\n"
1310 "CostFinalize\t\t1000\n"
1311 "InstallValidate\t\t1400\n"
1312 "InstallInitialize\t\t1500\n"
1313 "InstallODBC\t\t3000\n"
1314 "RemoveODBC\t\t3100\n"
1315 "InstallFiles\t\t4000\n"
1316 "InstallFinalize\t\t6000\n";
1317
1318 static const CHAR odbc_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
1319 "i2\ti4\tL64\tS255\tS32\tS72\n"
1320 "Media\tDiskId\n"
1321 "1\t5\t\t\tDISK1\t\n";
1322
1323 static const CHAR tl_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1324 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1325 "File\tFile\n"
1326 "typelib.dll\ttypelib\ttypelib.dll\t1000\t\t\t8192\t1\n";
1327
1328 static const CHAR tl_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1329 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1330 "Feature\tFeature\n"
1331 "typelib\t\t\ttypelib feature\t1\t2\tMSITESTDIR\t0\n";
1332
1333 static const CHAR tl_feature_comp_dat[] = "Feature_\tComponent_\n"
1334 "s38\ts72\n"
1335 "FeatureComponents\tFeature_\tComponent_\n"
1336 "typelib\ttypelib\n";
1337
1338 static const CHAR tl_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1339 "s72\tS38\ts72\ti2\tS255\tS72\n"
1340 "Component\tComponent\n"
1341 "typelib\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\ttypelib.dll\n";
1342
1343 static const CHAR tl_typelib_dat[] = "LibID\tLanguage\tComponent_\tVersion\tDescription\tDirectory_\tFeature_\tCost\n"
1344 "s38\ti2\ts72\tI4\tL128\tS72\ts38\tI4\n"
1345 "TypeLib\tLibID\tLanguage\tComponent_\n"
1346 "{EAC5166A-9734-4D91-878F-1DD02304C66C}\t0\ttypelib\t1793\t\tMSITESTDIR\ttypelib\t\n";
1347
1348 static const CHAR tl_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1349 "s72\tS255\tI2\n"
1350 "InstallExecuteSequence\tAction\n"
1351 "LaunchConditions\t\t100\n"
1352 "CostInitialize\t\t800\n"
1353 "FileCost\t\t900\n"
1354 "CostFinalize\t\t1000\n"
1355 "InstallValidate\t\t1400\n"
1356 "InstallInitialize\t\t1500\n"
1357 "ProcessComponents\t\t1600\n"
1358 "RemoveFiles\t\t1700\n"
1359 "InstallFiles\t\t2000\n"
1360 "RegisterTypeLibraries\tREGISTER_TYPELIB=1\t3000\n"
1361 "UnregisterTypeLibraries\t\t3100\n"
1362 "RegisterProduct\t\t5100\n"
1363 "PublishFeatures\t\t5200\n"
1364 "PublishProduct\t\t5300\n"
1365 "InstallFinalize\t\t6000\n";
1366
1367 static const CHAR crs_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1368 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1369 "File\tFile\n"
1370 "target.txt\tshortcut\ttarget.txt\t1000\t\t\t8192\t1\n";
1371
1372 static const CHAR crs_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1373 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1374 "Feature\tFeature\n"
1375 "shortcut\t\t\tshortcut feature\t1\t2\tMSITESTDIR\t0\n";
1376
1377 static const CHAR crs_feature_comp_dat[] = "Feature_\tComponent_\n"
1378 "s38\ts72\n"
1379 "FeatureComponents\tFeature_\tComponent_\n"
1380 "shortcut\tshortcut\n";
1381
1382 static const CHAR crs_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1383 "s72\tS38\ts72\ti2\tS255\tS72\n"
1384 "Component\tComponent\n"
1385 "shortcut\t{5D20E3C6-7206-498F-AC28-87AF2F9AD4CC}\tMSITESTDIR\t0\t\ttarget.txt\n";
1386
1387 static const CHAR crs_shortcut_dat[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
1388 "s72\ts72\tl128\ts72\ts72\tL255\tL255\tI2\tS72\tI2\tI2\tS72\n"
1389 "Shortcut\tShortcut\n"
1390 "shortcut\tMSITESTDIR\tshortcut\tshortcut\t[MSITESTDIR]target.txt\t\t\t\t\t\t\t\n";
1391
1392 static const CHAR crs_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1393 "s72\tS255\tI2\n"
1394 "InstallExecuteSequence\tAction\n"
1395 "LaunchConditions\t\t100\n"
1396 "CostInitialize\t\t800\n"
1397 "FileCost\t\t900\n"
1398 "CostFinalize\t\t1000\n"
1399 "InstallValidate\t\t1400\n"
1400 "InstallInitialize\t\t1500\n"
1401 "ProcessComponents\t\t1600\n"
1402 "RemoveFiles\t\t1700\n"
1403 "InstallFiles\t\t2000\n"
1404 "RemoveShortcuts\t\t3000\n"
1405 "CreateShortcuts\t\t3100\n"
1406 "RegisterProduct\t\t5000\n"
1407 "PublishFeatures\t\t5100\n"
1408 "PublishProduct\t\t5200\n"
1409 "InstallFinalize\t\t6000\n";
1410
1411 static const CHAR pub_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1412 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1413 "File\tFile\n"
1414 "english.txt\tpublish\tenglish.txt\t1000\t\t\t8192\t1\n";
1415
1416 static const CHAR pub_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1417 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1418 "Feature\tFeature\n"
1419 "publish\t\t\tpublish feature\t1\t2\tMSITESTDIR\t0\n";
1420
1421 static const CHAR pub_feature_comp_dat[] = "Feature_\tComponent_\n"
1422 "s38\ts72\n"
1423 "FeatureComponents\tFeature_\tComponent_\n"
1424 "publish\tpublish\n";
1425
1426 static const CHAR pub_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1427 "s72\tS38\ts72\ti2\tS255\tS72\n"
1428 "Component\tComponent\n"
1429 "publish\t{B4EA0ACF-6238-426E-9C6D-7869F0F9C768}\tMSITESTDIR\t0\t\tenglish.txt\n";
1430
1431 static const CHAR pub_publish_component_dat[] = "ComponentId\tQualifier\tComponent_\tAppData\tFeature_\n"
1432 "s38\ts255\ts72\tL255\ts38\n"
1433 "PublishComponent\tComponentId\tQualifier\tComponent_\n"
1434 "{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}\tenglish.txt\tpublish\t\tpublish\n";
1435
1436 static const CHAR pub_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
1437 "s72\tS255\tI2\n"
1438 "InstallExecuteSequence\tAction\n"
1439 "LaunchConditions\t\t100\n"
1440 "CostInitialize\t\t800\n"
1441 "FileCost\t\t900\n"
1442 "CostFinalize\t\t1000\n"
1443 "InstallValidate\t\t1400\n"
1444 "InstallInitialize\t\t1500\n"
1445 "ProcessComponents\t\t1600\n"
1446 "RemoveFiles\t\t1700\n"
1447 "InstallFiles\t\t2000\n"
1448 "PublishComponents\t\t3000\n"
1449 "UnpublishComponents\t\t3100\n"
1450 "RegisterProduct\t\t5000\n"
1451 "PublishFeatures\t\t5100\n"
1452 "PublishProduct\t\t5200\n"
1453 "InstallFinalize\t\t6000\n";
1454
1455 typedef struct _msi_table
1456 {
1457 const CHAR *filename;
1458 const CHAR *data;
1459 int size;
1460 } msi_table;
1461
1462 #define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)}
1463
1464 static const msi_table tables[] =
1465 {
1466 ADD_TABLE(component),
1467 ADD_TABLE(directory),
1468 ADD_TABLE(feature),
1469 ADD_TABLE(feature_comp),
1470 ADD_TABLE(file),
1471 ADD_TABLE(install_exec_seq),
1472 ADD_TABLE(media),
1473 ADD_TABLE(property),
1474 ADD_TABLE(registry),
1475 ADD_TABLE(service_install),
1476 ADD_TABLE(service_control)
1477 };
1478
1479 static const msi_table sc_tables[] =
1480 {
1481 ADD_TABLE(component),
1482 ADD_TABLE(directory),
1483 ADD_TABLE(feature),
1484 ADD_TABLE(feature_comp),
1485 ADD_TABLE(file),
1486 ADD_TABLE(install_exec_seq),
1487 ADD_TABLE(media),
1488 ADD_TABLE(property),
1489 ADD_TABLE(shortcut)
1490 };
1491
1492 static const msi_table ps_tables[] =
1493 {
1494 ADD_TABLE(component),
1495 ADD_TABLE(directory),
1496 ADD_TABLE(feature),
1497 ADD_TABLE(feature_comp),
1498 ADD_TABLE(file),
1499 ADD_TABLE(install_exec_seq),
1500 ADD_TABLE(media),
1501 ADD_TABLE(property),
1502 ADD_TABLE(condition)
1503 };
1504
1505 static const msi_table env_tables[] =
1506 {
1507 ADD_TABLE(component),
1508 ADD_TABLE(directory),
1509 ADD_TABLE(feature),
1510 ADD_TABLE(feature_comp),
1511 ADD_TABLE(file),
1512 ADD_TABLE(install_exec_seq),
1513 ADD_TABLE(media),
1514 ADD_TABLE(property),
1515 ADD_TABLE(environment)
1516 };
1517
1518 static const msi_table up_tables[] =
1519 {
1520 ADD_TABLE(component),
1521 ADD_TABLE(directory),
1522 ADD_TABLE(feature),
1523 ADD_TABLE(feature_comp),
1524 ADD_TABLE(file),
1525 ADD_TABLE(install_exec_seq),
1526 ADD_TABLE(media),
1527 ADD_TABLE(up_property),
1528 ADD_TABLE(registry),
1529 ADD_TABLE(service_install),
1530 ADD_TABLE(service_control)
1531 };
1532
1533 static const msi_table up2_tables[] =
1534 {
1535 ADD_TABLE(component),
1536 ADD_TABLE(directory),
1537 ADD_TABLE(feature),
1538 ADD_TABLE(feature_comp),
1539 ADD_TABLE(file),
1540 ADD_TABLE(install_exec_seq),
1541 ADD_TABLE(media),
1542 ADD_TABLE(up2_property),
1543 ADD_TABLE(registry),
1544 ADD_TABLE(service_install),
1545 ADD_TABLE(service_control)
1546 };
1547
1548 static const msi_table up3_tables[] =
1549 {
1550 ADD_TABLE(component),
1551 ADD_TABLE(directory),
1552 ADD_TABLE(feature),
1553 ADD_TABLE(feature_comp),
1554 ADD_TABLE(file),
1555 ADD_TABLE(install_exec_seq),
1556 ADD_TABLE(media),
1557 ADD_TABLE(up3_property),
1558 ADD_TABLE(registry),
1559 ADD_TABLE(service_install),
1560 ADD_TABLE(service_control)
1561 };
1562
1563 static const msi_table up4_tables[] =
1564 {
1565 ADD_TABLE(component),
1566 ADD_TABLE(directory),
1567 ADD_TABLE(feature),
1568 ADD_TABLE(feature_comp),
1569 ADD_TABLE(file),
1570 ADD_TABLE(pp_install_exec_seq),
1571 ADD_TABLE(media),
1572 ADD_TABLE(property),
1573 ADD_TABLE(registry),
1574 ADD_TABLE(service_install),
1575 ADD_TABLE(service_control)
1576 };
1577
1578 static const msi_table up5_tables[] =
1579 {
1580 ADD_TABLE(component),
1581 ADD_TABLE(directory),
1582 ADD_TABLE(feature),
1583 ADD_TABLE(feature_comp),
1584 ADD_TABLE(file),
1585 ADD_TABLE(pp_install_exec_seq),
1586 ADD_TABLE(media),
1587 ADD_TABLE(up_property),
1588 ADD_TABLE(registry),
1589 ADD_TABLE(service_install),
1590 ADD_TABLE(service_control)
1591 };
1592
1593 static const msi_table up6_tables[] =
1594 {
1595 ADD_TABLE(component),
1596 ADD_TABLE(directory),
1597 ADD_TABLE(feature),
1598 ADD_TABLE(feature_comp),
1599 ADD_TABLE(file),
1600 ADD_TABLE(pp_install_exec_seq),
1601 ADD_TABLE(media),
1602 ADD_TABLE(up2_property),
1603 ADD_TABLE(registry),
1604 ADD_TABLE(service_install),
1605 ADD_TABLE(service_control)
1606 };
1607
1608 static const msi_table up7_tables[] =
1609 {
1610 ADD_TABLE(component),
1611 ADD_TABLE(directory),
1612 ADD_TABLE(feature),
1613 ADD_TABLE(feature_comp),
1614 ADD_TABLE(file),
1615 ADD_TABLE(pp_install_exec_seq),
1616 ADD_TABLE(media),
1617 ADD_TABLE(up3_property),
1618 ADD_TABLE(registry),
1619 ADD_TABLE(service_install),
1620 ADD_TABLE(service_control)
1621 };
1622
1623 static const msi_table cc_tables[] =
1624 {
1625 ADD_TABLE(cc_component),
1626 ADD_TABLE(directory),
1627 ADD_TABLE(cc_feature),
1628 ADD_TABLE(cc_feature_comp),
1629 ADD_TABLE(cc_file),
1630 ADD_TABLE(install_exec_seq),
1631 ADD_TABLE(cc_media),
1632 ADD_TABLE(property),
1633 };
1634
1635 static const msi_table cc2_tables[] =
1636 {
1637 ADD_TABLE(cc2_component),
1638 ADD_TABLE(directory),
1639 ADD_TABLE(cc_feature),
1640 ADD_TABLE(cc_feature_comp),
1641 ADD_TABLE(cc2_file),
1642 ADD_TABLE(install_exec_seq),
1643 ADD_TABLE(cc_media),
1644 ADD_TABLE(property),
1645 };
1646
1647 static const msi_table co_tables[] =
1648 {
1649 ADD_TABLE(cc_component),
1650 ADD_TABLE(directory),
1651 ADD_TABLE(cc_feature),
1652 ADD_TABLE(cc_feature_comp),
1653 ADD_TABLE(co_file),
1654 ADD_TABLE(install_exec_seq),
1655 ADD_TABLE(co_media),
1656 ADD_TABLE(property),
1657 };
1658
1659 static const msi_table co2_tables[] =
1660 {
1661 ADD_TABLE(cc_component),
1662 ADD_TABLE(directory),
1663 ADD_TABLE(cc_feature),
1664 ADD_TABLE(cc_feature_comp),
1665 ADD_TABLE(cc_file),
1666 ADD_TABLE(install_exec_seq),
1667 ADD_TABLE(co2_media),
1668 ADD_TABLE(property),
1669 };
1670
1671 static const msi_table mm_tables[] =
1672 {
1673 ADD_TABLE(cc_component),
1674 ADD_TABLE(directory),
1675 ADD_TABLE(cc_feature),
1676 ADD_TABLE(cc_feature_comp),
1677 ADD_TABLE(mm_file),
1678 ADD_TABLE(install_exec_seq),
1679 ADD_TABLE(mm_media),
1680 ADD_TABLE(property),
1681 };
1682
1683 static const msi_table ss_tables[] =
1684 {
1685 ADD_TABLE(cc_component),
1686 ADD_TABLE(directory),
1687 ADD_TABLE(cc_feature),
1688 ADD_TABLE(cc_feature_comp),
1689 ADD_TABLE(cc_file),
1690 ADD_TABLE(install_exec_seq),
1691 ADD_TABLE(ss_media),
1692 ADD_TABLE(property),
1693 };
1694
1695 static const msi_table ui_tables[] =
1696 {
1697 ADD_TABLE(ui_component),
1698 ADD_TABLE(directory),
1699 ADD_TABLE(cc_feature),
1700 ADD_TABLE(cc_feature_comp),
1701 ADD_TABLE(cc_file),
1702 ADD_TABLE(install_exec_seq),
1703 ADD_TABLE(ui_install_ui_seq),
1704 ADD_TABLE(ui_custom_action),
1705 ADD_TABLE(cc_media),
1706 ADD_TABLE(property),
1707 };
1708
1709 static const msi_table rof_tables[] =
1710 {
1711 ADD_TABLE(rof_component),
1712 ADD_TABLE(directory),
1713 ADD_TABLE(rof_feature),
1714 ADD_TABLE(rof_feature_comp),
1715 ADD_TABLE(rof_file),
1716 ADD_TABLE(install_exec_seq),
1717 ADD_TABLE(rof_media),
1718 ADD_TABLE(property),
1719 };
1720
1721 static const msi_table rofc_tables[] =
1722 {
1723 ADD_TABLE(rof_component),
1724 ADD_TABLE(directory),
1725 ADD_TABLE(rof_feature),
1726 ADD_TABLE(rof_feature_comp),
1727 ADD_TABLE(rofc_file),
1728 ADD_TABLE(install_exec_seq),
1729 ADD_TABLE(rofc_media),
1730 ADD_TABLE(property),
1731 };
1732
1733 static const msi_table sdp_tables[] =
1734 {
1735 ADD_TABLE(rof_component),
1736 ADD_TABLE(directory),
1737 ADD_TABLE(rof_feature),
1738 ADD_TABLE(rof_feature_comp),
1739 ADD_TABLE(rof_file),
1740 ADD_TABLE(sdp_install_exec_seq),
1741 ADD_TABLE(sdp_custom_action),
1742 ADD_TABLE(rof_media),
1743 ADD_TABLE(property),
1744 };
1745
1746 static const msi_table cie_tables[] =
1747 {
1748 ADD_TABLE(cie_component),
1749 ADD_TABLE(directory),
1750 ADD_TABLE(cc_feature),
1751 ADD_TABLE(cie_feature_comp),
1752 ADD_TABLE(cie_file),
1753 ADD_TABLE(install_exec_seq),
1754 ADD_TABLE(cie_media),
1755 ADD_TABLE(property),
1756 };
1757
1758 static const msi_table ci_tables[] =
1759 {
1760 ADD_TABLE(ci_component),
1761 ADD_TABLE(directory),
1762 ADD_TABLE(rof_feature),
1763 ADD_TABLE(rof_feature_comp),
1764 ADD_TABLE(rof_file),
1765 ADD_TABLE(ci_install_exec_seq),
1766 ADD_TABLE(rof_media),
1767 ADD_TABLE(property),
1768 ADD_TABLE(ci_custom_action),
1769 };
1770
1771 static const msi_table ci2_tables[] =
1772 {
1773 ADD_TABLE(ci2_component),
1774 ADD_TABLE(directory),
1775 ADD_TABLE(rof_feature),
1776 ADD_TABLE(ci2_feature_comp),
1777 ADD_TABLE(ci2_file),
1778 ADD_TABLE(install_exec_seq),
1779 ADD_TABLE(rof_media),
1780 ADD_TABLE(property),
1781 };
1782
1783 static const msi_table spf_tables[] =
1784 {
1785 ADD_TABLE(ci_component),
1786 ADD_TABLE(directory),
1787 ADD_TABLE(rof_feature),
1788 ADD_TABLE(rof_feature_comp),
1789 ADD_TABLE(rof_file),
1790 ADD_TABLE(spf_install_exec_seq),
1791 ADD_TABLE(rof_media),
1792 ADD_TABLE(property),
1793 ADD_TABLE(spf_custom_action),
1794 ADD_TABLE(spf_install_ui_seq),
1795 };
1796
1797 static const msi_table pp_tables[] =
1798 {
1799 ADD_TABLE(ci_component),
1800 ADD_TABLE(directory),
1801 ADD_TABLE(rof_feature),
1802 ADD_TABLE(rof_feature_comp),
1803 ADD_TABLE(rof_file),
1804 ADD_TABLE(pp_install_exec_seq),
1805 ADD_TABLE(rof_media),
1806 ADD_TABLE(property),
1807 };
1808
1809 static const msi_table ppc_tables[] =
1810 {
1811 ADD_TABLE(ppc_component),
1812 ADD_TABLE(directory),
1813 ADD_TABLE(rof_feature),
1814 ADD_TABLE(ppc_feature_comp),
1815 ADD_TABLE(ppc_file),
1816 ADD_TABLE(pp_install_exec_seq),
1817 ADD_TABLE(ppc_media),
1818 ADD_TABLE(property),
1819 };
1820
1821 static const msi_table lus0_tables[] =
1822 {
1823 ADD_TABLE(ci_component),
1824 ADD_TABLE(directory),
1825 ADD_TABLE(rof_feature),
1826 ADD_TABLE(rof_feature_comp),
1827 ADD_TABLE(rof_file),
1828 ADD_TABLE(pp_install_exec_seq),
1829 ADD_TABLE(rof_media),
1830 ADD_TABLE(property),
1831 };
1832
1833 static const msi_table lus1_tables[] =
1834 {
1835 ADD_TABLE(ci_component),
1836 ADD_TABLE(directory),
1837 ADD_TABLE(rof_feature),
1838 ADD_TABLE(rof_feature_comp),
1839 ADD_TABLE(rof_file),
1840 ADD_TABLE(pp_install_exec_seq),
1841 ADD_TABLE(rofc_media),
1842 ADD_TABLE(property),
1843 };
1844
1845 static const msi_table lus2_tables[] =
1846 {
1847 ADD_TABLE(ci_component),
1848 ADD_TABLE(directory),
1849 ADD_TABLE(rof_feature),
1850 ADD_TABLE(rof_feature_comp),
1851 ADD_TABLE(rof_file),
1852 ADD_TABLE(pp_install_exec_seq),
1853 ADD_TABLE(lus2_media),
1854 ADD_TABLE(property),
1855 };
1856
1857 static const msi_table tp_tables[] =
1858 {
1859 ADD_TABLE(tp_component),
1860 ADD_TABLE(directory),
1861 ADD_TABLE(rof_feature),
1862 ADD_TABLE(ci2_feature_comp),
1863 ADD_TABLE(ci2_file),
1864 ADD_TABLE(install_exec_seq),
1865 ADD_TABLE(rof_media),
1866 ADD_TABLE(property),
1867 };
1868
1869 static const msi_table cwd_tables[] =
1870 {
1871 ADD_TABLE(cwd_component),
1872 ADD_TABLE(directory),
1873 ADD_TABLE(rof_feature),
1874 ADD_TABLE(ci2_feature_comp),
1875 ADD_TABLE(ci2_file),
1876 ADD_TABLE(install_exec_seq),
1877 ADD_TABLE(rof_media),
1878 ADD_TABLE(property),
1879 };
1880
1881 static const msi_table adm_tables[] =
1882 {
1883 ADD_TABLE(adm_component),
1884 ADD_TABLE(directory),
1885 ADD_TABLE(rof_feature),
1886 ADD_TABLE(ci2_feature_comp),
1887 ADD_TABLE(ci2_file),
1888 ADD_TABLE(install_exec_seq),
1889 ADD_TABLE(rof_media),
1890 ADD_TABLE(property),
1891 ADD_TABLE(adm_custom_action),
1892 ADD_TABLE(adm_admin_exec_seq),
1893 };
1894
1895 static const msi_table amp_tables[] =
1896 {
1897 ADD_TABLE(amp_component),
1898 ADD_TABLE(directory),
1899 ADD_TABLE(rof_feature),
1900 ADD_TABLE(ci2_feature_comp),
1901 ADD_TABLE(ci2_file),
1902 ADD_TABLE(install_exec_seq),
1903 ADD_TABLE(rof_media),
1904 ADD_TABLE(property),
1905 };
1906
1907 static const msi_table rem_tables[] =
1908 {
1909 ADD_TABLE(rem_component),
1910 ADD_TABLE(directory),
1911 ADD_TABLE(rof_feature),
1912 ADD_TABLE(rem_feature_comp),
1913 ADD_TABLE(rem_file),
1914 ADD_TABLE(rem_install_exec_seq),
1915 ADD_TABLE(rof_media),
1916 ADD_TABLE(property),
1917 ADD_TABLE(rem_remove_files),
1918 };
1919
1920 static const msi_table mov_tables[] =
1921 {
1922 ADD_TABLE(cwd_component),
1923 ADD_TABLE(directory),
1924 ADD_TABLE(rof_feature),
1925 ADD_TABLE(ci2_feature_comp),
1926 ADD_TABLE(ci2_file),
1927 ADD_TABLE(install_exec_seq),
1928 ADD_TABLE(rof_media),
1929 ADD_TABLE(property),
1930 ADD_TABLE(mov_move_file),
1931 };
1932
1933 static const msi_table mc_tables[] =
1934 {
1935 ADD_TABLE(mc_component),
1936 ADD_TABLE(directory),
1937 ADD_TABLE(cc_feature),
1938 ADD_TABLE(cie_feature_comp),
1939 ADD_TABLE(mc_file),
1940 ADD_TABLE(install_exec_seq),
1941 ADD_TABLE(mc_media),
1942 ADD_TABLE(property),
1943 ADD_TABLE(mc_file_hash),
1944 };
1945
1946 static const msi_table df_tables[] =
1947 {
1948 ADD_TABLE(rof_component),
1949 ADD_TABLE(df_directory),
1950 ADD_TABLE(rof_feature),
1951 ADD_TABLE(rof_feature_comp),
1952 ADD_TABLE(rof_file),
1953 ADD_TABLE(install_exec_seq),
1954 ADD_TABLE(rof_media),
1955 ADD_TABLE(property),
1956 ADD_TABLE(df_duplicate_file),
1957 };
1958
1959 static const msi_table wrv_tables[] =
1960 {
1961 ADD_TABLE(wrv_component),
1962 ADD_TABLE(directory),
1963 ADD_TABLE(rof_feature),
1964 ADD_TABLE(ci2_feature_comp),
1965 ADD_TABLE(ci2_file),
1966 ADD_TABLE(install_exec_seq),
1967 ADD_TABLE(rof_media),
1968 ADD_TABLE(property),
1969 ADD_TABLE(wrv_registry),
1970 };
1971
1972 static const msi_table sf_tables[] =
1973 {
1974 ADD_TABLE(wrv_component),
1975 ADD_TABLE(directory),
1976 ADD_TABLE(rof_feature),
1977 ADD_TABLE(ci2_feature_comp),
1978 ADD_TABLE(ci2_file),
1979 ADD_TABLE(install_exec_seq),
1980 ADD_TABLE(rof_media),
1981 ADD_TABLE(property),
1982 };
1983
1984 static const msi_table ca51_tables[] =
1985 {
1986 ADD_TABLE(ca51_component),
1987 ADD_TABLE(directory),
1988 ADD_TABLE(rof_feature),
1989 ADD_TABLE(ci2_feature_comp),
1990 ADD_TABLE(ci2_file),
1991 ADD_TABLE(ca51_install_exec_seq),
1992 ADD_TABLE(rof_media),
1993 ADD_TABLE(property),
1994 ADD_TABLE(ca51_custom_action),
1995 };
1996
1997 static const msi_table is_tables[] =
1998 {
1999 ADD_TABLE(is_component),
2000 ADD_TABLE(directory),
2001 ADD_TABLE(is_feature),
2002 ADD_TABLE(is_feature_comp),
2003 ADD_TABLE(is_file),
2004 ADD_TABLE(install_exec_seq),
2005 ADD_TABLE(is_media),
2006 ADD_TABLE(property),
2007 };
2008
2009 static const msi_table sp_tables[] =
2010 {
2011 ADD_TABLE(sp_component),
2012 ADD_TABLE(sp_directory),
2013 ADD_TABLE(rof_feature),
2014 ADD_TABLE(ci2_feature_comp),
2015 ADD_TABLE(ci2_file),
2016 ADD_TABLE(install_exec_seq),
2017 ADD_TABLE(rof_media),
2018 ADD_TABLE(property),
2019 };
2020
2021 static const msi_table mcp_tables[] =
2022 {
2023 ADD_TABLE(mcp_component),
2024 ADD_TABLE(directory),
2025 ADD_TABLE(mcp_feature),
2026 ADD_TABLE(mcp_feature_comp),
2027 ADD_TABLE(rem_file),
2028 ADD_TABLE(rem_install_exec_seq),
2029 ADD_TABLE(rof_media),
2030 ADD_TABLE(property),
2031 };
2032
2033 static const msi_table mcomp_tables[] =
2034 {
2035 ADD_TABLE(mcp_component),
2036 ADD_TABLE(directory),
2037 ADD_TABLE(mcp_feature),
2038 ADD_TABLE(mcp_feature_comp),
2039 ADD_TABLE(mcomp_file),
2040 ADD_TABLE(rem_install_exec_seq),
2041 ADD_TABLE(rof_media),
2042 ADD_TABLE(property),
2043 };
2044
2045 static const msi_table ai_tables[] =
2046 {
2047 ADD_TABLE(component),
2048 ADD_TABLE(directory),
2049 ADD_TABLE(feature),
2050 ADD_TABLE(feature_comp),
2051 ADD_TABLE(ai_file),
2052 ADD_TABLE(install_exec_seq),
2053 ADD_TABLE(media),
2054 ADD_TABLE(property)
2055 };
2056
2057 static const msi_table pc_tables[] =
2058 {
2059 ADD_TABLE(ca51_component),
2060 ADD_TABLE(directory),
2061 ADD_TABLE(rof_feature),
2062 ADD_TABLE(ci2_feature_comp),
2063 ADD_TABLE(ci2_file),
2064 ADD_TABLE(install_exec_seq),
2065 ADD_TABLE(rof_media),
2066 ADD_TABLE(property)
2067 };
2068
2069 static const msi_table ip_tables[] =
2070 {
2071 ADD_TABLE(component),
2072 ADD_TABLE(directory),
2073 ADD_TABLE(feature),
2074 ADD_TABLE(feature_comp),
2075 ADD_TABLE(file),
2076 ADD_TABLE(ip_install_exec_seq),
2077 ADD_TABLE(ip_custom_action),
2078 ADD_TABLE(media),
2079 ADD_TABLE(property)
2080 };
2081
2082 static const msi_table aup_tables[] =
2083 {
2084 ADD_TABLE(component),
2085 ADD_TABLE(directory),
2086 ADD_TABLE(feature),
2087 ADD_TABLE(feature_comp),
2088 ADD_TABLE(file),
2089 ADD_TABLE(aup_install_exec_seq),
2090 ADD_TABLE(aup_custom_action),
2091 ADD_TABLE(media),
2092 ADD_TABLE(property)
2093 };
2094
2095 static const msi_table aup2_tables[] =
2096 {
2097 ADD_TABLE(component),
2098 ADD_TABLE(directory),
2099 ADD_TABLE(feature),
2100 ADD_TABLE(feature_comp),
2101 ADD_TABLE(file),
2102 ADD_TABLE(aup2_install_exec_seq),
2103 ADD_TABLE(aup_custom_action),
2104 ADD_TABLE(media),
2105 ADD_TABLE(aup_property)
2106 };
2107
2108 static const msi_table aup3_tables[] =
2109 {
2110 ADD_TABLE(component),
2111 ADD_TABLE(directory),
2112 ADD_TABLE(feature),
2113 ADD_TABLE(feature_comp),
2114 ADD_TABLE(file),
2115 ADD_TABLE(aup2_install_exec_seq),
2116 ADD_TABLE(aup_custom_action),
2117 ADD_TABLE(media),
2118 ADD_TABLE(aup2_property)
2119 };
2120
2121 static const msi_table aup4_tables[] =
2122 {
2123 ADD_TABLE(component),
2124 ADD_TABLE(directory),
2125 ADD_TABLE(feature),
2126 ADD_TABLE(feature_comp),
2127 ADD_TABLE(file),
2128 ADD_TABLE(aup3_install_exec_seq),
2129 ADD_TABLE(aup_custom_action),
2130 ADD_TABLE(media),
2131 ADD_TABLE(aup2_property)
2132 };
2133
2134 static const msi_table fiu_tables[] =
2135 {
2136 ADD_TABLE(rof_component),
2137 ADD_TABLE(directory),
2138 ADD_TABLE(rof_feature),
2139 ADD_TABLE(rof_feature_comp),
2140 ADD_TABLE(rof_file),
2141 ADD_TABLE(pp_install_exec_seq),
2142 ADD_TABLE(rof_media),
2143 ADD_TABLE(property),
2144 };
2145
2146 static const msi_table fiuc_tables[] =
2147 {
2148 ADD_TABLE(rof_component),
2149 ADD_TABLE(directory),
2150 ADD_TABLE(rof_feature),
2151 ADD_TABLE(rof_feature_comp),
2152 ADD_TABLE(rofc_file),
2153 ADD_TABLE(pp_install_exec_seq),
2154 ADD_TABLE(rofc_media),
2155 ADD_TABLE(property),
2156 };
2157
2158 static const msi_table cf_tables[] =
2159 {
2160 ADD_TABLE(component),
2161 ADD_TABLE(directory),
2162 ADD_TABLE(feature),
2163 ADD_TABLE(feature_comp),
2164 ADD_TABLE(file),
2165 ADD_TABLE(cf_create_folders),
2166 ADD_TABLE(cf_install_exec_seq),
2167 ADD_TABLE(cf_custom_action),
2168 ADD_TABLE(media),
2169 ADD_TABLE(property)
2170 };
2171
2172 static const msi_table rf_tables[] =
2173 {
2174 ADD_TABLE(component),
2175 ADD_TABLE(directory),
2176 ADD_TABLE(feature),
2177 ADD_TABLE(feature_comp),
2178 ADD_TABLE(file),
2179 ADD_TABLE(cf_create_folders),
2180 ADD_TABLE(rf_install_exec_seq),
2181 ADD_TABLE(cf_custom_action),
2182 ADD_TABLE(media),
2183 ADD_TABLE(property)
2184 };
2185
2186 static const msi_table sss_tables[] =
2187 {
2188 ADD_TABLE(component),
2189 ADD_TABLE(directory),
2190 ADD_TABLE(feature),
2191 ADD_TABLE(feature_comp),
2192 ADD_TABLE(file),
2193 ADD_TABLE(sss_install_exec_seq),
2194 ADD_TABLE(sss_service_control),
2195 ADD_TABLE(media),
2196 ADD_TABLE(property)
2197 };
2198
2199 static const msi_table sds_tables[] =
2200 {
2201 ADD_TABLE(component),
2202 ADD_TABLE(directory),
2203 ADD_TABLE(feature),
2204 ADD_TABLE(feature_comp),
2205 ADD_TABLE(file),
2206 ADD_TABLE(sss_install_exec_seq),
2207 ADD_TABLE(service_control),
2208 ADD_TABLE(media),
2209 ADD_TABLE(property)
2210 };
2211
2212 static const msi_table sr_tables[] =
2213 {
2214 ADD_TABLE(component),
2215 ADD_TABLE(directory),
2216 ADD_TABLE(feature),
2217 ADD_TABLE(feature_comp),
2218 ADD_TABLE(file),
2219 ADD_TABLE(sr_selfreg),
2220 ADD_TABLE(sr_install_exec_seq),
2221 ADD_TABLE(media),
2222 ADD_TABLE(property)
2223 };
2224
2225 static const msi_table font_tables[] =
2226 {
2227 ADD_TABLE(font_component),
2228 ADD_TABLE(directory),
2229 ADD_TABLE(font_feature),
2230 ADD_TABLE(font_feature_comp),
2231 ADD_TABLE(font_file),
2232 ADD_TABLE(font),
2233 ADD_TABLE(font_install_exec_seq),
2234 ADD_TABLE(font_media),
2235 ADD_TABLE(property)
2236 };
2237
2238 static const msi_table vp_tables[] =
2239 {
2240 ADD_TABLE(component),
2241 ADD_TABLE(directory),
2242 ADD_TABLE(feature),
2243 ADD_TABLE(feature_comp),
2244 ADD_TABLE(file),
2245 ADD_TABLE(vp_custom_action),
2246 ADD_TABLE(vp_install_exec_seq),
2247 ADD_TABLE(media),
2248 ADD_TABLE(vp_property)
2249 };
2250
2251 static const msi_table odbc_tables[] =
2252 {
2253 ADD_TABLE(odbc_component),
2254 ADD_TABLE(directory),
2255 ADD_TABLE(odbc_feature),
2256 ADD_TABLE(odbc_feature_comp),
2257 ADD_TABLE(odbc_file),
2258 ADD_TABLE(odbc_driver),
2259 ADD_TABLE(odbc_translator),
2260 ADD_TABLE(odbc_datasource),
2261 ADD_TABLE(odbc_install_exec_seq),
2262 ADD_TABLE(odbc_media),
2263 ADD_TABLE(property)
2264 };
2265
2266 static const msi_table tl_tables[] =
2267 {
2268 ADD_TABLE(tl_component),
2269 ADD_TABLE(directory),
2270 ADD_TABLE(tl_feature),
2271 ADD_TABLE(tl_feature_comp),
2272 ADD_TABLE(tl_file),
2273 ADD_TABLE(tl_typelib),
2274 ADD_TABLE(tl_install_exec_seq),
2275 ADD_TABLE(media),
2276 ADD_TABLE(property)
2277 };
2278
2279 static const msi_table crs_tables[] =
2280 {
2281 ADD_TABLE(crs_component),
2282 ADD_TABLE(directory),
2283 ADD_TABLE(crs_feature),
2284 ADD_TABLE(crs_feature_comp),
2285 ADD_TABLE(crs_file),
2286 ADD_TABLE(crs_shortcut),
2287 ADD_TABLE(crs_install_exec_seq),
2288 ADD_TABLE(media),
2289 ADD_TABLE(property)
2290 };
2291
2292 static const msi_table pub_tables[] =
2293 {
2294 ADD_TABLE(directory),
2295 ADD_TABLE(pub_component),
2296 ADD_TABLE(pub_feature),
2297 ADD_TABLE(pub_feature_comp),
2298 ADD_TABLE(pub_file),
2299 ADD_TABLE(pub_publish_component),
2300 ADD_TABLE(pub_install_exec_seq),
2301 ADD_TABLE(media),
2302 ADD_TABLE(property)
2303 };
2304
2305 /* cabinet definitions */
2306
2307 /* make the max size large so there is only one cab file */
2308 #define MEDIA_SIZE 0x7FFFFFFF
2309 #define FOLDER_THRESHOLD 900000
2310
2311 /* the FCI callbacks */
2312
2313 static void * CDECL mem_alloc(ULONG cb)
2314 {
2315 return HeapAlloc(GetProcessHeap(), 0, cb);
2316 }
2317
2318 static void CDECL mem_free(void *memory)
2319 {
2320 HeapFree(GetProcessHeap(), 0, memory);
2321 }
2322
2323 static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv)
2324 {
2325 sprintf(pccab->szCab, pv, pccab->iCab);
2326 return TRUE;
2327 }
2328
2329 static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv)
2330 {
2331 return 0;
2332 }
2333
2334 static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile,
2335 BOOL fContinuation, void *pv)
2336 {
2337 return 0;
2338 }
2339
2340 static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv)
2341 {
2342 HANDLE handle;
2343 DWORD dwAccess = 0;
2344 DWORD dwShareMode = 0;
2345 DWORD dwCreateDisposition = OPEN_EXISTING;
2346
2347 dwAccess = GENERIC_READ | GENERIC_WRITE;
2348 /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */
2349 dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
2350
2351 if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES)
2352 dwCreateDisposition = OPEN_EXISTING;
2353 else
2354 dwCreateDisposition = CREATE_NEW;
2355
2356 handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL,
2357 dwCreateDisposition, 0, NULL);
2358
2359 ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszFile);
2360
2361 return (INT_PTR)handle;
2362 }
2363
2364 static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
2365 {
2366 HANDLE handle = (HANDLE)hf;
2367 DWORD dwRead;
2368 BOOL res;
2369
2370 res = ReadFile(handle, memory, cb, &dwRead, NULL);
2371 ok(res, "Failed to ReadFile\n");
2372
2373 return dwRead;
2374 }
2375
2376 static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
2377 {
2378 HANDLE handle = (HANDLE)hf;
2379 DWORD dwWritten;
2380 BOOL res;
2381
2382 res = WriteFile(handle, memory, cb, &dwWritten, NULL);
2383 ok(res, "Failed to WriteFile\n");
2384
2385 return dwWritten;
2386 }
2387
2388 static int CDECL fci_close(INT_PTR hf, int *err, void *pv)
2389 {
2390 HANDLE handle = (HANDLE)hf;
2391 ok(CloseHandle(handle), "Failed to CloseHandle\n");
2392
2393 return 0;
2394 }
2395
2396 static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv)
2397 {
2398 HANDLE handle = (HANDLE)hf;
2399 DWORD ret;
2400
2401 ret = SetFilePointer(handle, dist, NULL, seektype);
2402 ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n");
2403
2404 return ret;
2405 }
2406
2407 static int CDECL fci_delete(char *pszFile, int *err, void *pv)
2408 {
2409 BOOL ret = DeleteFileA(pszFile);
2410 ok(ret, "Failed to DeleteFile %s\n", pszFile);
2411
2412 return 0;
2413 }
2414
2415 static void init_functionpointers(void)
2416 {
2417 HMODULE hmsi = GetModuleHandleA("msi.dll");
2418 HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll");
2419
2420 #define GET_PROC(mod, func) \
2421 p ## func = (void*)GetProcAddress(mod, #func); \
2422 if(!p ## func) \
2423 trace("GetProcAddress(%s) failed\n", #func);
2424
2425 GET_PROC(hmsi, MsiQueryComponentStateA);
2426 GET_PROC(hmsi, MsiSetExternalUIRecord);
2427 GET_PROC(hmsi, MsiSourceListEnumSourcesA);
2428 GET_PROC(hmsi, MsiSourceListGetInfoA);
2429
2430 GET_PROC(hadvapi32, ConvertSidToStringSidA);
2431
2432 hsrclient = LoadLibraryA("srclient.dll");
2433 GET_PROC(hsrclient, SRRemoveRestorePoint);
2434 GET_PROC(hsrclient, SRSetRestorePointA);
2435
2436 #undef GET_PROC
2437 }
2438
2439 static BOOL check_win9x(void)
2440 {
2441 SC_HANDLE scm;
2442
2443 scm = OpenSCManager(NULL, NULL, GENERIC_ALL);
2444 if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
2445 return TRUE;
2446
2447 CloseServiceHandle(scm);
2448
2449 return FALSE;
2450 }
2451
2452 static LPSTR get_user_sid(LPSTR *usersid)
2453 {
2454 HANDLE token;
2455 BYTE buf[1024];
2456 DWORD size;
2457 PTOKEN_USER user;
2458
2459 if (!pConvertSidToStringSidA)
2460 {
2461 win_skip("ConvertSidToStringSidA is not available\n");
2462 return NULL;
2463 }
2464
2465 *usersid = NULL;
2466 OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
2467 size = sizeof(buf);
2468 GetTokenInformation(token, TokenUser, buf, size, &size);
2469 user = (PTOKEN_USER)buf;
2470 pConvertSidToStringSidA(user->User.Sid, usersid);
2471 ok(*usersid != NULL, "pConvertSidToStringSidA failed lre=%d\n", GetLastError());
2472 CloseHandle(token);
2473 return *usersid;
2474 }
2475
2476 static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val)
2477 {
2478 CHAR buffer[0x20];
2479 UINT r;
2480 DWORD sz;
2481
2482 sz = sizeof buffer;
2483 r = MsiRecordGetString(rec, field, buffer, &sz);
2484 return (r == ERROR_SUCCESS ) && !strcmp(val, buffer);
2485 }
2486
2487 static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv)
2488 {
2489 LPSTR tempname;
2490
2491 tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
2492 GetTempFileNameA(".", "xx", 0, tempname);
2493
2494 if (tempname && (strlen(tempname) < (unsigned)cbTempName))
2495 {
2496 lstrcpyA(pszTempName, tempname);
2497 HeapFree(GetProcessHeap(), 0, tempname);
2498 return TRUE;
2499 }
2500
2501 HeapFree(GetProcessHeap(), 0, tempname);