c281d3b06e835730a2976731b38741afb195b17f
[reactos.git] / rostests / winetests / msi / action.c
1 /*
2 * Copyright (C) 2006 James Hawkins
3 * Copyright 2010 Hans Leidekker for CodeWeavers
4 *
5 * Tests concentrating on standard actions
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22 #define _WIN32_MSI 300
23 #include <stdio.h>
24 #include <stdlib.h>
25
26 #include <windows.h>
27 #include <msiquery.h>
28 #include <msidefs.h>
29 #include <msi.h>
30 #include <fci.h>
31 #include <srrestoreptapi.h>
32 #include <wtypes.h>
33 #include <shellapi.h>
34 #include <winsvc.h>
35
36 #include "wine/test.h"
37
38 static UINT (WINAPI *pMsiQueryComponentStateA)
39 (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE *);
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 static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)
45 (LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPSTR, LPDWORD);
46 static UINT (WINAPI *pMsiQueryFeatureStateExA)
47 (LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE *);
48
49 static BOOL (WINAPI *pCheckTokenMembership)(HANDLE,PSID,PBOOL);
50 static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR *);
51 static BOOL (WINAPI *pOpenProcessToken)(HANDLE, DWORD, PHANDLE);
52 static LONG (WINAPI *pRegDeleteKeyExA)(HKEY, LPCSTR, REGSAM, DWORD);
53 static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
54
55 static HMODULE hsrclient;
56 static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD);
57 static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA *, STATEMGRSTATUS *);
58
59 static BOOL is_wow64;
60 static const BOOL is_64bit = sizeof(void *) > sizeof(int);
61
62 static const char *msifile = "msitest.msi";
63 static CHAR CURR_DIR[MAX_PATH];
64 static CHAR PROG_FILES_DIR[MAX_PATH];
65 static CHAR COMMON_FILES_DIR[MAX_PATH];
66 static CHAR APP_DATA_DIR[MAX_PATH];
67 static CHAR WINDOWS_DIR[MAX_PATH];
68
69 /* msi database data */
70
71 static const char component_dat[] =
72 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
73 "s72\tS38\ts72\ti2\tS255\tS72\n"
74 "Component\tComponent\n"
75 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
76 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
77 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n"
78 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
79 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
80 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
81 "component\t\tMSITESTDIR\t0\t1\tfile\n"
82 "service_comp\t{935A0A91-22A3-4F87-BCA8-928FFDFE2353}\tMSITESTDIR\t0\t\tservice_file\n"
83 "service_comp2\t{3F7B04A4-9521-4649-BDC9-0C8722740A49}\tMSITESTDIR\t0\t\tservice_file2\n"
84 "service_comp3\t{DBCD1502-20E3-423F-B53E-F37E263CDC7E}\tMSITESTDIR\t0\t\t\n";
85
86 static const char directory_dat[] =
87 "Directory\tDirectory_Parent\tDefaultDir\n"
88 "s72\tS72\tl255\n"
89 "Directory\tDirectory\n"
90 "CABOUTDIR\tMSITESTDIR\tcabout\n"
91 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
92 "FIRSTDIR\tMSITESTDIR\tfirst\n"
93 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
94 "NEWDIR\tCABOUTDIR\tnew\n"
95 "ProgramFilesFolder\tTARGETDIR\t.\n"
96 "TARGETDIR\t\tSourceDir";
97
98 static const char feature_dat[] =
99 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
100 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
101 "Feature\tFeature\n"
102 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
103 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
104 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
105 "Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
106 "Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
107 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n"
108 "service_feature\t\t\t\t2\t1\tTARGETDIR\t0";
109
110 static const char feature_comp_dat[] =
111 "Feature_\tComponent_\n"
112 "s38\ts72\n"
113 "FeatureComponents\tFeature_\tComponent_\n"
114 "Five\tFive\n"
115 "Four\tFour\n"
116 "One\tOne\n"
117 "Three\tThree\n"
118 "Two\tTwo\n"
119 "feature\tcomponent\n"
120 "service_feature\tservice_comp\n"
121 "service_feature\tservice_comp2\n"
122 "service_feature\tservice_comp3";
123
124 static const char file_dat[] =
125 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
126 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
127 "File\tFile\n"
128 "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
129 "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
130 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
131 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
132 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
133 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
134 "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t6\n"
135 "service_file2\tservice_comp2\tservice2.exe\t100\t\t\t8192\t7";
136
137 static const char install_exec_seq_dat[] =
138 "Action\tCondition\tSequence\n"
139 "s72\tS255\tI2\n"
140 "InstallExecuteSequence\tAction\n"
141 "AllocateRegistrySpace\tNOT Installed\t1550\n"
142 "CostFinalize\t\t1000\n"
143 "CostInitialize\t\t800\n"
144 "FileCost\t\t900\n"
145 "ResolveSource\t\t950\n"
146 "MoveFiles\t\t1700\n"
147 "InstallFiles\t\t4000\n"
148 "DuplicateFiles\t\t4500\n"
149 "WriteEnvironmentStrings\t\t4550\n"
150 "CreateShortcuts\t\t4600\n"
151 "InstallServices\t\t5000\n"
152 "InstallFinalize\t\t6600\n"
153 "InstallInitialize\t\t1500\n"
154 "InstallValidate\t\t1400\n"
155 "LaunchConditions\t\t100\n"
156 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000";
157
158 static const char media_dat[] =
159 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
160 "i2\ti4\tL64\tS255\tS32\tS72\n"
161 "Media\tDiskId\n"
162 "1\t3\t\t\tDISK1\t\n"
163 "2\t7\t\tmsitest.cab\tDISK2\t\n";
164
165 static const char property_dat[] =
166 "Property\tValue\n"
167 "s72\tl0\n"
168 "Property\tProperty\n"
169 "DefaultUIFont\tDlgFont8\n"
170 "HASUIRUN\t0\n"
171 "INSTALLLEVEL\t3\n"
172 "InstallMode\tTypical\n"
173 "Manufacturer\tWine\n"
174 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
175 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
176 "ProductID\tnone\n"
177 "ProductLanguage\t1033\n"
178 "ProductName\tMSITEST\n"
179 "ProductVersion\t1.1.1\n"
180 "PROMPTROLLBACKCOST\tP\n"
181 "Setup\tSetup\n"
182 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
183 "AdminProperties\tPOSTADMIN\n"
184 "ROOTDRIVE\tC:\\\n"
185 "SERVNAME\tTestService\n"
186 "SERVNAME2\tTestService2\n"
187 "SERVDISP\tTestServiceDisp\n"
188 "SERVDISP2\tTestServiceDisp2\n"
189 "MSIFASTINSTALL\t1\n"
190 "regdata15\t#x01\n";
191
192 static const char environment_dat[] =
193 "Environment\tName\tValue\tComponent_\n"
194 "s72\tl255\tL255\ts72\n"
195 "Environment\tEnvironment\n"
196 "Var1\t=-MSITESTVAR1\t1\tOne\n"
197 "Var2\tMSITESTVAR2\t1\tOne\n"
198 "Var3\t=-MSITESTVAR3\t1\tOne\n"
199 "Var4\tMSITESTVAR4\t1\tOne\n"
200 "Var5\t-MSITESTVAR5\t\tOne\n"
201 "Var6\tMSITESTVAR6\t\tOne\n"
202 "Var7\t!-MSITESTVAR7\t\tOne\n"
203 "Var8\t!-*MSITESTVAR8\t\tOne\n"
204 "Var9\t=-MSITESTVAR9\t\tOne\n"
205 "Var10\t=MSITESTVAR10\t\tOne\n"
206 "Var11\t+-MSITESTVAR11\t[~];1\tOne\n"
207 "Var12\t+-MSITESTVAR11\t[~];2\tOne\n"
208 "Var13\t+-MSITESTVAR12\t[~];1\tOne\n"
209 "Var14\t=MSITESTVAR13\t[~];1\tOne\n"
210 "Var15\t=MSITESTVAR13\t[~];2\tOne\n"
211 "Var16\t=MSITESTVAR14\t;1;\tOne\n"
212 "Var17\t=MSITESTVAR15\t;;1;;\tOne\n"
213 "Var18\t=MSITESTVAR16\t 1 \tOne\n"
214 "Var19\t+-MSITESTVAR17\t1\tOne\n"
215 "Var20\t+-MSITESTVAR17\t;;2;;[~]\tOne\n"
216 "Var21\t+-MSITESTVAR18\t1\tOne\n"
217 "Var22\t+-MSITESTVAR18\t[~];;2;;\tOne\n"
218 "Var23\t+-MSITESTVAR19\t1\tOne\n"
219 "Var24\t+-MSITESTVAR19\t[~]2\tOne\n"
220 "Var25\t+-MSITESTVAR20\t1\tOne\n"
221 "Var26\t+-MSITESTVAR20\t2[~]\tOne\n"
222 "Var27\t+-MSITESTVAR21\t[~];1\tOne\n";
223
224 static const char service_install_dat[] =
225 "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
226 "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
227 "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
228 "ServiceInstall\tServiceInstall\n"
229 "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService\t\t-a arg\tservice_comp\tdescription\n"
230 "TestService2\tSERVNAME2]\t[SERVDISP2]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService2\t\t-a arg\tservice_comp2\tdescription";
231
232 static const char service_install2_dat[] =
233 "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
234 "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
235 "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
236 "ServiceInstall\tServiceInstall\n"
237 "TestService\tTestService\tTestService\t2\t3\t32768\t\t\tTestService\t\t\tservice_comp\t\n"
238 "TestService4\tTestService4\tTestService4\t2\t3\t0\t\t\tTestService4\t\t\tservice_comp3\t\n";
239
240 static const char service_control_dat[] =
241 "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
242 "s72\tl255\ti2\tL255\tI2\ts72\n"
243 "ServiceControl\tServiceControl\n"
244 "ServiceControl\tTestService3\t8\t\t0\tservice_comp\n"
245 "ServiceControl2\tTestService3\t128\t\t0\tservice_comp2";
246
247 static const char sss_service_control_dat[] =
248 "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
249 "s72\tl255\ti2\tL255\tI2\ts72\n"
250 "ServiceControl\tServiceControl\n"
251 "ServiceControl\tSpooler\t1\t\t1\tservice_comp\n"
252 "ServiceControl2\tSpooler\t2\t\t1\tservice_comp\n"
253 "ServiceControl3\tSpooler\t16\t\t1\tservice_comp\n"
254 "ServiceControl4\tSpooler\t32\t\t1\tservice_comp\n";
255
256 static const char sss_install_exec_seq_dat[] =
257 "Action\tCondition\tSequence\n"
258 "s72\tS255\tI2\n"
259 "InstallExecuteSequence\tAction\n"
260 "LaunchConditions\t\t100\n"
261 "CostInitialize\t\t800\n"
262 "FileCost\t\t900\n"
263 "ResolveSource\t\t950\n"
264 "CostFinalize\t\t1000\n"
265 "InstallValidate\t\t1400\n"
266 "InstallInitialize\t\t1500\n"
267 "StopServices\t\t4000\n"
268 "DeleteServices\t\t5000\n"
269 "MoveFiles\t\t5100\n"
270 "InstallFiles\t\t5200\n"
271 "DuplicateFiles\t\t5300\n"
272 "StartServices\t\t5400\n"
273 "RegisterProduct\t\t5500\n"
274 "PublishFeatures\t\t5600\n"
275 "PublishProduct\t\t5700\n"
276 "InstallFinalize\t\t6000\n";
277
278 static const char sds_install_exec_seq_dat[] =
279 "Action\tCondition\tSequence\n"
280 "s72\tS255\tI2\n"
281 "InstallExecuteSequence\tAction\n"
282 "LaunchConditions\t\t100\n"
283 "CostInitialize\t\t800\n"
284 "FileCost\t\t900\n"
285 "ResolveSource\t\t950\n"
286 "CostFinalize\t\t1000\n"
287 "InstallValidate\t\t1400\n"
288 "InstallInitialize\t\t1500\n"
289 "StopServices\t\t5000\n"
290 "DeleteServices\t\t5050\n"
291 "MoveFiles\t\t5100\n"
292 "InstallFiles\t\t5200\n"
293 "DuplicateFiles\t\t5300\n"
294 "InstallServices\t\t5400\n"
295 "StartServices\t\t5450\n"
296 "RegisterProduct\t\t5500\n"
297 "PublishFeatures\t\t5600\n"
298 "PublishProduct\t\t5700\n"
299 "InstallFinalize\t\t6000\n";
300
301 static const char rof_component_dat[] =
302 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
303 "s72\tS38\ts72\ti2\tS255\tS72\n"
304 "Component\tComponent\n"
305 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n";
306
307 static const char rof_feature_dat[] =
308 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
309 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
310 "Feature\tFeature\n"
311 "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
312 "montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0";
313
314 static const char rof_feature_comp_dat[] =
315 "Feature_\tComponent_\n"
316 "s38\ts72\n"
317 "FeatureComponents\tFeature_\tComponent_\n"
318 "feature\tmaximus\n"
319 "montecristo\tmaximus";
320
321 static const char rof_file_dat[] =
322 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
323 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
324 "File\tFile\n"
325 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1";
326
327 static const char rof_media_dat[] =
328 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
329 "i2\ti4\tL64\tS255\tS32\tS72\n"
330 "Media\tDiskId\n"
331 "1\t1\t\t\tDISK1\t\n";
332
333 static const char ci2_feature_comp_dat[] =
334 "Feature_\tComponent_\n"
335 "s38\ts72\n"
336 "FeatureComponents\tFeature_\tComponent_\n"
337 "feature\taugustus";
338
339 static const char ci2_file_dat[] =
340 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
341 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
342 "File\tFile\n"
343 "augustus\taugustus\taugustus\t500\t\t\t8192\t1";
344
345 static const char pp_install_exec_seq_dat[] =
346 "Action\tCondition\tSequence\n"
347 "s72\tS255\tI2\n"
348 "InstallExecuteSequence\tAction\n"
349 "ValidateProductID\t\t700\n"
350 "CostInitialize\t\t800\n"
351 "FileCost\t\t900\n"
352 "CostFinalize\t\t1000\n"
353 "InstallValidate\t\t1400\n"
354 "InstallInitialize\t\t1500\n"
355 "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
356 "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
357 "RemoveFiles\t\t3500\n"
358 "InstallFiles\t\t4000\n"
359 "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
360 "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
361 "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n"
362 "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
363 "InstallFinalize\t\t6600";
364
365 static const char pp_component_dat[] =
366 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
367 "s72\tS38\ts72\ti2\tS255\tS72\n"
368 "Component\tComponent\n"
369 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\t\tmaximus\n";
370
371 static const char ppc_component_dat[] =
372 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
373 "s72\tS38\ts72\ti2\tS255\tS72\n"
374 "Component\tComponent\n"
375 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\t\tmaximus\n"
376 "augustus\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\taugustus\n";
377
378 static const char ppc_file_dat[] =
379 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
380 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
381 "File\tFile\n"
382 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1\n"
383 "augustus\taugustus\taugustus\t500\t\t\t8192\t2";
384
385 static const char ppc_media_dat[] =
386 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
387 "i2\ti4\tL64\tS255\tS32\tS72\n"
388 "Media\tDiskId\n"
389 "1\t2\t\t\tDISK1\t\n";
390
391 static const char ppc_feature_comp_dat[] =
392 "Feature_\tComponent_\n"
393 "s38\ts72\n"
394 "FeatureComponents\tFeature_\tComponent_\n"
395 "feature\tmaximus\n"
396 "feature\taugustus\n"
397 "montecristo\tmaximus";
398
399 static const char cwd_component_dat[] =
400 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
401 "s72\tS38\ts72\ti2\tS255\tS72\n"
402 "Component\tComponent\n"
403 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
404
405 static const char rem_component_dat[] =
406 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
407 "s72\tS38\ts72\ti2\tS255\tS72\n"
408 "Component\tComponent\n"
409 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t0\t\thydrogen\n"
410 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\thelium\n"
411 "lithium\t\tMSITESTDIR\t2\t\tlithium\n";
412
413 static const char rem_feature_comp_dat[] =
414 "Feature_\tComponent_\n"
415 "s38\ts72\n"
416 "FeatureComponents\tFeature_\tComponent_\n"
417 "feature\thydrogen\n"
418 "feature\thelium\n"
419 "feature\tlithium";
420
421 static const char rem_file_dat[] =
422 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
423 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
424 "File\tFile\n"
425 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
426 "helium\thelium\thelium\t0\t\t\t8192\t1\n"
427 "lithium\tlithium\tlithium\t0\t\t\t8192\t1";
428
429 static const char rem_install_exec_seq_dat[] =
430 "Action\tCondition\tSequence\n"
431 "s72\tS255\tI2\n"
432 "InstallExecuteSequence\tAction\n"
433 "ValidateProductID\t\t700\n"
434 "CostInitialize\t\t800\n"
435 "FileCost\t\t900\n"
436 "CostFinalize\t\t1000\n"
437 "InstallValidate\t\t1400\n"
438 "InstallInitialize\t\t1500\n"
439 "ProcessComponents\t\t1600\n"
440 "UnpublishFeatures\t\t1800\n"
441 "RemoveFiles\t\t3500\n"
442 "InstallFiles\t\t4000\n"
443 "RegisterProduct\t\t6100\n"
444 "PublishFeatures\t\t6300\n"
445 "PublishProduct\t\t6400\n"
446 "InstallFinalize\t\t6600";
447
448 static const char rem_remove_files_dat[] =
449 "FileKey\tComponent_\tFileName\tDirProperty\tInstallMode\n"
450 "s72\ts72\tS255\ts72\tI2\n"
451 "RemoveFile\tFileKey\n"
452 "furlong\thydrogen\tfurlong\tMSITESTDIR\t1\n"
453 "firkin\thelium\tfirkin\tMSITESTDIR\t1\n"
454 "fortnight\tlithium\tfortnight\tMSITESTDIR\t1\n"
455 "becquerel\thydrogen\tbecquerel\tMSITESTDIR\t2\n"
456 "dioptre\thelium\tdioptre\tMSITESTDIR\t2\n"
457 "attoparsec\tlithium\tattoparsec\tMSITESTDIR\t2\n"
458 "storeys\thydrogen\tstoreys\tMSITESTDIR\t3\n"
459 "block\thelium\tblock\tMSITESTDIR\t3\n"
460 "siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n"
461 "nanoacre\thydrogen\t\tCABOUTDIR\t3\n";
462
463 static const char mov_move_file_dat[] =
464 "FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n"
465 "s72\ts72\tS255\tS255\tS72\ts72\ti2\n"
466 "MoveFile\tFileKey\n"
467 "abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n"
468 "bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n"
469 "cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n"
470 "denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n"
471 "ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n"
472 "fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n"
473 "gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n"
474 "haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n"
475 "iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n"
476 "jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n"
477 "kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n"
478 "laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n"
479 "namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n"
480 "pakistan\taugustus\tperu\tsfn|poland\tSourceDir\tMSITESTDIR\t1\n"
481 "wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n"
482 "single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n"
483 "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
484 "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
485
486 static const char df_directory_dat[] =
487 "Directory\tDirectory_Parent\tDefaultDir\n"
488 "s72\tS72\tl255\n"
489 "Directory\tDirectory\n"
490 "THIS\tMSITESTDIR\tthis\n"
491 "DOESNOT\tTHIS\tdoesnot\n"
492 "NONEXISTENT\tDOESNOT\texist\n"
493 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
494 "ProgramFilesFolder\tTARGETDIR\t.\n"
495 "TARGETDIR\t\tSourceDir";
496
497 static const char df_duplicate_file_dat[] =
498 "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
499 "s72\ts72\ts72\tS255\tS72\n"
500 "DuplicateFile\tFileKey\n"
501 "maximus\tmaximus\tmaximus\taugustus\t\n"
502 "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n"
503 "augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n";
504
505 static const char wrv_component_dat[] =
506 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
507 "s72\tS38\ts72\ti2\tS255\tS72\n"
508 "Component\tComponent\n"
509 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
510
511 static const char wrv_registry_dat[] =
512 "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
513 "s72\ti2\tl255\tL255\tL0\ts72\n"
514 "Registry\tRegistry\n"
515 "regdata\t2\tSOFTWARE\\Wine\\msitest\tValue\t[~]one[~]two[~]three\taugustus\n"
516 "regdata1\t2\tSOFTWARE\\Wine\\msitest\t*\t\taugustus\n"
517 "regdata2\t2\tSOFTWARE\\Wine\\msitest\t*\t#%\taugustus\n"
518 "regdata3\t2\tSOFTWARE\\Wine\\msitest\t*\t#x\taugustus\n"
519 "regdata4\t2\tSOFTWARE\\Wine\\msitest\\VisualStudio\\10.0\\AD7Metrics\\Exception\\{049EC4CC-30D2-4032-9256-EE18EB41B62B}\\Common Language Runtime Exceptions\\System.Workflow.ComponentModel.Serialization\\System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationException\tlong\tkey\taugustus\n"
520 "regdata5\t2\tSOFTWARE\\Wine\\msitest\tValue1\t[~]one[~]\taugustus\n"
521 "regdata6\t2\tSOFTWARE\\Wine\\msitest\tValue2\t[~]two\taugustus\n"
522 "regdata7\t2\tSOFTWARE\\Wine\\msitest\tValue3\tone[~]\taugustus\n"
523 "regdata8\t2\tSOFTWARE\\Wine\\msitest\tValue4\tone[~]two\taugustus\n"
524 "regdata9\t2\tSOFTWARE\\Wine\\msitest\tValue5\t[~]one[~]two[~]three\taugustus\n"
525 "regdata10\t2\tSOFTWARE\\Wine\\msitest\tValue6\t[~]\taugustus\n"
526 "regdata11\t2\tSOFTWARE\\Wine\\msitest\tValue7\t[~]two\taugustus\n"
527 "regdata12\t2\tSOFTWARE\\Wine\\msitest\tValue8\t#1\taugustus\n"
528 "regdata13\t2\tSOFTWARE\\Wine\\msitest\tValue9\t#x1\taugustus\n"
529 "regdata14\t2\tSOFTWARE\\Wine\\msitest\tValue10\t#x01\taugustus\n"
530 "regdata15\t2\tSOFTWARE\\Wine\\msitest\tValue11\t[regdata15]\taugustus\n";
531
532 static const char cf_directory_dat[] =
533 "Directory\tDirectory_Parent\tDefaultDir\n"
534 "s72\tS72\tl255\n"
535 "Directory\tDirectory\n"
536 "FIRSTDIR\tMSITESTDIR\tfirst\n"
537 "SECONDDIR\tMSITESTDIR\tsecond\n"
538 "THIRDDIR\tMSITESTDIR\tthird\n"
539 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
540 "ProgramFilesFolder\tTARGETDIR\t.\n"
541 "TARGETDIR\t\tSourceDir";
542
543 static const char cf_component_dat[] =
544 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
545 "s72\tS38\ts72\ti2\tS255\tS72\n"
546 "Component\tComponent\n"
547 "One\t{F8CD42AC-9C38-48FE-8664-B35FD121012A}\tFIRSTDIR\t0\t\tone.txt\n"
548 "Two\t{DE2DB02E-2DDF-4E34-8CF6-DCA13E29DF52}\tSECONDDIR\t0\t\ttwo.txt\n";
549
550 static const char cf_feature_dat[] =
551 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
552 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
553 "Feature\tFeature\n"
554 "One\t\tOne\tThe One Feature\t1\t3\tFIRSTDIR\t0\n"
555 "Two\t\tTwo\tThe Two Feature\t1\t3\tSECONDDIR\t0\n";
556
557 static const char cf_feature_comp_dat[] =
558 "Feature_\tComponent_\n"
559 "s38\ts72\n"
560 "FeatureComponents\tFeature_\tComponent_\n"
561 "One\tOne\n"
562 "Two\tTwo\n";
563
564 static const char cf_file_dat[] =
565 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
566 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
567 "File\tFile\n"
568 "one.txt\tOne\tone.txt\t0\t\t\t0\t1\n"
569 "two.txt\tTwo\ttwo.txt\t0\t\t\t0\t2\n";
570
571 static const char cf_create_folders_dat[] =
572 "Directory_\tComponent_\n"
573 "s72\ts72\n"
574 "CreateFolder\tDirectory_\tComponent_\n"
575 "FIRSTDIR\tOne\n"
576 "SECONDDIR\tTwo\n"
577 "THIRDDIR\tTwo\n";
578
579 static const char cf_install_exec_seq_dat[] =
580 "Action\tCondition\tSequence\n"
581 "s72\tS255\tI2\n"
582 "InstallExecuteSequence\tAction\n"
583 "CostFinalize\t\t1000\n"
584 "ValidateProductID\t\t700\n"
585 "CostInitialize\t\t800\n"
586 "FileCost\t\t900\n"
587 "RemoveFiles\t\t3500\n"
588 "CreateFolders\t\t3700\n"
589 "RemoveFolders\t\t3800\n"
590 "InstallFiles\t\t4000\n"
591 "RegisterUser\t\t6000\n"
592 "RegisterProduct\t\t6100\n"
593 "PublishFeatures\t\t6300\n"
594 "PublishProduct\t\t6400\n"
595 "InstallFinalize\t\t6600\n"
596 "InstallInitialize\t\t1500\n"
597 "ProcessComponents\t\t1600\n"
598 "UnpublishFeatures\t\t1800\n"
599 "InstallValidate\t\t1400\n"
600 "LaunchConditions\t\t100\n";
601
602 static const char sr_selfreg_dat[] =
603 "File_\tCost\n"
604 "s72\tI2\n"
605 "SelfReg\tFile_\n"
606 "one.txt\t1\n";
607
608 static const char sr_install_exec_seq_dat[] =
609 "Action\tCondition\tSequence\n"
610 "s72\tS255\tI2\n"
611 "InstallExecuteSequence\tAction\n"
612 "CostFinalize\t\t1000\n"
613 "CostInitialize\t\t800\n"
614 "FileCost\t\t900\n"
615 "ResolveSource\t\t950\n"
616 "MoveFiles\t\t1700\n"
617 "SelfUnregModules\t\t3900\n"
618 "InstallFiles\t\t4000\n"
619 "DuplicateFiles\t\t4500\n"
620 "WriteEnvironmentStrings\t\t4550\n"
621 "CreateShortcuts\t\t4600\n"
622 "InstallFinalize\t\t6600\n"
623 "InstallInitialize\t\t1500\n"
624 "InstallValidate\t\t1400\n"
625 "LaunchConditions\t\t100\n";
626
627 static const char font_media_dat[] =
628 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
629 "i2\ti4\tL64\tS255\tS32\tS72\n"
630 "Media\tDiskId\n"
631 "1\t3\t\t\tDISK1\t\n";
632
633 static const char font_file_dat[] =
634 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
635 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
636 "File\tFile\n"
637 "font.ttf\tfonts\tfont.ttf\t1000\t\t\t8192\t1\n";
638
639 static const char font_feature_dat[] =
640 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
641 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
642 "Feature\tFeature\n"
643 "fonts\t\t\tfont feature\t1\t2\tMSITESTDIR\t0\n";
644
645 static const char font_component_dat[] =
646 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
647 "s72\tS38\ts72\ti2\tS255\tS72\n"
648 "Component\tComponent\n"
649 "fonts\t{F5920ED0-1183-4B8F-9330-86CE56557C05}\tMSITESTDIR\t0\t\tfont.ttf\n";
650
651 static const char font_feature_comp_dat[] =
652 "Feature_\tComponent_\n"
653 "s38\ts72\n"
654 "FeatureComponents\tFeature_\tComponent_\n"
655 "fonts\tfonts\n";
656
657 static const char font_dat[] =
658 "File_\tFontTitle\n"
659 "s72\tS128\n"
660 "Font\tFile_\n"
661 "font.ttf\tmsi test font\n";
662
663 static const char font_install_exec_seq_dat[] =
664 "Action\tCondition\tSequence\n"
665 "s72\tS255\tI2\n"
666 "InstallExecuteSequence\tAction\n"
667 "ValidateProductID\t\t700\n"
668 "CostInitialize\t\t800\n"
669 "FileCost\t\t900\n"
670 "CostFinalize\t\t1000\n"
671 "InstallValidate\t\t1400\n"
672 "InstallInitialize\t\t1500\n"
673 "ProcessComponents\t\t1600\n"
674 "UnpublishFeatures\t\t1800\n"
675 "RemoveFiles\t\t3500\n"
676 "InstallFiles\t\t4000\n"
677 "RegisterFonts\t\t4100\n"
678 "UnregisterFonts\t\t4200\n"
679 "RegisterUser\t\t6000\n"
680 "RegisterProduct\t\t6100\n"
681 "PublishFeatures\t\t6300\n"
682 "PublishProduct\t\t6400\n"
683 "InstallFinalize\t\t6600";
684
685 static const char vp_property_dat[] =
686 "Property\tValue\n"
687 "s72\tl0\n"
688 "Property\tProperty\n"
689 "HASUIRUN\t0\n"
690 "INSTALLLEVEL\t3\n"
691 "InstallMode\tTypical\n"
692 "Manufacturer\tWine\n"
693 "PIDTemplate\t###-#######\n"
694 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
695 "ProductLanguage\t1033\n"
696 "ProductName\tMSITEST\n"
697 "ProductVersion\t1.1.1\n"
698 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
699 "MSIFASTINSTALL\t1\n";
700
701 static const char vp_custom_action_dat[] =
702 "Action\tType\tSource\tTarget\tISComments\n"
703 "s72\ti2\tS64\tS0\tS255\n"
704 "CustomAction\tAction\n"
705 "SetProductID1\t51\tProductID\t1\t\n"
706 "SetProductID2\t51\tProductID\t2\t\n"
707 "TestProductID1\t19\t\t\tHalts installation\n"
708 "TestProductID2\t19\t\t\tHalts installation\n";
709
710 static const char vp_install_exec_seq_dat[] =
711 "Action\tCondition\tSequence\n"
712 "s72\tS255\tI2\n"
713 "InstallExecuteSequence\tAction\n"
714 "LaunchConditions\t\t100\n"
715 "CostInitialize\t\t800\n"
716 "FileCost\t\t900\n"
717 "CostFinalize\t\t1000\n"
718 "InstallValidate\t\t1400\n"
719 "InstallInitialize\t\t1500\n"
720 "SetProductID1\tSET_PRODUCT_ID=1\t3000\n"
721 "SetProductID2\tSET_PRODUCT_ID=2\t3100\n"
722 "ValidateProductID\t\t3200\n"
723 "InstallExecute\t\t3300\n"
724 "TestProductID1\tProductID=1\t3400\n"
725 "TestProductID2\tProductID=\"123-1234567\"\t3500\n"
726 "InstallFiles\t\t4000\n"
727 "InstallFinalize\t\t6000\n";
728
729 static const char odbc_file_dat[] =
730 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
731 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
732 "File\tFile\n"
733 "ODBCdriver.dll\todbc\tODBCdriver.dll\t1000\t\t\t8192\t1\n"
734 "ODBCdriver2.dll\todbc\tODBCdriver2.dll\t1000\t\t\t8192\t2\n"
735 "ODBCtranslator.dll\todbc\tODBCtranslator.dll\t1000\t\t\t8192\t3\n"
736 "ODBCtranslator2.dll\todbc\tODBCtranslator2.dll\t1000\t\t\t8192\t4\n"
737 "ODBCsetup.dll\todbc\tODBCsetup.dll\t1000\t\t\t8192\t5\n";
738
739 static const char odbc_feature_dat[] =
740 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
741 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
742 "Feature\tFeature\n"
743 "odbc\t\t\todbc feature\t1\t2\tMSITESTDIR\t0\n";
744
745 static const char odbc_feature_comp_dat[] =
746 "Feature_\tComponent_\n"
747 "s38\ts72\n"
748 "FeatureComponents\tFeature_\tComponent_\n"
749 "odbc\todbc\n";
750
751 static const char odbc_component_dat[] =
752 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
753 "s72\tS38\ts72\ti2\tS255\tS72\n"
754 "Component\tComponent\n"
755 "odbc\t{B6F3E4AE-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t0\t\tODBCdriver.dll\n";
756
757 static const char odbc_driver_dat[] =
758 "Driver\tComponent_\tDescription\tFile_\tFile_Setup\n"
759 "s72\ts72\ts255\ts72\tS72\n"
760 "ODBCDriver\tDriver\n"
761 "ODBC test driver\todbc\tODBC test driver\tODBCdriver.dll\t\n"
762 "ODBC test driver2\todbc\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n";
763
764 static const char odbc_translator_dat[] =
765 "Translator\tComponent_\tDescription\tFile_\tFile_Setup\n"
766 "s72\ts72\ts255\ts72\tS72\n"
767 "ODBCTranslator\tTranslator\n"
768 "ODBC test translator\todbc\tODBC test translator\tODBCtranslator.dll\t\n"
769 "ODBC test translator2\todbc\tODBC test translator2\tODBCtranslator2.dll\tODBCsetup.dll\n";
770
771 static const char odbc_datasource_dat[] =
772 "DataSource\tComponent_\tDescription\tDriverDescription\tRegistration\n"
773 "s72\ts72\ts255\ts255\ti2\n"
774 "ODBCDataSource\tDataSource\n"
775 "ODBC data source\todbc\tODBC data source\tODBC driver\t0\n";
776
777 static const char odbc_install_exec_seq_dat[] =
778 "Action\tCondition\tSequence\n"
779 "s72\tS255\tI2\n"
780 "InstallExecuteSequence\tAction\n"
781 "LaunchConditions\t\t100\n"
782 "CostInitialize\t\t800\n"
783 "FileCost\t\t900\n"
784 "CostFinalize\t\t1000\n"
785 "InstallValidate\t\t1400\n"
786 "InstallInitialize\t\t1500\n"
787 "ProcessComponents\t\t1600\n"
788 "InstallODBC\t\t3000\n"
789 "RemoveODBC\t\t3100\n"
790 "RemoveFiles\t\t3900\n"
791 "InstallFiles\t\t4000\n"
792 "RegisterProduct\t\t5000\n"
793 "PublishFeatures\t\t5100\n"
794 "PublishProduct\t\t5200\n"
795 "InstallFinalize\t\t6000\n";
796
797 static const char odbc_media_dat[] =
798 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
799 "i2\ti4\tL64\tS255\tS32\tS72\n"
800 "Media\tDiskId\n"
801 "1\t5\t\t\tDISK1\t\n";
802
803 static const char tl_file_dat[] =
804 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
805 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
806 "File\tFile\n"
807 "typelib.dll\ttypelib\ttypelib.dll\t1000\t\t\t8192\t1\n";
808
809 static const char tl_feature_dat[] =
810 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
811 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
812 "Feature\tFeature\n"
813 "typelib\t\t\ttypelib feature\t1\t2\tMSITESTDIR\t0\n";
814
815 static const char tl_feature_comp_dat[] =
816 "Feature_\tComponent_\n"
817 "s38\ts72\n"
818 "FeatureComponents\tFeature_\tComponent_\n"
819 "typelib\ttypelib\n";
820
821 static const char tl_component_dat[] =
822 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
823 "s72\tS38\ts72\ti2\tS255\tS72\n"
824 "Component\tComponent\n"
825 "typelib\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\ttypelib.dll\n";
826
827 static const char tl_typelib_dat[] =
828 "LibID\tLanguage\tComponent_\tVersion\tDescription\tDirectory_\tFeature_\tCost\n"
829 "s38\ti2\ts72\tI4\tL128\tS72\ts38\tI4\n"
830 "TypeLib\tLibID\tLanguage\tComponent_\n"
831 "{EAC5166A-9734-4D91-878F-1DD02304C66C}\t0\ttypelib\t1793\t\tMSITESTDIR\ttypelib\t\n";
832
833 static const char tl_install_exec_seq_dat[] =
834 "Action\tCondition\tSequence\n"
835 "s72\tS255\tI2\n"
836 "InstallExecuteSequence\tAction\n"
837 "LaunchConditions\t\t100\n"
838 "CostInitialize\t\t800\n"
839 "FileCost\t\t900\n"
840 "CostFinalize\t\t1000\n"
841 "InstallValidate\t\t1400\n"
842 "InstallInitialize\t\t1500\n"
843 "ProcessComponents\t\t1600\n"
844 "RemoveFiles\t\t1700\n"
845 "InstallFiles\t\t2000\n"
846 "RegisterTypeLibraries\tREGISTER_TYPELIB=1\t3000\n"
847 "UnregisterTypeLibraries\t\t3100\n"
848 "RegisterProduct\t\t5100\n"
849 "PublishFeatures\t\t5200\n"
850 "PublishProduct\t\t5300\n"
851 "InstallFinalize\t\t6000\n";
852
853 static const char crs_file_dat[] =
854 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
855 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
856 "File\tFile\n"
857 "target.txt\tshortcut\ttarget.txt\t1000\t\t\t8192\t1\n";
858
859 static const char crs_feature_dat[] =
860 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
861 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
862 "Feature\tFeature\n"
863 "shortcut\t\t\tshortcut feature\t1\t2\tMSITESTDIR\t0\n";
864
865 static const char crs_feature_comp_dat[] =
866 "Feature_\tComponent_\n"
867 "s38\ts72\n"
868 "FeatureComponents\tFeature_\tComponent_\n"
869 "shortcut\tshortcut\n";
870
871 static const char crs_component_dat[] =
872 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
873 "s72\tS38\ts72\ti2\tS255\tS72\n"
874 "Component\tComponent\n"
875 "shortcut\t{5D20E3C6-7206-498F-AC28-87AF2F9AD4CC}\tMSITESTDIR\t0\t\ttarget.txt\n";
876
877 static const char crs_shortcut_dat[] =
878 "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
879 "s72\ts72\tl128\ts72\ts72\tL255\tL255\tI2\tS72\tI2\tI2\tS72\n"
880 "Shortcut\tShortcut\n"
881 "shortcut\tMSITESTDIR\tshortcut\tshortcut\t[MSITESTDIR]target.txt\t\t\t\t\t\t\t\n";
882
883 static const char crs_install_exec_seq_dat[] =
884 "Action\tCondition\tSequence\n"
885 "s72\tS255\tI2\n"
886 "InstallExecuteSequence\tAction\n"
887 "LaunchConditions\t\t100\n"
888 "CostInitialize\t\t800\n"
889 "FileCost\t\t900\n"
890 "CostFinalize\t\t1000\n"
891 "InstallValidate\t\t1400\n"
892 "InstallInitialize\t\t1500\n"
893 "ProcessComponents\t\t1600\n"
894 "RemoveFiles\t\t1700\n"
895 "InstallFiles\t\t2000\n"
896 "RemoveShortcuts\t\t3000\n"
897 "CreateShortcuts\t\t3100\n"
898 "RegisterProduct\t\t5000\n"
899 "PublishFeatures\t\t5100\n"
900 "PublishProduct\t\t5200\n"
901 "InstallFinalize\t\t6000\n";
902
903 static const char pub_file_dat[] =
904 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
905 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
906 "File\tFile\n"
907 "english.txt\tpublish\tenglish.txt\t1000\t\t\t8192\t1\n";
908
909 static const char pub_feature_dat[] =
910 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
911 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
912 "Feature\tFeature\n"
913 "publish\t\t\tpublish feature\t1\t2\tMSITESTDIR\t0\n";
914
915 static const char pub_feature_comp_dat[] =
916 "Feature_\tComponent_\n"
917 "s38\ts72\n"
918 "FeatureComponents\tFeature_\tComponent_\n"
919 "publish\tpublish\n";
920
921 static const char pub_component_dat[] =
922 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
923 "s72\tS38\ts72\ti2\tS255\tS72\n"
924 "Component\tComponent\n"
925 "publish\t{B4EA0ACF-6238-426E-9C6D-7869F0F9C768}\tMSITESTDIR\t0\t\tenglish.txt\n";
926
927 static const char pub_publish_component_dat[] =
928 "ComponentId\tQualifier\tComponent_\tAppData\tFeature_\n"
929 "s38\ts255\ts72\tL255\ts38\n"
930 "PublishComponent\tComponentId\tQualifier\tComponent_\n"
931 "{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}\tenglish.txt\tpublish\t\tpublish\n";
932
933 static const char pub_install_exec_seq_dat[] =
934 "Action\tCondition\tSequence\n"
935 "s72\tS255\tI2\n"
936 "InstallExecuteSequence\tAction\n"
937 "LaunchConditions\t\t100\n"
938 "CostInitialize\t\t800\n"
939 "FileCost\t\t900\n"
940 "CostFinalize\t\t1000\n"
941 "InstallValidate\t\t1400\n"
942 "InstallInitialize\t\t1500\n"
943 "ProcessComponents\t\t1600\n"
944 "RemoveFiles\t\t1700\n"
945 "InstallFiles\t\t2000\n"
946 "PublishComponents\t\t3000\n"
947 "UnpublishComponents\t\t3100\n"
948 "RegisterProduct\t\t5000\n"
949 "PublishFeatures\t\t5100\n"
950 "PublishProduct\t\t5200\n"
951 "InstallFinalize\t\t6000\n";
952
953 static const char rd_file_dat[] =
954 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
955 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
956 "File\tFile\n"
957 "original.txt\tduplicate\toriginal.txt\t1000\t\t\t8192\t1\n"
958 "original2.txt\tduplicate\toriginal2.txt\t1000\t\t\t8192\t2\n"
959 "original3.txt\tduplicate2\toriginal3.txt\t1000\t\t\t8192\t3\n";
960
961 static const char rd_feature_dat[] =
962 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
963 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
964 "Feature\tFeature\n"
965 "duplicate\t\t\tduplicate feature\t1\t2\tMSITESTDIR\t0\n";
966
967 static const char rd_feature_comp_dat[] =
968 "Feature_\tComponent_\n"
969 "s38\ts72\n"
970 "FeatureComponents\tFeature_\tComponent_\n"
971 "duplicate\tduplicate\n";
972
973 static const char rd_component_dat[] =
974 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
975 "s72\tS38\ts72\ti2\tS255\tS72\n"
976 "Component\tComponent\n"
977 "duplicate\t{EB45D06A-ADFE-44E3-8D41-B7DE150E41AD}\tMSITESTDIR\t0\t\toriginal.txt\n"
978 "duplicate2\t{B8BA60E0-B2E9-488E-9D0E-E60F25F04F97}\tMSITESTDIR\t0\tDUPLICATE2=1\toriginal3.txt\n";
979
980 static const char rd_duplicate_file_dat[] =
981 "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
982 "s72\ts72\ts72\tS255\tS72\n"
983 "DuplicateFile\tFileKey\n"
984 "duplicate\tduplicate\toriginal.txt\tduplicate.txt\t\n"
985 "duplicate2\tduplicate\toriginal2.txt\t\tMSITESTDIR\n"
986 "duplicate3\tduplicate2\toriginal3.txt\tduplicate2.txt\t\n";
987
988 static const char rd_install_exec_seq_dat[] =
989 "Action\tCondition\tSequence\n"
990 "s72\tS255\tI2\n"
991 "InstallExecuteSequence\tAction\n"
992 "LaunchConditions\t\t100\n"
993 "CostInitialize\t\t800\n"
994 "FileCost\t\t900\n"
995 "CostFinalize\t\t1000\n"
996 "InstallValidate\t\t1400\n"
997 "InstallInitialize\t\t1500\n"
998 "ProcessComponents\t\t1600\n"
999 "RemoveDuplicateFiles\t\t1900\n"
1000 "InstallFiles\t\t2000\n"
1001 "DuplicateFiles\t\t2100\n"
1002 "RegisterProduct\t\t5000\n"
1003 "PublishFeatures\t\t5100\n"
1004 "PublishProduct\t\t5200\n"
1005 "InstallFinalize\t\t6000\n";
1006
1007 static const char rrv_file_dat[] =
1008 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1009 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1010 "File\tFile\n"
1011 "registry.txt\tregistry\tregistry.txt\t1000\t\t\t8192\t1\n";
1012
1013 static const char rrv_feature_dat[] =
1014 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1015 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1016 "Feature\tFeature\n"
1017 "registry\t\t\tregistry feature\t1\t2\tMSITESTDIR\t0\n";
1018
1019 static const char rrv_feature_comp_dat[] =
1020 "Feature_\tComponent_\n"
1021 "s38\ts72\n"
1022 "FeatureComponents\tFeature_\tComponent_\n"
1023 "registry\tregistry\n";
1024
1025 static const char rrv_component_dat[] =
1026 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1027 "s72\tS38\ts72\ti2\tS255\tS72\n"
1028 "Component\tComponent\n"
1029 "registry\t{DA97585B-962D-45EB-AD32-DA15E60CA9EE}\tMSITESTDIR\t0\t\tregistry.txt\n";
1030
1031 static const char rrv_registry_dat[] =
1032 "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
1033 "s72\ti2\tl255\tL255\tL0\ts72\n"
1034 "Registry\tRegistry\n"
1035 "reg1\t2\tSOFTWARE\\Wine\\keyA\t\tA\tregistry\n"
1036 "reg2\t2\tSOFTWARE\\Wine\\keyA\tvalueA\tA\tregistry\n"
1037 "reg3\t2\tSOFTWARE\\Wine\\key1\t-\t\tregistry\n";
1038
1039 static const char rrv_remove_registry_dat[] =
1040 "RemoveRegistry\tRoot\tKey\tName\tComponent_\n"
1041 "s72\ti2\tl255\tL255\ts72\n"
1042 "RemoveRegistry\tRemoveRegistry\n"
1043 "reg1\t2\tSOFTWARE\\Wine\\keyB\t\tregistry\n"
1044 "reg2\t2\tSOFTWARE\\Wine\\keyB\tValueB\tregistry\n"
1045 "reg3\t2\tSOFTWARE\\Wine\\key2\t-\tregistry\n";
1046
1047 static const char rrv_install_exec_seq_dat[] =
1048 "Action\tCondition\tSequence\n"
1049 "s72\tS255\tI2\n"
1050 "InstallExecuteSequence\tAction\n"
1051 "LaunchConditions\t\t100\n"
1052 "CostInitialize\t\t800\n"
1053 "FileCost\t\t900\n"
1054 "CostFinalize\t\t1000\n"
1055 "InstallValidate\t\t1400\n"
1056 "InstallInitialize\t\t1500\n"
1057 "ProcessComponents\t\t1600\n"
1058 "RemoveFiles\t\t1700\n"
1059 "InstallFiles\t\t2000\n"
1060 "RemoveRegistryValues\t\t3000\n"
1061 "RegisterProduct\t\t5000\n"
1062 "PublishFeatures\t\t5100\n"
1063 "PublishProduct\t\t5200\n"
1064 "InstallFinalize\t\t6000\n";
1065
1066 static const char frp_file_dat[] =
1067 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1068 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1069 "File\tFile\n"
1070 "product.txt\tproduct\tproduct.txt\t1000\t\t\t8192\t1\n";
1071
1072 static const char frp_feature_dat[] =
1073 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1074 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1075 "Feature\tFeature\n"
1076 "product\t\t\tproduct feature\t1\t2\tMSITESTDIR\t0\n";
1077
1078 static const char frp_feature_comp_dat[] =
1079 "Feature_\tComponent_\n"
1080 "s38\ts72\n"
1081 "FeatureComponents\tFeature_\tComponent_\n"
1082 "product\tproduct\n";
1083
1084 static const char frp_component_dat[] =
1085 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1086 "s72\tS38\ts72\ti2\tS255\tS72\n"
1087 "Component\tComponent\n"
1088 "product\t{44725EE0-EEA8-40BD-8162-A48224A2FEA1}\tMSITESTDIR\t0\t\tproduct.txt\n";
1089
1090 static const char frp_custom_action_dat[] =
1091 "Action\tType\tSource\tTarget\tISComments\n"
1092 "s72\ti2\tS64\tS0\tS255\n"
1093 "CustomAction\tAction\n"
1094 "TestProp\t19\t\t\tPROP set\n";
1095
1096 static const char frp_upgrade_dat[] =
1097 "UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
1098 "s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
1099 "Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
1100 "{4C0EAA15-0264-4E5A-8758-609EF142B92D}\t1.1.1\t2.2.2\t\t768\t\tPROP\n";
1101
1102 static const char frp_install_exec_seq_dat[] =
1103 "Action\tCondition\tSequence\n"
1104 "s72\tS255\tI2\n"
1105 "InstallExecuteSequence\tAction\n"
1106 "FindRelatedProducts\t\t50\n"
1107 "TestProp\tPROP AND NOT REMOVE\t51\n"
1108 "LaunchConditions\t\t100\n"
1109 "CostInitialize\t\t800\n"
1110 "FileCost\t\t900\n"
1111 "CostFinalize\t\t1000\n"
1112 "InstallValidate\t\t1400\n"
1113 "InstallInitialize\t\t1500\n"
1114 "ProcessComponents\t\t1600\n"
1115 "RemoveFiles\t\t1700\n"
1116 "InstallFiles\t\t2000\n"
1117 "RegisterProduct\t\t5000\n"
1118 "PublishFeatures\t\t5100\n"
1119 "PublishProduct\t\t5200\n"
1120 "InstallFinalize\t\t6000\n";
1121
1122 static const char riv_file_dat[] =
1123 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1124 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1125 "File\tFile\n"
1126 "inifile.txt\tinifile\tinifile.txt\t1000\t\t\t8192\t1\n";
1127
1128 static const char riv_feature_dat[] =
1129 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1130 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1131 "Feature\tFeature\n"
1132 "inifile\t\t\tinifile feature\t1\t2\tMSITESTDIR\t0\n";
1133
1134 static const char riv_feature_comp_dat[] =
1135 "Feature_\tComponent_\n"
1136 "s38\ts72\n"
1137 "FeatureComponents\tFeature_\tComponent_\n"
1138 "inifile\tinifile\n";
1139
1140 static const char riv_component_dat[] =
1141 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1142 "s72\tS38\ts72\ti2\tS255\tS72\n"
1143 "Component\tComponent\n"
1144 "inifile\t{A0F15705-4F57-4437-88C4-6C8B37ACC6DE}\tMSITESTDIR\t0\t\tinifile.txt\n";
1145
1146 static const char riv_ini_file_dat[] =
1147 "IniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
1148 "s72\tl255\tS72\tl96\tl128\tl255\ti2\ts72\n"
1149 "IniFile\tIniFile\n"
1150 "inifile1\ttest.ini\tMSITESTDIR\tsection1\tkey1\tvalue1\t0\tinifile\n";
1151
1152 static const char riv_remove_ini_file_dat[] =
1153 "RemoveIniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
1154 "s72\tl255\tS72\tl96\tl128\tL255\ti2\ts72\n"
1155 "RemoveIniFile\tRemoveIniFile\n"
1156 "inifile1\ttest.ini\tMSITESTDIR\tsectionA\tkeyA\tvalueA\t2\tinifile\n";
1157
1158 static const char riv_install_exec_seq_dat[] =
1159 "Action\tCondition\tSequence\n"
1160 "s72\tS255\tI2\n"
1161 "InstallExecuteSequence\tAction\n"
1162 "LaunchConditions\t\t100\n"
1163 "CostInitialize\t\t800\n"
1164 "FileCost\t\t900\n"
1165 "CostFinalize\t\t1000\n"
1166 "InstallValidate\t\t1400\n"
1167 "InstallInitialize\t\t1500\n"
1168 "ProcessComponents\t\t1600\n"
1169 "RemoveFiles\t\t1700\n"
1170 "InstallFiles\t\t2000\n"
1171 "RemoveIniValues\t\t3000\n"
1172 "RegisterProduct\t\t5000\n"
1173 "PublishFeatures\t\t5100\n"
1174 "PublishProduct\t\t5200\n"
1175 "InstallFinalize\t\t6000\n";
1176
1177 static const char res_file_dat[] =
1178 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1179 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1180 "File\tFile\n"
1181 "envvar.txt\tenvvar\tenvvar.txt\t1000\t\t\t8192\t1\n";
1182
1183 static const char res_feature_dat[] =
1184 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1185 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1186 "Feature\tFeature\n"
1187 "envvar\t\t\tenvvar feature\t1\t2\tMSITESTDIR\t0\n";
1188
1189 static const char res_feature_comp_dat[] =
1190 "Feature_\tComponent_\n"
1191 "s38\ts72\n"
1192 "FeatureComponents\tFeature_\tComponent_\n"
1193 "envvar\tenvvar\n";
1194
1195 static const char res_component_dat[] =
1196 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1197 "s72\tS38\ts72\ti2\tS255\tS72\n"
1198 "Component\tComponent\n"
1199 "envvar\t{45EE9AF4-E5D1-445F-8BB7-B22D4EEBD29E}\tMSITESTDIR\t0\t\tenvvar.txt\n";
1200
1201 static const char res_environment_dat[] =
1202 "Environment\tName\tValue\tComponent_\n"
1203 "s72\tl255\tL255\ts72\n"
1204 "Environment\tEnvironment\n"
1205 "var1\t=-MSITESTVAR1\t1\tenvvar\n"
1206 "var2\t=+-MSITESTVAR2\t1\tenvvar\n"
1207 "var3\t=MSITESTVAR3\t1\tenvvar\n"
1208 "var4\t=-MSITESTVAR4\t\tenvvar\n"
1209 "var5\t=MSITESTVAR5\t\tenvvar\n"
1210 "Var6\t-MSITESTVAR6\t1;[~]\tenvvar\n"
1211 "Var7\t-MSITESTVAR7\t[~];1\tenvvar\n"
1212 "Var8\t-MSITESTVAR8\t1;[~]\tenvvar\n"
1213 "Var9\t-MSITESTVAR9\t[~];1\tenvvar\n"
1214 "Var10\t-MSITESTVAR10\t1\tenvvar\n"
1215 "Var11\t-MSITESTVAR11\t2\tenvvar\n";
1216
1217 static const char res_install_exec_seq_dat[] =
1218 "Action\tCondition\tSequence\n"
1219 "s72\tS255\tI2\n"
1220 "InstallExecuteSequence\tAction\n"
1221 "LaunchConditions\t\t100\n"
1222 "CostInitialize\t\t800\n"
1223 "FileCost\t\t900\n"
1224 "CostFinalize\t\t1000\n"
1225 "InstallValidate\t\t1400\n"
1226 "InstallInitialize\t\t1500\n"
1227 "ProcessComponents\t\t1600\n"
1228 "RemoveFiles\t\t1700\n"
1229 "InstallFiles\t\t2000\n"
1230 "RemoveEnvironmentStrings\t\t3000\n"
1231 "RegisterProduct\t\t5000\n"
1232 "PublishFeatures\t\t5100\n"
1233 "PublishProduct\t\t5200\n"
1234 "InstallFinalize\t\t6000\n";
1235
1236 static const char rci_file_dat[] =
1237 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1238 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1239 "File\tFile\n"
1240 "class.txt\tclass\tclass.txt\t1000\t\t\t8192\t1\n";
1241
1242 static const char rci_feature_dat[] =
1243 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1244 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1245 "Feature\tFeature\n"
1246 "class\t\t\tclass feature\t1\t2\tMSITESTDIR\t0\n";
1247
1248 static const char rci_feature_comp_dat[] =
1249 "Feature_\tComponent_\n"
1250 "s38\ts72\n"
1251 "FeatureComponents\tFeature_\tComponent_\n"
1252 "class\tclass\n";
1253
1254 static const char rci_component_dat[] =
1255 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1256 "s72\tS38\ts72\ti2\tS255\tS72\n"
1257 "Component\tComponent\n"
1258 "class\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tclass.txt\n";
1259
1260 static const char rci_appid_dat[] =
1261 "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
1262 "s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
1263 "AppId\tAppId\n"
1264 "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n";
1265
1266 static const char rci_class_dat[] =
1267 "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
1268 "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
1269 "Class\tCLSID\tContext\tComponent_\n"
1270 "{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tclass\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tclass\t\n";
1271
1272 static const char rci_install_exec_seq_dat[] =
1273 "Action\tCondition\tSequence\n"
1274 "s72\tS255\tI2\n"
1275 "InstallExecuteSequence\tAction\n"
1276 "LaunchConditions\t\t100\n"
1277 "CostInitialize\t\t800\n"
1278 "FileCost\t\t900\n"
1279 "CostFinalize\t\t1000\n"
1280 "InstallValidate\t\t1400\n"
1281 "InstallInitialize\t\t1500\n"
1282 "ProcessComponents\t\t1600\n"
1283 "RemoveFiles\t\t1700\n"
1284 "InstallFiles\t\t2000\n"
1285 "UnregisterClassInfo\t\t3000\n"
1286 "RegisterClassInfo\t\t4000\n"
1287 "RegisterProduct\t\t5000\n"
1288 "PublishFeatures\t\t5100\n"
1289 "PublishProduct\t\t5200\n"
1290 "InstallFinalize\t\t6000\n";
1291
1292 static const char rei_file_dat[] =
1293 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1294 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1295 "File\tFile\n"
1296 "extension.txt\textension\textension.txt\t1000\t\t\t8192\t1\n";
1297
1298 static const char rei_feature_dat[] =
1299 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1300 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1301 "Feature\tFeature\n"
1302 "extension\t\t\textension feature\t1\t2\tMSITESTDIR\t0\n";
1303
1304 static const char rei_feature_comp_dat[] =
1305 "Feature_\tComponent_\n"
1306 "s38\ts72\n"
1307 "FeatureComponents\tFeature_\tComponent_\n"
1308 "extension\textension\n";
1309
1310 static const char rei_component_dat[] =
1311 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1312 "s72\tS38\ts72\ti2\tS255\tS72\n"
1313 "Component\tComponent\n"
1314 "extension\t{9A3060D4-60BA-4A82-AB55-9FB148AD013C}\tMSITESTDIR\t0\t\textension.txt\n";
1315
1316 static const char rei_extension_dat[] =
1317 "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1318 "s255\ts72\tS255\tS64\ts38\n"
1319 "Extension\tExtension\tComponent_\n"
1320 "extension\textension\tProg.Id.1\t\textension\n";
1321
1322 static const char rei_verb_dat[] =
1323 "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1324 "s255\ts32\tI2\tL255\tL255\n"
1325 "Verb\tExtension_\tVerb\n"
1326 "extension\tOpen\t1\t&Open\t/argument\n";
1327
1328 static const char rei_progid_dat[] =
1329 "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
1330 "s255\tS255\tS38\tL255\tS72\tI2\n"
1331 "ProgId\tProgId\n"
1332 "Prog.Id.1\t\t\tdescription\t\t\n";
1333
1334 static const char rei_install_exec_seq_dat[] =
1335 "Action\tCondition\tSequence\n"
1336 "s72\tS255\tI2\n"
1337 "InstallExecuteSequence\tAction\n"
1338 "LaunchConditions\t\t100\n"
1339 "CostInitialize\t\t800\n"
1340 "FileCost\t\t900\n"
1341 "CostFinalize\t\t1000\n"
1342 "InstallValidate\t\t1400\n"
1343 "InstallInitialize\t\t1500\n"
1344 "ProcessComponents\t\t1600\n"
1345 "RemoveFiles\t\t1700\n"
1346 "InstallFiles\t\t2000\n"
1347 "UnregisterExtensionInfo\t\t3000\n"
1348 "RegisterExtensionInfo\t\t4000\n"
1349 "RegisterProduct\t\t5000\n"
1350 "PublishFeatures\t\t5100\n"
1351 "PublishProduct\t\t5200\n"
1352 "InstallFinalize\t\t6000\n";
1353
1354 static const char rpi_file_dat[] =
1355 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1356 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1357 "File\tFile\n"
1358 "progid.txt\tprogid\tprogid.txt\t1000\t\t\t8192\t1\n";
1359
1360 static const char rpi_feature_dat[] =
1361 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1362 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1363 "Feature\tFeature\n"
1364 "progid\t\t\tprogid feature\t1\t2\tMSITESTDIR\t0\n";
1365
1366 static const char rpi_feature_comp_dat[] =
1367 "Feature_\tComponent_\n"
1368 "s38\ts72\n"
1369 "FeatureComponents\tFeature_\tComponent_\n"
1370 "progid\tprogid\n";
1371
1372 static const char rpi_component_dat[] =
1373 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1374 "s72\tS38\ts72\ti2\tS255\tS72\n"
1375 "Component\tComponent\n"
1376 "progid\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tprogid.txt\n";
1377
1378 static const char rpi_appid_dat[] =
1379 "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
1380 "s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
1381 "AppId\tAppId\n"
1382 "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n";
1383
1384 static const char rpi_class_dat[] =
1385 "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
1386 "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
1387 "Class\tCLSID\tContext\tComponent_\n"
1388 "{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tprogid\tWinetest.Class.1\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n"
1389 "{904E6BC9-F57F-4412-B460-D40DE2F256E2}\tLocalServer\tprogid\tWinetest.VerClass\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n"
1390 "{57C413FB-CA02-498A-81F6-7E769BDB7C97}\tLocalServer\tprogid\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n";
1391
1392 static const char rpi_extension_dat[] =
1393 "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1394 "s255\ts72\tS255\tS64\ts38\n"
1395 "Extension\tExtension\tComponent_\n"
1396 "winetest\tprogid\tWinetest.Extension\t\tprogid\n";
1397
1398 static const char rpi_verb_dat[] =
1399 "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1400 "s255\ts32\tI2\tL255\tL255\n"
1401 "Verb\tExtension_\tVerb\n"
1402 "winetest\tOpen\t1\t&Open\t/argument\n";
1403
1404 static const char rpi_progid_dat[] =
1405 "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
1406 "s255\tS255\tS38\tL255\tS72\tI2\n"
1407 "ProgId\tProgId\n"
1408 "Winetest.Class.1\t\t{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tdescription\t\t\n"
1409 "Winetest.Class\tWinetest.Class.1\t\tdescription\t\t\n"
1410 "Winetest.Class.2\t\t{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tdescription\t\t\n"
1411 "Winetest.VerClass.1\t\t{904E6BC9-F57F-4412-B460-D40DE2F256E2}\tdescription\t\t\n"
1412 "Winetest.VerClass\tWinetest.VerClass.1\t\tdescription\t\t\n"
1413 "Winetest.NoProgIdClass.1\t\t{57C413FB-CA02-498A-81F6-7E769BDB7C97}\tdescription\t\t\n"
1414 "Winetest.NoProgIdClass\tWinetest.NoProgIdClass.1\t\tdescription\t\t\n"
1415 "Winetest.Orphaned\t\t\tdescription\t\t\n"
1416 "Winetest.Orphaned2\t\t\tdescription\t\t\n"
1417 "Winetest.Extension\t\t\tdescription\t\t\n";
1418
1419 static const char rpi_install_exec_seq_dat[] =
1420 "Action\tCondition\tSequence\n"
1421 "s72\tS255\tI2\n"
1422 "InstallExecuteSequence\tAction\n"
1423 "LaunchConditions\t\t100\n"
1424 "CostInitialize\t\t800\n"
1425 "FileCost\t\t900\n"
1426 "CostFinalize\t\t1000\n"
1427 "InstallValidate\t\t1400\n"
1428 "InstallInitialize\t\t1500\n"
1429 "ProcessComponents\t\t1600\n"
1430 "RemoveFiles\t\t1700\n"
1431 "UnregisterClassInfo\t\t3000\n"
1432 "UnregisterExtensionInfo\t\t3200\n"
1433 "UnregisterProgIdInfo\t\t3400\n"
1434 "InstallFiles\t\t3600\n"
1435 "RegisterClassInfo\t\t4000\n"
1436 "RegisterExtensionInfo\t\t4200\n"
1437 "RegisterProgIdInfo\t\t4400\n"
1438 "RegisterProduct\t\t5000\n"
1439 "PublishFeatures\t\t5100\n"
1440 "PublishProduct\t\t5200\n"
1441 "InstallFinalize\t\t6000\n";
1442
1443 static const char rmi_file_dat[] =
1444 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1445 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1446 "File\tFile\n"
1447 "mime.txt\tmime\tmime.txt\t1000\t\t\t8192\t1\n";
1448
1449 static const char rmi_feature_dat[] =
1450 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1451 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1452 "Feature\tFeature\n"
1453 "mime\t\t\tmime feature\t1\t2\tMSITESTDIR\t0\n";
1454
1455 static const char rmi_feature_comp_dat[] =
1456 "Feature_\tComponent_\n"
1457 "s38\ts72\n"
1458 "FeatureComponents\tFeature_\tComponent_\n"
1459 "mime\tmime\n";
1460
1461 static const char rmi_component_dat[] =
1462 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1463 "s72\tS38\ts72\ti2\tS255\tS72\n"
1464 "Component\tComponent\n"
1465 "mime\t{A1D630CE-13A7-4882-AFDD-148E2BBAFC6D}\tMSITESTDIR\t0\t\tmime.txt\n";
1466
1467 static const char rmi_extension_dat[] =
1468 "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1469 "s255\ts72\tS255\tS64\ts38\n"
1470 "Extension\tExtension\tComponent_\n"
1471 "mime\tmime\t\tmime/type\tmime\n";
1472
1473 static const char rmi_verb_dat[] =
1474 "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1475 "s255\ts32\tI2\tL255\tL255\n"
1476 "Verb\tExtension_\tVerb\n"
1477 "mime\tOpen\t1\t&Open\t/argument\n";
1478
1479 static const char rmi_mime_dat[] =
1480 "ContentType\tExtension_\tCLSID\n"
1481 "s64\ts255\tS38\n"
1482 "MIME\tContentType\n"
1483 "mime/type\tmime\t\n";
1484
1485 static const char rmi_install_exec_seq_dat[] =
1486 "Action\tCondition\tSequence\n"
1487 "s72\tS255\tI2\n"
1488 "InstallExecuteSequence\tAction\n"
1489 "LaunchConditions\t\t100\n"
1490 "CostInitialize\t\t800\n"
1491 "FileCost\t\t900\n"
1492 "CostFinalize\t\t1000\n"
1493 "InstallValidate\t\t1400\n"
1494 "InstallInitialize\t\t1500\n"
1495 "ProcessComponents\t\t1600\n"
1496 "RemoveFiles\t\t1700\n"
1497 "InstallFiles\t\t2000\n"
1498 "UnregisterExtensionInfo\t\t3000\n"
1499 "UnregisterMIMEInfo\t\t3500\n"
1500 "RegisterExtensionInfo\t\t4000\n"
1501 "RegisterMIMEInfo\t\t4500\n"
1502 "RegisterProduct\t\t5000\n"
1503 "PublishFeatures\t\t5100\n"
1504 "PublishProduct\t\t5200\n"
1505 "InstallFinalize\t\t6000\n";
1506
1507 static const char pa_file_dat[] =
1508 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1509 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1510 "File\tFile\n"
1511 "win32.txt\twin32\twin32.txt\t1000\t\t\t8192\t1\n"
1512 "manifest.txt\twin32\tmanifest.txt\t1000\t\t\t8192\t1\n"
1513 "win32_local.txt\twin32_local\twin32_local.txt\t1000\t\t\t8192\t1\n"
1514 "manifest_local.txt\twin32_local\tmanifest_local.txt\t1000\t\t\t8192\t1\n"
1515 "dotnet.txt\tdotnet\tdotnet.txt\t1000\t\t\t8192\t1\n"
1516 "dotnet_local.txt\tdotnet_local\tdotnet_local.txt\t1000\t\t\t8192\t1\n"
1517 "application_win32.txt\twin32_local\tapplication_win32.txt\t1000\t\t\t8192\t1\n"
1518 "application_dotnet.txt\tdotnet_local\tapplication_dotnet.txt\t1000\t\t\t8192\t1\n";
1519
1520 static const char pa_feature_dat[] =
1521 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1522 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1523 "Feature\tFeature\n"
1524 "assembly\t\t\tassembly feature\t1\t2\tMSITESTDIR\t0\n";
1525
1526 static const char pa_feature_comp_dat[] =
1527 "Feature_\tComponent_\n"
1528 "s38\ts72\n"
1529 "FeatureComponents\tFeature_\tComponent_\n"
1530 "assembly\twin32\n"
1531 "assembly\twin32_local\n"
1532 "assembly\tdotnet\n"
1533 "assembly\tdotnet_local\n";
1534
1535 static const char pa_component_dat[] =
1536 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1537 "s72\tS38\ts72\ti2\tS255\tS72\n"
1538 "Component\tComponent\n"
1539 "win32\t{F515549E-7E61-425D-AAC1-9BEF2E066D06}\tMSITESTDIR\t0\t\twin32.txt\n"
1540 "win32_local\t{D34D3FBA-6789-4E57-AD1A-1281297DC201}\tMSITESTDIR\t0\t\twin32_local.txt\n"
1541 "dotnet\t{8943164F-2B31-4C09-A894-493A8CBDE0A4}\tMSITESTDIR\t0\t\tdotnet.txt\n"
1542 "dotnet_local\t{4E8567E8-8EAE-4E36-90F1-B99D33C663F8}\tMSITESTDIR\t0\t\tdotnet_local.txt\n";
1543
1544 static const char pa_msi_assembly_dat[] =
1545 "Component_\tFeature_\tFile_Manifest\tFile_Application\tAttributes\n"
1546 "s72\ts38\tS72\tS72\tI2\n"
1547 "MsiAssembly\tComponent_\n"
1548 "win32\tassembly\tmanifest.txt\t\t1\n"
1549 "win32_local\tassembly\tmanifest_local.txt\tapplication_win32.txt\t1\n"
1550 "dotnet\tassembly\t\t\t0\n"
1551 "dotnet_local\tassembly\t\tapplication_dotnet.txt\t0\n";
1552
1553 static const char pa_msi_assembly_name_dat[] =
1554 "Component_\tName\tValue\n"
1555 "s72\ts255\ts255\n"
1556 "MsiAssemblyName\tComponent_\tName\n"
1557 "win32\tName\tWine.Win32.Assembly\n"
1558 "win32\tprocessorArchitecture\tx86\n"
1559 "win32\tpublicKeyToken\tabcdef0123456789\n"
1560 "win32\ttype\twin32\n"
1561 "win32\tversion\t1.0.0.0\n"
1562 "win32_local\tName\tWine.Win32.Local.Assembly\n"
1563 "win32_local\tprocessorArchitecture\tx86\n"
1564 "win32_local\tpublicKeyToken\tabcdef0123456789\n"
1565 "win32_local\ttype\twin32\n"
1566 "win32_local\tversion\t1.0.0.0\n"
1567 "dotnet\tName\tWine.Dotnet.Assembly\n"
1568 "dotnet\tprocessorArchitecture\tMSIL\n"
1569 "dotnet\tpublicKeyToken\tabcdef0123456789\n"
1570 "dotnet\tculture\tneutral\n"
1571 "dotnet\tversion\t1.0.0.0\n"
1572 "dotnet_local\tName\tWine.Dotnet.Local.Assembly\n"
1573 "dotnet_local\tprocessorArchitecture\tMSIL\n"
1574 "dotnet_local\tpublicKeyToken\tabcdef0123456789\n"
1575 "dotnet_local\tculture\tneutral\n"
1576 "dotnet_local\tversion\t1.0.0.0\n";
1577
1578 static const char pa_install_exec_seq_dat[] =
1579 "Action\tCondition\tSequence\n"
1580 "s72\tS255\tI2\n"
1581 "InstallExecuteSequence\tAction\n"
1582 "LaunchConditions\t\t100\n"
1583 "CostInitialize\t\t800\n"
1584 "FileCost\t\t900\n"
1585 "CostFinalize\t\t1000\n"
1586 "InstallValidate\t\t1400\n"
1587 "InstallInitialize\t\t1500\n"
1588 "ProcessComponents\t\t1600\n"
1589 "MsiPublishAssemblies\t\t3000\n"
1590 "MsiUnpublishAssemblies\t\t4000\n"
1591 "RegisterProduct\t\t5000\n"
1592 "PublishFeatures\t\t5100\n"
1593 "PublishProduct\t\t5200\n"
1594 "InstallFinalize\t\t6000\n";
1595
1596 static const char rep_file_dat[] =
1597 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1598 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1599 "File\tFile\n"
1600 "rep.txt\trep\trep.txt\t1000\t\t\t8192\t1\n";
1601
1602 static const char rep_feature_dat[] =
1603 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1604 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1605 "Feature\tFeature\n"
1606 "rep\t\t\trep feature\t1\t2\tMSITESTDIR\t0\n";
1607
1608 static const char rep_feature_comp_dat[] =
1609 "Feature_\tComponent_\n"
1610 "s38\ts72\n"
1611 "FeatureComponents\tFeature_\tComponent_\n"
1612 "rep\trep\n";
1613
1614 static const char rep_component_dat[] =
1615 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1616 "s72\tS38\ts72\ti2\tS255\tS72\n"
1617 "Component\tComponent\n"
1618 "rep\t{A24FAF2A-3B2E-41EF-AA78-331542E1A29D}\tMSITESTDIR\t0\t\trep.txt\n";
1619
1620 static const char rep_upgrade_dat[] =
1621 "UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
1622 "s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
1623 "Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
1624 "{2967C1CC-34D4-42EE-8D96-CD6836F192BF}\t\t\t\t256\t\tPRODUCT\n";
1625
1626 static const char rep_property_dat[] =
1627 "Property\tValue\n"
1628 "s72\tl0\n"
1629 "Property\tProperty\n"
1630 "HASUIRUN\t0\n"
1631 "INSTALLLEVEL\t3\n"
1632 "InstallMode\tTypical\n"
1633 "Manufacturer\tWine\n"
1634 "PIDTemplate\t###-#######\n"
1635 "ProductCode\t{1699F0BB-0B61-4A89-AFE4-CFD60DFD76F3}\n"
1636 "ProductLanguage\t1033\n"
1637 "ProductName\tMSITEST\n"
1638 "ProductVersion\t1.1.1\n"
1639 "UpgradeCode\t{2967C1CC-34D4-42EE-8D96-CD6836F192BF}\n"
1640 "PRODUCT\t2F41860D-7B4C-4DA7-BED9-B64F26594C56\n"
1641 "MSIFASTINSTALL\t1\n";
1642
1643 static const char rep_install_exec_seq_dat[] =
1644 "Action\tCondition\tSequence\n"
1645 "s72\tS255\tI2\n"
1646 "InstallExecuteSequence\tAction\n"
1647 "FindRelatedProducts\t\t100\n"
1648 "CostInitialize\t\t800\n"
1649 "FileCost\t\t900\n"
1650 "CostFinalize\t\t1000\n"
1651 "InstallValidate\t\t1400\n"
1652 "RemoveExistingProducts\t\t1499\n"
1653 "InstallInitialize\t\t1500\n"
1654 "ProcessComponents\t\t1600\n"
1655 "RemoveFiles\t\t1700\n"
1656 "InstallFiles\t\t2000\n"
1657 "UnregisterExtensionInfo\t\t3000\n"
1658 "UnregisterMIMEInfo\t\t3500\n"
1659 "RegisterExtensionInfo\t\t4000\n"
1660 "RegisterMIMEInfo\t\t4500\n"
1661 "RegisterProduct\t\t5000\n"
1662 "PublishFeatures\t\t5100\n"
1663 "PublishProduct\t\t5200\n"
1664 "InstallFinalize\t\t6000\n";
1665
1666 typedef struct _msi_table
1667 {
1668 const char *filename;
1669 const char *data;
1670 unsigned int size;
1671 } msi_table;
1672
1673 #define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)}
1674
1675 static const msi_table env_tables[] =
1676 {
1677 ADD_TABLE(component),
1678 ADD_TABLE(directory),
1679 ADD_TABLE(feature),
1680 ADD_TABLE(feature_comp),
1681 ADD_TABLE(file),
1682 ADD_TABLE(install_exec_seq),
1683 ADD_TABLE(media),
1684 ADD_TABLE(property),
1685 ADD_TABLE(environment)
1686 };
1687
1688 static const msi_table pp_tables[] =
1689 {
1690 ADD_TABLE(pp_component),
1691 ADD_TABLE(directory),
1692 ADD_TABLE(rof_feature),
1693 ADD_TABLE(rof_feature_comp),
1694 ADD_TABLE(rof_file),
1695 ADD_TABLE(pp_install_exec_seq),
1696 ADD_TABLE(rof_media),
1697 ADD_TABLE(property),
1698 };
1699
1700 static const msi_table ppc_tables[] =
1701 {
1702 ADD_TABLE(ppc_component),
1703 ADD_TABLE(directory),
1704 ADD_TABLE(rof_feature),
1705 ADD_TABLE(ppc_feature_comp),
1706 ADD_TABLE(ppc_file),
1707 ADD_TABLE(pp_install_exec_seq),
1708 ADD_TABLE(ppc_media),
1709 ADD_TABLE(property),
1710 };
1711
1712 static const msi_table rem_tables[] =
1713 {
1714 ADD_TABLE(rem_component),
1715 ADD_TABLE(directory),
1716 ADD_TABLE(rof_feature),
1717 ADD_TABLE(rem_feature_comp),
1718 ADD_TABLE(rem_file),
1719 ADD_TABLE(rem_install_exec_seq),
1720 ADD_TABLE(rof_media),
1721 ADD_TABLE(property),
1722 ADD_TABLE(rem_remove_files),
1723 };
1724
1725 static const msi_table mov_tables[] =
1726 {
1727 ADD_TABLE(cwd_component),
1728 ADD_TABLE(directory),
1729 ADD_TABLE(rof_feature),
1730 ADD_TABLE(ci2_feature_comp),
1731 ADD_TABLE(ci2_file),
1732 ADD_TABLE(install_exec_seq),
1733 ADD_TABLE(rof_media),
1734 ADD_TABLE(property),
1735 ADD_TABLE(mov_move_file),
1736 };
1737
1738 static const msi_table df_tables[] =
1739 {
1740 ADD_TABLE(rof_component),
1741 ADD_TABLE(df_directory),
1742 ADD_TABLE(rof_feature),
1743 ADD_TABLE(rof_feature_comp),
1744 ADD_TABLE(rof_file),
1745 ADD_TABLE(install_exec_seq),
1746 ADD_TABLE(rof_media),
1747 ADD_TABLE(property),
1748 ADD_TABLE(df_duplicate_file),
1749 };
1750
1751 static const msi_table wrv_tables[] =
1752 {
1753 ADD_TABLE(wrv_component),
1754 ADD_TABLE(directory),
1755 ADD_TABLE(rof_feature),
1756 ADD_TABLE(ci2_feature_comp),
1757 ADD_TABLE(ci2_file),
1758 ADD_TABLE(install_exec_seq),
1759 ADD_TABLE(rof_media),
1760 ADD_TABLE(property),
1761 ADD_TABLE(wrv_registry),
1762 };
1763
1764 static const msi_table cf_tables[] =
1765 {
1766 ADD_TABLE(cf_component),
1767 ADD_TABLE(cf_directory),
1768 ADD_TABLE(cf_feature),
1769 ADD_TABLE(cf_feature_comp),
1770 ADD_TABLE(cf_file),
1771 ADD_TABLE(cf_create_folders),
1772 ADD_TABLE(cf_install_exec_seq),
1773 ADD_TABLE(media),
1774 ADD_TABLE(property)
1775 };
1776
1777 static const msi_table sss_tables[] =
1778 {
1779 ADD_TABLE(component),
1780 ADD_TABLE(directory),
1781 ADD_TABLE(feature),
1782 ADD_TABLE(feature_comp),
1783 ADD_TABLE(file),
1784 ADD_TABLE(sss_install_exec_seq),
1785 ADD_TABLE(sss_service_control),
1786 ADD_TABLE(media),
1787 ADD_TABLE(property)
1788 };
1789
1790 static const msi_table sds_tables[] =
1791 {
1792 ADD_TABLE(component),
1793 ADD_TABLE(directory),
1794 ADD_TABLE(feature),
1795 ADD_TABLE(feature_comp),
1796 ADD_TABLE(file),
1797 ADD_TABLE(sds_install_exec_seq),
1798 ADD_TABLE(service_control),
1799 ADD_TABLE(service_install),
1800 ADD_TABLE(media),
1801 ADD_TABLE(property)
1802 };
1803
1804 static const msi_table sis_tables[] =
1805 {
1806 ADD_TABLE(component),
1807 ADD_TABLE(directory),
1808 ADD_TABLE(feature),
1809 ADD_TABLE(feature_comp),
1810 ADD_TABLE(file),
1811 ADD_TABLE(sds_install_exec_seq),
1812 ADD_TABLE(service_install2),
1813 ADD_TABLE(media),
1814 ADD_TABLE(property)
1815 };
1816
1817 static const msi_table sr_tables[] =
1818 {
1819 ADD_TABLE(component),
1820 ADD_TABLE(directory),
1821 ADD_TABLE(feature),
1822 ADD_TABLE(feature_comp),
1823 ADD_TABLE(file),
1824 ADD_TABLE(sr_selfreg),
1825 ADD_TABLE(sr_install_exec_seq),
1826 ADD_TABLE(media),
1827 ADD_TABLE(property)
1828 };
1829
1830 static const msi_table font_tables[] =
1831 {
1832 ADD_TABLE(font_component),
1833 ADD_TABLE(directory),
1834 ADD_TABLE(font_feature),
1835 ADD_TABLE(font_feature_comp),
1836 ADD_TABLE(font_file),
1837 ADD_TABLE(font),
1838 ADD_TABLE(font_install_exec_seq),
1839 ADD_TABLE(font_media),
1840 ADD_TABLE(property)
1841 };
1842
1843 static const msi_table vp_tables[] =
1844 {
1845 ADD_TABLE(component),
1846 ADD_TABLE(directory),
1847 ADD_TABLE(feature),
1848 ADD_TABLE(feature_comp),
1849 ADD_TABLE(file),
1850 ADD_TABLE(vp_custom_action),
1851 ADD_TABLE(vp_install_exec_seq),
1852 ADD_TABLE(media),
1853 ADD_TABLE(vp_property)
1854 };
1855
1856 static const msi_table odbc_tables[] =
1857 {
1858 ADD_TABLE(odbc_component),
1859 ADD_TABLE(directory),
1860 ADD_TABLE(odbc_feature),
1861 ADD_TABLE(odbc_feature_comp),
1862 ADD_TABLE(odbc_file),
1863 ADD_TABLE(odbc_driver),
1864 ADD_TABLE(odbc_translator),
1865 ADD_TABLE(odbc_datasource),
1866 ADD_TABLE(odbc_install_exec_seq),
1867 ADD_TABLE(odbc_media),
1868 ADD_TABLE(property)
1869 };
1870
1871 static const msi_table tl_tables[] =
1872 {
1873 ADD_TABLE(tl_component),
1874 ADD_TABLE(directory),
1875 ADD_TABLE(tl_feature),
1876 ADD_TABLE(tl_feature_comp),
1877 ADD_TABLE(tl_file),
1878 ADD_TABLE(tl_typelib),
1879 ADD_TABLE(tl_install_exec_seq),
1880 ADD_TABLE(media),
1881 ADD_TABLE(property)
1882 };
1883
1884 static const msi_table crs_tables[] =
1885 {
1886 ADD_TABLE(crs_component),
1887 ADD_TABLE(directory),
1888 ADD_TABLE(crs_feature),
1889 ADD_TABLE(crs_feature_comp),
1890 ADD_TABLE(crs_file),
1891 ADD_TABLE(crs_shortcut),
1892 ADD_TABLE(crs_install_exec_seq),
1893 ADD_TABLE(media),
1894 ADD_TABLE(property)
1895 };
1896
1897 static const msi_table pub_tables[] =
1898 {
1899 ADD_TABLE(directory),
1900 ADD_TABLE(pub_component),
1901 ADD_TABLE(pub_feature),
1902 ADD_TABLE(pub_feature_comp),
1903 ADD_TABLE(pub_file),
1904 ADD_TABLE(pub_publish_component),
1905 ADD_TABLE(pub_install_exec_seq),
1906 ADD_TABLE(media),
1907 ADD_TABLE(property)
1908 };
1909
1910 static const msi_table rd_tables[] =
1911 {
1912 ADD_TABLE(directory),
1913 ADD_TABLE(rd_component),
1914 ADD_TABLE(rd_feature),
1915 ADD_TABLE(rd_feature_comp),
1916 ADD_TABLE(rd_file),
1917 ADD_TABLE(rd_duplicate_file),
1918 ADD_TABLE(rd_install_exec_seq),
1919 ADD_TABLE(media),
1920 ADD_TABLE(property)
1921 };
1922
1923 static const msi_table rrv_tables[] =
1924 {
1925 ADD_TABLE(directory),
1926 ADD_TABLE(rrv_component),
1927 ADD_TABLE(rrv_feature),
1928 ADD_TABLE(rrv_feature_comp),
1929 ADD_TABLE(rrv_file),
1930 ADD_TABLE(rrv_registry),
1931 ADD_TABLE(rrv_remove_registry),
1932 ADD_TABLE(rrv_install_exec_seq),
1933 ADD_TABLE(media),
1934 ADD_TABLE(property)
1935 };
1936
1937 static const msi_table frp_tables[] =
1938 {
1939 ADD_TABLE(directory),
1940 ADD_TABLE(frp_component),
1941 ADD_TABLE(frp_feature),
1942 ADD_TABLE(frp_feature_comp),
1943 ADD_TABLE(frp_file),
1944 ADD_TABLE(frp_upgrade),
1945 ADD_TABLE(frp_custom_action),
1946 ADD_TABLE(frp_install_exec_seq),
1947 ADD_TABLE(media),
1948 ADD_TABLE(property)
1949 };
1950
1951 static const msi_table riv_tables[] =
1952 {
1953 ADD_TABLE(directory),
1954 ADD_TABLE(riv_component),
1955 ADD_TABLE(riv_feature),
1956 ADD_TABLE(riv_feature_comp),
1957 ADD_TABLE(riv_file),
1958 ADD_TABLE(riv_ini_file),
1959 ADD_TABLE(riv_remove_ini_file),
1960 ADD_TABLE(riv_install_exec_seq),
1961 ADD_TABLE(media),
1962 ADD_TABLE(property)
1963 };
1964
1965 static const msi_table res_tables[] =
1966 {
1967 ADD_TABLE(directory),
1968 ADD_TABLE(res_component),
1969 ADD_TABLE(res_feature),
1970 ADD_TABLE(res_feature_comp),
1971 ADD_TABLE(res_file),
1972 ADD_TABLE(res_environment),
1973 ADD_TABLE(res_install_exec_seq),
1974 ADD_TABLE(media),
1975 ADD_TABLE(property)
1976 };
1977
1978 static const msi_table rci_tables[] =
1979 {
1980 ADD_TABLE(directory),
1981 ADD_TABLE(rci_component),
1982 ADD_TABLE(rci_feature),
1983 ADD_TABLE(rci_feature_comp),
1984 ADD_TABLE(rci_file),
1985 ADD_TABLE(rci_appid),
1986 ADD_TABLE(rci_class),
1987 ADD_TABLE(rci_install_exec_seq),
1988 ADD_TABLE(media),
1989 ADD_TABLE(property)
1990 };
1991
1992 static const msi_table rei_tables[] =
1993 {
1994 ADD_TABLE(directory),
1995 ADD_TABLE(rei_component),
1996 ADD_TABLE(rei_feature),
1997 ADD_TABLE(rei_feature_comp),
1998 ADD_TABLE(rei_file),
1999 ADD_TABLE(rei_extension),
2000 ADD_TABLE(rei_verb),
2001 ADD_TABLE(rei_progid),
2002 ADD_TABLE(rei_install_exec_seq),
2003 ADD_TABLE(media),
2004 ADD_TABLE(property)
2005 };
2006
2007 static const msi_table rpi_tables[] =
2008 {
2009 ADD_TABLE(directory),
2010 ADD_TABLE(rpi_component),
2011 ADD_TABLE(rpi_feature),
2012 ADD_TABLE(rpi_feature_comp),
2013 ADD_TABLE(rpi_file),
2014 ADD_TABLE(rpi_appid),
2015 ADD_TABLE(rpi_class),
2016 ADD_TABLE(rpi_extension),
2017 ADD_TABLE(rpi_verb),
2018 ADD_TABLE(rpi_progid),
2019 ADD_TABLE(rpi_install_exec_seq),
2020 ADD_TABLE(media),
2021 ADD_TABLE(property)
2022 };
2023
2024 static const msi_table rmi_tables[] =
2025 {
2026 ADD_TABLE(directory),
2027 ADD_TABLE(rmi_component),
2028 ADD_TABLE(rmi_feature),
2029 ADD_TABLE(rmi_feature_comp),
2030 ADD_TABLE(rmi_file),
2031 ADD_TABLE(rmi_extension),
2032 ADD_TABLE(rmi_verb),
2033 ADD_TABLE(rmi_mime),
2034 ADD_TABLE(rmi_install_exec_seq),
2035 ADD_TABLE(media),
2036 ADD_TABLE(property)
2037 };
2038
2039 static const msi_table pa_tables[] =
2040 {
2041 ADD_TABLE(directory),
2042 ADD_TABLE(pa_component),
2043 ADD_TABLE(pa_feature),
2044 ADD_TABLE(pa_feature_comp),
2045 ADD_TABLE(pa_file),
2046 ADD_TABLE(pa_msi_assembly),
2047 ADD_TABLE(pa_msi_assembly_name),
2048 ADD_TABLE(pa_install_exec_seq),
2049 ADD_TABLE(media),
2050 ADD_TABLE(property)
2051 };
2052
2053 static const msi_table rep_tables[] =
2054 {
2055 ADD_TABLE(directory),
2056 ADD_TABLE(rep_component),
2057 ADD_TABLE(rep_feature),
2058 ADD_TABLE(rep_feature_comp),
2059 ADD_TABLE(rep_file),
2060 ADD_TABLE(rep_upgrade),
2061 ADD_TABLE(rep_property),
2062 ADD_TABLE(rep_install_exec_seq),
2063 ADD_TABLE(media)
2064 };
2065
2066 /* based on RegDeleteTreeW from dlls/advapi32/registry.c */
2067 static LSTATUS action_RegDeleteTreeA(HKEY hKey, LPCSTR lpszSubKey, REGSAM access)
2068 {
2069 LONG ret;
2070 DWORD dwMaxSubkeyLen, dwMaxValueLen;
2071 DWORD dwMaxLen, dwSize;
2072 char szNameBuf[MAX_PATH], *lpszName = szNameBuf;
2073 HKEY hSubKey = hKey;
2074
2075 if(lpszSubKey)
2076 {
2077 ret = RegOpenKeyExA(hKey, lpszSubKey, 0, access, &hSubKey);
2078 if (ret) return ret;
2079 }
2080
2081 ret = RegQueryInfoKeyA(hSubKey, NULL, NULL, NULL, NULL,
2082 &dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL);
2083 if (ret) goto cleanup;
2084
2085 dwMaxSubkeyLen++;
2086 dwMaxValueLen++;
2087 dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen);
2088 if (dwMaxLen > sizeof(szNameBuf))
2089 {
2090 /* Name too big: alloc a buffer for it */
2091 if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen)))
2092 {
2093 ret = ERROR_NOT_ENOUGH_MEMORY;
2094 goto cleanup;
2095 }
2096 }
2097
2098 /* Recursively delete all the subkeys */
2099 while (TRUE)
2100 {
2101 dwSize = dwMaxLen;
2102 if (RegEnumKeyExA(hSubKey, 0, lpszName, &dwSize, NULL,
2103 NULL, NULL, NULL)) break;
2104
2105 ret = action_RegDeleteTreeA(hSubKey, lpszName, access);
2106 if (ret) goto cleanup;
2107 }
2108
2109 if (lpszSubKey)
2110 {
2111 if (pRegDeleteKeyExA)
2112 ret = pRegDeleteKeyExA(hKey, lpszSubKey, access, 0);
2113 else
2114 ret = RegDeleteKeyA(hKey, lpszSubKey);
2115 }
2116 else
2117 while (TRUE)
2118 {
2119 dwSize = dwMaxLen;
2120 if (RegEnumValueA(hKey, 0, lpszName, &dwSize,
2121 NULL, NULL, NULL, NULL)) break;
2122
2123 ret = RegDeleteValueA(hKey, lpszName);
2124 if (ret) goto cleanup;
2125 }
2126
2127 cleanup:
2128 if (lpszName != szNameBuf)
2129 HeapFree(GetProcessHeap(), 0, lpszName);
2130 if(lpszSubKey)
2131 RegCloseKey(hSubKey);
2132 return ret;
2133 }
2134
2135 /* cabinet definitions */
2136
2137 /* make the max size large so there is only one cab file */
2138 #define MEDIA_SIZE 0x7FFFFFFF
2139 #define FOLDER_THRESHOLD 900000
2140
2141 /* the FCI callbacks */
2142
2143 static void * CDECL mem_alloc(ULONG cb)
2144 {
2145 return HeapAlloc(GetProcessHeap(), 0, cb);
2146 }
2147
2148 static void CDECL mem_free(void *memory)
2149 {
2150 HeapFree(GetProcessHeap(), 0, memory);
2151 }
2152
2153 static BOOL CDECL get_next_cabinet(PCCAB pccab, ULONG cbPrevCab, void *pv)
2154 {
2155 sprintf(pccab->szCab, pv, pccab->iCab);
2156 return TRUE;
2157 }
2158
2159 static LONG CDECL progress(UINT typeStatus, ULONG cb1, ULONG cb2, void *pv)
2160 {
2161 return 0;
2162 }
2163
2164 static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile,
2165 BOOL fContinuation, void *pv)
2166 {
2167 return 0;
2168 }
2169
2170 static INT_PTR CDECL fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv)
2171 {
2172 HANDLE handle;
2173 DWORD dwAccess = 0;
2174 DWORD dwShareMode = 0;
2175 DWORD dwCreateDisposition = OPEN_EXISTING;
2176
2177 dwAccess = GENERIC_READ | GENERIC_WRITE;
2178 dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
2179
2180 if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES)
2181 dwCreateDisposition = OPEN_EXISTING;
2182 else
2183 dwCreateDisposition = CREATE_NEW;
2184
2185 handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL,
2186 dwCreateDisposition, 0, NULL);
2187
2188 ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszFile);
2189
2190 return (INT_PTR)handle;
2191 }
2192
2193 static UINT CDECL fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
2194 {
2195 HANDLE handle = (HANDLE)hf;
2196 DWORD dwRead;
2197 BOOL res;
2198
2199 res = ReadFile(handle, memory, cb, &dwRead, NULL);
2200 ok(res, "Failed to ReadFile\n");
2201
2202 return dwRead;
2203 }
2204
2205 static UINT CDECL fci_write(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
2206 {
2207 HANDLE handle = (HANDLE)hf;
2208 DWORD dwWritten;
2209 BOOL res;
2210
2211 res = WriteFile(handle, memory, cb, &dwWritten, NULL);
2212 ok(res, "Failed to WriteFile\n");
2213
2214 return dwWritten;
2215 }
2216
2217 static int CDECL fci_close(INT_PTR hf, int *err, void *pv)
2218 {
2219 HANDLE handle = (HANDLE)hf;
2220 ok(CloseHandle(handle), "Failed to CloseHandle\n");
2221
2222 return 0;
2223 }
2224
2225 static LONG CDECL fci_seek(INT_PTR hf, LONG dist, int seektype, int *err, void *pv)
2226 {
2227 HANDLE handle = (HANDLE)hf;
2228 DWORD ret;
2229
2230 ret = SetFilePointer(handle, dist, NULL, seektype);
2231 ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n");
2232
2233 return ret;
2234 }
2235
2236 static int CDECL fci_delete(char *pszFile, int *err, void *pv)
2237 {
2238 BOOL ret = DeleteFileA(pszFile);
2239 ok(ret, "Failed to DeleteFile %s\n", pszFile);
2240
2241 return 0;
2242 }
2243
2244 static void init_functionpointers(void)
2245 {
2246 HMODULE hmsi = GetModuleHandleA("msi.dll");
2247 HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll");
2248 HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
2249
2250 #define GET_PROC(mod, func) \
2251 p ## func = (void*)GetProcAddress(mod, #func); \
2252 if(!p ## func) \
2253 trace("GetProcAddress(%s) failed\n", #func);
2254
2255 GET_PROC(hmsi, MsiQueryComponentStateA);
2256 GET_PROC(hmsi, MsiSourceListEnumSourcesA);
2257 GET_PROC(hmsi, MsiSourceListGetInfoA);
2258 GET_PROC(hmsi, MsiGetComponentPathExA);
2259 GET_PROC(hmsi, MsiQueryFeatureStateExA);
2260
2261 GET_PROC(hadvapi32, CheckTokenMembership);
2262 GET_PROC(hadvapi32, ConvertSidToStringSidA);
2263 GET_PROC(hadvapi32, OpenProcessToken);
2264 GET_PROC(hadvapi32, RegDeleteKeyExA)
2265 GET_PROC(hkernel32, IsWow64Process)
2266
2267 hsrclient = LoadLibraryA("srclient.dll");
2268 GET_PROC(hsrclient, SRRemoveRestorePoint);
2269 GET_PROC(hsrclient, SRSetRestorePointA);
2270
2271 #undef GET_PROC
2272 }
2273
2274 static BOOL is_process_limited(void)
2275 {
2276 SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
2277 PSID Group = NULL;
2278 BOOL IsInGroup;
2279 HANDLE token;
2280
2281 if (!pCheckTokenMembership || !pOpenProcessToken) return FALSE;
2282
2283 if (!AllocateAndInitializeSid(&NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID,
2284 DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &Group) ||
2285 !pCheckTokenMembership(NULL, Group, &IsInGroup))
2286 {
2287 trace("Could not check if the current user is an administrator\n");
2288 FreeSid(Group);
2289 return FALSE;
2290 }
2291 FreeSid(Group);
2292
2293 if (!IsInGroup)
2294 {
2295 /* Only administrators have enough privileges for these tests */
2296 return TRUE;
2297 }
2298
2299 if (pOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token))
2300 {
2301 BOOL ret;
2302 TOKEN_ELEVATION_TYPE type = TokenElevationTypeDefault;
2303 DWORD size;
2304
2305 ret = GetTokenInformation(token, TokenElevationType, &type, sizeof(type), &size);
2306 CloseHandle(token);
2307 return (ret && type == TokenElevationTypeLimited);
2308 }
2309 return FALSE;
2310 }
2311
2312 static char *get_user_sid(void)
2313 {
2314 HANDLE token;
2315 DWORD size = 0;
2316 TOKEN_USER *user;
2317 char *usersid = NULL;
2318
2319 if (!pConvertSidToStringSidA)
2320 {
2321 win_skip("ConvertSidToStringSidA is not available\n");
2322 return NULL;
2323 }
2324 OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token);
2325 GetTokenInformation(token, TokenUser, NULL, size, &size);
2326
2327 user = HeapAlloc(GetProcessHeap(), 0, size);
2328 GetTokenInformation(token, TokenUser, user, size, &size);
2329 pConvertSidToStringSidA(user->User.Sid, &usersid);
2330 HeapFree(GetProcessHeap(), 0, user);
2331
2332 CloseHandle(token);
2333 return usersid;
2334 }
2335
2336 static BOOL CDECL get_temp_file(char *pszTempName, int cbTempName, void *pv)
2337 {
2338 LPSTR tempname;
2339
2340 tempname = HeapAlloc(GetProcessHeap(), 0, MAX_PATH);
2341 GetTempFileNameA(".", "xx", 0, tempname);
2342
2343 if (tempname && (strlen(tempname) < (unsigned)cbTempName))
2344 {
2345 lstrcpyA(pszTempName, tempname);
2346 HeapFree(GetProcessHeap(), 0, tempname);
2347 return TRUE;
2348 }
2349
2350 HeapFree(GetProcessHeap(), 0, tempname);
2351
2352 return FALSE;
2353 }
2354
2355 static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
2356 USHORT *pattribs, int *err, void *pv)
2357 {
2358 BY_HANDLE_FILE_INFORMATION finfo;
2359 FILETIME filetime;
2360 HANDLE handle;
2361 DWORD attrs;
2362 BOOL res;
2363
2364 handle = CreateFileA(pszName, GENERIC_READ, FILE_SHARE_READ, NULL,
2365 OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, NULL);
2366
2367 ok(handle != INVALID_HANDLE_VALUE, "Failed to CreateFile %s\n", pszName);
2368
2369 res = GetFileInformationByHandle(handle, &finfo);
2370 ok(res, "Expected GetFileInformationByHandle to succeed\n");
2371
2372 FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime);
2373 FileTimeToDosDateTime(&filetime, pdate, ptime);
2374
2375 attrs = GetFileAttributesA(pszName);
2376 ok(attrs != INVALID_FILE_ATTRIBUTES, "Failed to GetFileAttributes\n");
2377
2378 return (INT_PTR)handle;
2379 }
2380
2381 static BOOL add_file(HFCI hfci, const char *file, TCOMP compress)
2382 {
2383 char path[MAX_PATH];
2384 char filename[MAX_PATH];
2385
2386 lstrcpyA(path, CURR_DIR);
2387 lstrcatA(path, "\\");
2388 lstrcatA(path, file);
2389
2390 lstrcpyA(filename, file);
2391
2392 return FCIAddFile(hfci, path, filename, FALSE, get_next_cabinet,
2393 progress, get_open_info, compress);
2394 }
2395
2396 static void set_cab_parameters(PCCAB pCabParams, const CHAR *name, DWORD max_size)
2397 {
2398 ZeroMemory(pCabParams, sizeof(CCAB));
2399
2400 pCabParams->cb = max_size;
2401 pCabParams->cbFolderThresh = FOLDER_THRESHOLD;
2402 pCabParams->setID = 0xbeef;
2403 pCabParams->iCab = 1;
2404 lstrcpyA(pCabParams->szCabPath, CURR_DIR);
2405 lstrcatA(pCabParams->szCabPath, "\\");
2406 lstrcpyA(pCabParams->szCab, name);
2407 }
2408
2409 static void create_cab_file(const CHAR *name, DWORD max_size, const CHAR *files)
2410 {
2411 CCAB cabParams;
2412 LPCSTR ptr;
2413 HFCI hfci;
2414 ERF erf;
2415 BOOL res;
2416
2417 set_cab_parameters(&cabParams, name, max_size);
2418
2419 hfci = FCICreate(&erf, file_placed, mem_alloc, mem_free, fci_open,
2420 fci_read, fci_write, fci_close, fci_seek, fci_delete,
2421 get_temp_file, &cabParams, NULL);
2422
2423 ok(hfci != NULL, "Failed to create an FCI context\n");
2424
2425 ptr = files;
2426 while (*ptr)
2427 {
2428 res = add_file(hfci, ptr, tcompTYPE_MSZIP);
2429 ok(res, "Failed to add file: %s\n", ptr);
2430 ptr += lstrlenA(ptr) + 1;
2431 }
2432
2433 res = FCIFlushCabinet(hfci, FALSE, get_next_cabinet, progress);
2434 ok(res, "Failed to flush the cabinet\n");
2435
2436 res = FCIDestroy(hfci);
2437 ok(res, "Failed to destroy the cabinet\n");
2438 }
2439
2440 static BOOL get_user_dirs(void)
2441 {
2442 HKEY hkey;
2443 DWORD type, size;
2444
2445 if (RegOpenKeyA(HKEY_CURRENT_USER,
2446 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &hkey))
2447 return FALSE;
2448
2449 size = MAX_PATH;
2450 if (RegQueryValueExA(hkey, "AppData", 0, &type, (LPBYTE)APP_DATA_DIR, &size))
2451 {
2452 RegCloseKey(hkey);
2453 return FALSE;
2454 }
2455
2456 RegCloseKey(hkey);
2457 return TRUE;
2458 }
2459
2460 static BOOL get_system_dirs(void)
2461 {
2462 HKEY hkey;
2463 DWORD type, size;
2464
2465 if (RegOpenKeyA(HKEY_LOCAL_MACHINE,
2466 "Software\\Microsoft\\Windows\\CurrentVersion", &hkey))
2467 return FALSE;
2468
2469 size = MAX_PATH;
2470 if (RegQueryValueExA(hkey, "ProgramFilesDir (x86)", 0, &type, (LPBYTE)PROG_FILES_DIR, &size) &&
2471 RegQueryValueExA(hkey, "ProgramFilesDir", 0, &type, (LPBYTE)PROG_FILES_DIR, &size))
2472 {
2473 RegCloseKey(hkey);
2474 return FALSE;
2475 }
2476
2477 size = MAX_PATH;
2478 if (RegQueryValueExA(hkey, "CommonFilesDir (x86)", 0, &type, (LPBYTE)COMMON_FILES_DIR, &size) &&
2479 RegQueryValueExA(hkey, "CommonFilesDir", 0, &type, (LPBYTE)COMMON_FILES_DIR, &size))
2480 {
2481 RegCloseKey(hkey);
2482 return FALSE;
2483 }
2484
2485 RegCloseKey(hkey);
2486
2487 if (!GetWindowsDirectoryA(WINDOWS_DIR, MAX_PATH))
2488 return FALSE;
2489
2490 return TRUE;
2491 }
2492
2493 static void create_file_data(LPCSTR name, LPCSTR data, DWORD size)
2494 {
2495 HANDLE file;
2496 DWORD written;
2497
2498 file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
2499 if (file == INVALID_HANDLE_VALUE)
2500 return;
2501
2502 WriteFile(file, data, strlen(data), &written, NULL);
2503
2504 if (size)
2505 {
2506 SetFilePointer(file, size, NULL, FILE_BEGIN);
2507 SetEndOfFile(file);
2508 }
2509
2510 CloseHandle(file);
2511 }
2512
2513 #define create_file(name, size) create_file_data(name, name, size)
2514
2515 static void create_test_files(void)
2516 {
2517 CreateDirectoryA("msitest", NULL);
2518 create_file("msitest\\one.txt", 100);
2519 CreateDirectoryA("msitest\\first", NULL);
2520 create_file("msitest\\first\\two.txt", 100);
2521 CreateDirectoryA("msitest\\second", NULL);
2522 create_file("msitest\\second\\three.txt", 100);
2523
2524 create_file("four.txt", 100);
2525 create_file("five.txt", 100);
2526 create_cab_file("msitest.cab", MEDIA_SIZE, "four.txt\0five.txt\0");
2527
2528 create_file("msitest\\filename", 100);
2529 create_file("msitest\\service.exe", 100);
2530 create_file("msitest\\service2.exe", 100);
2531
2532 DeleteFileA("four.txt");
2533 DeleteFileA("five.txt");
2534 }
2535
2536 static BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
2537 {
2538 CHAR path[MAX_PATH];
2539
2540 lstrcpyA(path, PROG_FILES_DIR);
2541 lstrcatA(path, "\\");
2542 lstrcatA(path, rel_path);
2543
2544 if (is_file)
2545 return DeleteFileA(path);
2546 else
2547 return RemoveDirectoryA(path);
2548 }
2549
2550 static void delete_test_files(void)
2551 {
2552 DeleteFileA("msitest.msi");
2553 DeleteFileA("msitest.cab");
2554 DeleteFileA("msitest\\second\\three.txt");
2555 DeleteFileA("msitest\\first\\two.txt");
2556 DeleteFileA("msitest\\one.txt");
2557 DeleteFileA("msitest\\service.exe");
2558 DeleteFileA("msitest\\service2.exe");
2559 DeleteFileA("msitest\\filename");
2560 RemoveDirectoryA("msitest\\second");
2561 RemoveDirectoryA("msitest\\first");
2562 RemoveDirectoryA("msitest");
2563 }
2564
2565 static void write_file(const CHAR *filename, const char *data, int data_size)
2566 {
2567 DWORD size;
2568 HANDLE hf = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
2569 WriteFile(hf, data, data_size, &size, NULL);
2570 CloseHandle(hf);
2571 }
2572
2573 static void write_msi_summary_info(MSIHANDLE db, INT version, INT wordcount, const char *template)
2574 {
2575 MSIHANDLE summary;
2576 UINT r;
2577
2578 r = MsiGetSummaryInformationA(db, NULL, 5, &summary);
2579 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2580
2581 r = MsiSummaryInfoSetPropertyA(summary, PID_TEMPLATE, VT_LPSTR, 0, NULL, template);
2582 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2583
2584 r = MsiSummaryInfoSetPropertyA(summary, PID_REVNUMBER, VT_LPSTR, 0, NULL,
2585 "{004757CA-5092-49C2-AD20-28E1CE0DF5F2}");
2586 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2587
2588 r = MsiSummaryInfoSetPropertyA(summary, PID_PAGECOUNT, VT_I4, version, NULL, NULL);
2589 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2590
2591 r = MsiSummaryInfoSetPropertyA(summary, PID_WORDCOUNT, VT_I4, wordcount, NULL, NULL);
2592 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2593
2594 r = MsiSummaryInfoSetPropertyA(summary, PID_TITLE, VT_LPSTR, 0, NULL, "MSITEST");
2595 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2596
2597 /* write the summary changes back to the stream */
2598 r = MsiSummaryInfoPersist(summary);
2599 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2600
2601 MsiCloseHandle(summary);
2602 }
2603
2604 #define create_database(name, tables, num_tables) \
2605 create_database_wordcount(name, tables, num_tables, 100, 0, ";1033");
2606
2607 #define create_database_template(name, tables, num_tables, version, template) \
2608 create_database_wordcount(name, tables, num_tables, version, 0, template);
2609
2610 static void create_database_wordcount(const CHAR *name, const msi_table *tables,
2611 int num_tables, INT version, INT wordcount,
2612 const char *template)
2613 {
2614 MSIHANDLE db;
2615 UINT r;
2616 WCHAR *nameW;
2617 int j, len;
2618
2619 len = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
2620 if (!(nameW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return;
2621 MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, len );
2622
2623 r = MsiOpenDatabaseW(nameW, MSIDBOPEN_CREATE, &db);
2624 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2625
2626 /* import the tables into the database */
2627 for (j = 0; j < num_tables; j++)
2628 {
2629 const msi_table *table = &tables[j];
2630
2631 write_file(table->filename, table->data, (table->size - 1) * sizeof(char));
2632
2633 r = MsiDatabaseImportA(db, CURR_DIR, table->filename);
2634 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2635
2636 DeleteFileA(table->filename);
2637 }
2638
2639 write_msi_summary_info(db, version, wordcount, template);
2640
2641 r = MsiDatabaseCommit(db);
2642 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2643
2644 MsiCloseHandle(db);
2645 HeapFree( GetProcessHeap(), 0, nameW );
2646 }
2647
2648 static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status)
2649 {
2650 RESTOREPOINTINFOA spec;
2651
2652 spec.dwEventType = event_type;
2653 spec.dwRestorePtType = APPLICATION_INSTALL;
2654 spec.llSequenceNumber = status->llSequenceNumber;
2655 lstrcpyA(spec.szDescription, "msitest restore point");
2656
2657 return pSRSetRestorePointA(&spec, status);
2658 }
2659
2660 static void remove_restore_point(DWORD seq_number)
2661 {
2662 DWORD res;
2663
2664 res = pSRRemoveRestorePoint(seq_number);
2665 if (res != ERROR_SUCCESS)
2666 trace("Failed to remove the restore point : %08x\n", res);
2667 }
2668
2669 static LONG delete_key( HKEY key, LPCSTR subkey, REGSAM access )
2670 {
2671 if (pRegDeleteKeyExA)
2672 return pRegDeleteKeyExA( key, subkey, access, 0 );
2673 return RegDeleteKeyA( key, subkey );
2674 }
2675
2676 static BOOL file_exists(LPCSTR file)
2677 {
2678 return GetFileAttributesA(file) != INVALID_FILE_ATTRIBUTES;
2679 }
2680
2681 static BOOL pf_exists(LPCSTR file)
2682 {
2683 CHAR path[MAX_PATH];
2684
2685 lstrcpyA(path, PROG_FILES_DIR);
2686 lstrcatA(path, "\\");
2687 lstrcatA(path, file);
2688
2689 return file_exists(path);
2690 }
2691
2692 static void delete_pfmsitest_files(void)
2693 {
2694 SHFILEOPSTRUCTA shfl;
2695 CHAR path[MAX_PATH+11];
2696
2697 lstrcpyA(path, PROG_FILES_DIR);
2698 lstrcatA(path, "\\msitest\\*");
2699 path[strlen(path) + 1] = '\0';
2700
2701 shfl.hwnd = NULL;
2702 shfl.wFunc = FO_DELETE;
2703 shfl.pFrom = path;
2704 shfl.pTo = NULL;
2705 shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT | FOF_NOERRORUI;
2706
2707 SHFileOperationA(&shfl);
2708
2709 lstrcpyA(path, PROG_FILES_DIR);
2710 lstrcatA(path, "\\msitest");
2711 RemoveDirectoryA(path);
2712 }
2713
2714 static void check_reg_str(HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase, DWORD line)
2715 {
2716 char val[MAX_PATH];
2717 DWORD size, type;
2718 LONG res;
2719
2720 size = MAX_PATH;
2721 val[0] = '\0';
2722 res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)val, &size);
2723
2724 if (res != ERROR_SUCCESS ||
2725 (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_MULTI_SZ))
2726 {
2727 ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n");
2728 return;
2729 }
2730
2731 if (!expected)
2732 ok_(__FILE__, line)(!val[0], "Expected empty string, got %s\n", val);
2733 else
2734 {
2735 if (bcase)
2736 ok_(__FILE__, line)(!lstrcmpA(val, expected), "Expected %s, got %s\n", expected, val);
2737 else
2738 ok_(__FILE__, line)(!lstrcmpiA(val, expected), "Expected %s, got %s\n", expected, val);
2739 }
2740 }
2741
2742 static void check_reg_dword(HKEY prodkey, LPCSTR name, DWORD expected, DWORD line)
2743 {
2744 DWORD val, size, type;
2745 LONG res;
2746
2747 size = sizeof(DWORD);
2748 res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size);
2749
2750 if (res != ERROR_SUCCESS || type != REG_DWORD)
2751 {
2752 ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n");
2753 return;
2754 }
2755
2756 ok_(__FILE__, line)(val == expected, "Expected %d, got %d\n", expected, val);
2757 }
2758
2759 static void check_reg_dword4(HKEY prodkey, LPCSTR name, DWORD expected1, DWORD expected2, DWORD expected3,
2760 DWORD expected4, DWORD line)
2761 {
2762 DWORD val, size, type;
2763 LONG res;
2764
2765 size = sizeof(DWORD);
2766 res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size);
2767
2768 if (res != ERROR_SUCCESS || type != REG_DWORD)
2769 {
2770 ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n");
2771 return;
2772 }
2773
2774 ok_(__FILE__, line)(val == expected1 || val == expected2 || val == expected3 || val == expected4,
2775 "Expected %d, %d, %d or %d, got %d\n", expected1, expected2, expected3, expected4, val);
2776 }
2777
2778 static void check_reg_dword5(HKEY prodkey, LPCSTR name, DWORD expected1, DWORD expected2, DWORD expected3,
2779 DWORD expected4, DWORD expected5, DWORD line)
2780 {
2781 DWORD val, size, type;
2782 LONG res;
2783
2784 size = sizeof(DWORD);
2785 res = RegQueryValueExA(prodkey, name, NULL, &type, (LPBYTE)&val, &size);
2786
2787 if (res != ERROR_SUCCESS || type != REG_DWORD)
2788 {
2789 ok_(__FILE__, line)(FALSE, "Key doesn't exist or wrong type\n");
2790 return;
2791 }
2792
2793 ok_(__FILE__, line)(val == expected1 || val == expected2 || val == expected3 || val == expected4 ||
2794 val == expected5,
2795 "Expected %d, %d, %d, %d or %d, got %d\n", expected1, expected2, expected3, expected4, expected5, val);
2796 }
2797
2798 #define CHECK_REG_STR(prodkey, name, expected) \
2799 check_reg_str(prodkey, name, expected, TRUE, __LINE__);
2800
2801 #define CHECK_DEL_REG_STR(prodkey, name, expected) \
2802 do { \
2803 check_reg_str(prodkey, name, expected, TRUE, __LINE__); \
2804 RegDeleteValueA(prodkey, name); \
2805 } while(0)
2806
2807 #define CHECK_REG_ISTR(prodkey, name, expected) \
2808 check_reg_str(prodkey, name, expected, FALSE, __LINE__);
2809
2810 #define CHECK_DEL_REG_ISTR(prodkey, name, expected) \
2811 do { \
2812 check_reg_str(prodkey, name, expected, FALSE, __LINE__); \
2813 RegDeleteValueA(prodkey, name); \
2814 } while(0)
2815
2816 #define CHECK_REG_DWORD(prodkey, name, expected) \
2817 check_reg_dword(prodkey, name, expected, __LINE__);
2818
2819 #define CHECK_DEL_REG_DWORD(prodkey, name, expected) \
2820 do { \
2821 check_reg_dword(prodkey, name, expected, __LINE__); \
2822 RegDeleteValueA(prodkey, name); \
2823 } while(0)
2824
2825 #define CHECK_REG_DWORD2(prodkey, name, expected1, expected2) \
2826 check_reg_dword2(prodkey, name, expected1, expected2, __LINE__);
2827
2828 #define CHECK_DEL_REG_DWORD2(prodkey, name, expected1, expected2) \
2829 do { \
2830 check_reg_dword2(prodkey, name, expected1, expected2, __LINE__); \
2831 RegDeleteValueA(prodkey, name); \
2832 } while(0)
2833
2834 #define CHECK_REG_DWORD4(prodkey, name, expected1, expected2, expected3, expected4) \
2835 check_reg_dword4(prodkey, name, expected1, expected2, expected3, expected4, __LINE__);
2836
2837 #define CHECK_DEL_REG_DWORD5(prodkey, name, expected1, expected2, expected3, expected4 ,expected5) \
2838 do { \
2839 check_reg_dword5(prodkey, name, expected1, expected2, expected3, expected4, expected5, __LINE__); \
2840 RegDeleteValueA(prodkey, name); \
2841 } while(0)
2842
2843 static void get_date_str(LPSTR date)
2844 {
2845 SYSTEMTIME systime;
2846
2847 static const char date_fmt[] = "%d%02d%02d";
2848 GetLocalTime(&systime);
2849 sprintf(date, date_fmt, systime.wYear, systime.wMonth, systime.wDay);
2850 }
2851
2852 static void test_register_product(void)
2853 {
2854 UINT r;
2855 LONG res;
2856 HKEY hkey, props, usage;
2857 LPSTR usersid;
2858 char date[MAX_PATH], temp[MAX_PATH], keypath[MAX_PATH], path[MAX_PATH];
2859 DWORD size, type;
2860 REGSAM access = KEY_ALL_ACCESS;
2861
2862 static const CHAR uninstall[] = "Software\\Microsoft\\Windows\\CurrentVersion"
2863 "\\Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
2864 static const CHAR uninstall_32node[] = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion"
2865 "\\Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
2866 static const CHAR userdata[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
2867 "\\UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2868 static const CHAR ugkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
2869 "\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
2870 static const CHAR userugkey[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
2871 "\\51AAE0C44620A5E4788506E91F249BD2";
2872
2873 if (is_process_limited())
2874 {
2875 skip("process is limited\n");
2876 return;
2877 }
2878
2879 if (!(usersid = get_user_sid()))
2880 return;
2881
2882 get_date_str(date);
2883 GetTempPathA(MAX_PATH, temp);
2884
2885 CreateDirectoryA("msitest", NULL);
2886 create_file("msitest\\maximus", 500);
2887
2888 create_database(msifile, pp_tables, sizeof(pp_tables) / sizeof(msi_table));
2889
2890 if (is_wow64)
2891 access |= KEY_WOW64_64KEY;
2892
2893 MsiSetInternalUI(INSTALLUILEVEL_FULL, NULL);
2894
2895 /* RegisterProduct */
2896 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1");
2897 if (r == ERROR_INSTALL_PACKAGE_REJECTED)
2898 {
2899 skip("Not enough rights to perform tests\n");
2900 goto error;
2901 }
2902 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
2903 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2904 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2905
2906 res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey);
2907 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
2908
2909 if (is_64bit)
2910 {
2911 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey);
2912 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
2913 }
2914 else
2915 {
2916 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_ALL_ACCESS, &hkey);
2917 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
2918 }
2919
2920 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2921 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2922 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2923 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2924 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2925 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2926 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2927 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", NULL);
2928 CHECK_DEL_REG_STR(hkey, "Comments", NULL);
2929 CHECK_DEL_REG_STR(hkey, "Contact", NULL);
2930 CHECK_DEL_REG_STR(hkey, "HelpLink", NULL);
2931 CHECK_DEL_REG_STR(hkey, "HelpTelephone", NULL);
2932 CHECK_DEL_REG_STR(hkey, "InstallLocation", NULL);
2933 CHECK_DEL_REG_STR(hkey, "Readme", NULL);
2934 CHECK_DEL_REG_STR(hkey, "Size", NULL);
2935 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", NULL);
2936 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", NULL);
2937 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2938 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2939 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2940 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2941 CHECK_DEL_REG_DWORD(hkey,