ReactOS 0.4.16-dev-112-g52265ae
action.c
Go to the documentation of this file.
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#define COBJMACROS
27#include <windows.h>
28#include <msiquery.h>
29#include <msidefs.h>
30#include <msi.h>
31#include <fci.h>
32#include <wtypes.h>
33#include <shellapi.h>
34#include <winsvc.h>
35#include <odbcinst.h>
36#ifdef __REACTOS__
37#include <oleauto.h>
38#endif
39#include <sddl.h>
40
41#include "wine/test.h"
42#include "utils.h"
43#include "typelib.h"
44
46static const BOOL is_64bit = sizeof(void *) > sizeof(int);
47
48static const char *msifile = "msitest.msi";
49
50/* msi database data */
51
52static const char component_dat[] =
53 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
54 "s72\tS38\ts72\ti2\tS255\tS72\n"
55 "Component\tComponent\n"
56 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
57 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
58 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n"
59 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
60 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
61 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
62 "component\t\tMSITESTDIR\t0\t1\tfile\n"
63 "service_comp\t{935A0A91-22A3-4F87-BCA8-928FFDFE2353}\tMSITESTDIR\t0\t\tservice_file\n"
64 "service_comp2\t{3F7B04A4-9521-4649-BDC9-0C8722740A49}\tMSITESTDIR\t0\t\tservice_file2\n"
65 "service_comp3\t{DBCD1502-20E3-423F-B53E-F37E263CDC7E}\tMSITESTDIR\t0\t\t\n";
66
67static const char directory_dat[] =
68 "Directory\tDirectory_Parent\tDefaultDir\n"
69 "s72\tS72\tl255\n"
70 "Directory\tDirectory\n"
71 "CABOUTDIR\tMSITESTDIR\tcabout\n"
72 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
73 "FIRSTDIR\tMSITESTDIR\tfirst\n"
74 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
75 "NEWDIR\tCABOUTDIR\tnew\n"
76 "ProgramFilesFolder\tTARGETDIR\t.\n"
77 "TARGETDIR\t\tSourceDir";
78
79static const char feature_dat[] =
80 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
81 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
82 "Feature\tFeature\n"
83 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
84 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
85 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
86 "Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
87 "Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
88 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n"
89 "service_feature\t\t\t\t2\t1\tTARGETDIR\t0";
90
91static const char feature_comp_dat[] =
92 "Feature_\tComponent_\n"
93 "s38\ts72\n"
94 "FeatureComponents\tFeature_\tComponent_\n"
95 "Five\tFive\n"
96 "Four\tFour\n"
97 "One\tOne\n"
98 "Three\tThree\n"
99 "Two\tTwo\n"
100 "feature\tcomponent\n"
101 "service_feature\tservice_comp\n"
102 "service_feature\tservice_comp2\n"
103 "service_feature\tservice_comp3";
104
105static const char file_dat[] =
106 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
107 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
108 "File\tFile\n"
109 "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
110 "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
111 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
112 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
113 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
114 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
115 "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t6\n"
116 "service_file2\tservice_comp2\tservice2.exe\t100\t\t\t8192\t7";
117
118static const char install_exec_seq_dat[] =
119 "Action\tCondition\tSequence\n"
120 "s72\tS255\tI2\n"
121 "InstallExecuteSequence\tAction\n"
122 "AllocateRegistrySpace\tNOT Installed\t1550\n"
123 "CostFinalize\t\t1000\n"
124 "CostInitialize\t\t800\n"
125 "FileCost\t\t900\n"
126 "ResolveSource\t\t950\n"
127 "MoveFiles\t\t1700\n"
128 "InstallFiles\t\t4000\n"
129 "DuplicateFiles\t\t4500\n"
130 "CreateShortcuts\t\t4600\n"
131 "InstallServices\t\t5000\n"
132 "InstallFinalize\t\t6600\n"
133 "InstallInitialize\t\t1500\n"
134 "InstallValidate\t\t1400\n"
135 "LaunchConditions\t\t100\n"
136 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000";
137
138static const char media_dat[] =
139 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
140 "i2\ti4\tL64\tS255\tS32\tS72\n"
141 "Media\tDiskId\n"
142 "1\t3\t\t\tDISK1\t\n"
143 "2\t7\t\tmsitest.cab\tDISK2\t\n";
144
145static const char property_dat[] =
146 "Property\tValue\n"
147 "s72\tl0\n"
148 "Property\tProperty\n"
149 "DefaultUIFont\tDlgFont8\n"
150 "HASUIRUN\t0\n"
151 "INSTALLLEVEL\t3\n"
152 "InstallMode\tTypical\n"
153 "Manufacturer\tWine\n"
154 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
155 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
156 "ProductID\tnone\n"
157 "ProductLanguage\t1033\n"
158 "ProductName\tMSITEST\n"
159 "ProductVersion\t1.1.1\n"
160 "PROMPTROLLBACKCOST\tP\n"
161 "Setup\tSetup\n"
162 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
163 "AdminProperties\tPOSTADMIN\n"
164 "ROOTDRIVE\tC:\\\n"
165 "SERVNAME\tTestService\n"
166 "SERVNAME2\tTestService2\n"
167 "SERVDISP\tTestServiceDisp\n"
168 "SERVDISP2\tTestServiceDisp2\n"
169 "MSIFASTINSTALL\t1\n"
170 "ARPNOMODIFY\t1\n"
171 "regdata17\t#1\n";
172
173static const char env_install_exec_seq_dat[] =
174 "Action\tCondition\tSequence\n"
175 "s72\tS255\tI2\n"
176 "InstallExecuteSequence\tAction\n"
177 "CostInitialize\t\t100\n"
178 "FileCost\t\t200\n"
179 "CostFinalize\t\t300\n"
180 "InstallValidate\t\t400\n"
181 "InstallInitialize\t\t500\n"
182 "ProcessComponents\t\t600\n"
183 "WriteEnvironmentStrings\t\t700\n"
184 "wes_immediate\tNOT REMOVE\t701\n"
185 "wes_deferred\tNOT REMOVE\t702\n"
186 "RemoveEnvironmentStrings\t\t800\n"
187 "res_immediate\tREMOVE\t801\n"
188 "res_deferred\tREMOVE\t802\n"
189 "RegisterProduct\t\t900\n"
190 "PublishFeatures\t\t1000\n"
191 "PublishProduct\t\t1100\n"
192 "UnpublishFeatures\t\t1150\n"
193 "InstallFinalize\t\t1200\n";
194
195static const char env_custom_action_dat[] =
196 "Action\tType\tSource\tTarget\n"
197 "s72\ti2\tS64\tS0\n"
198 "CustomAction\tAction\n"
199 "wes_immediate\t1\tcustom.dll\tenv_absent\n"
200 "wes_deferred\t1025\tcustom.dll\tenv_present\n"
201 "res_immediate\t1\tcustom.dll\tenv_present\n"
202 "res_deferred\t1025\tcustom.dll\tenv_absent\n";
203
204static const char env_environment_dat[] =
205 "Environment\tName\tValue\tComponent_\n"
206 "s72\tl255\tL255\ts72\n"
207 "Environment\tEnvironment\n"
208 "Var1\t=-MSITESTVAR1\t1\tOne\n"
209 "Var2\tMSITESTVAR2\t1\tOne\n"
210 "Var3\t=-MSITESTVAR3\t1\tOne\n"
211 "Var4\tMSITESTVAR4\t1\tOne\n"
212 "Var5\t-MSITESTVAR5\t\tOne\n"
213 "Var6\tMSITESTVAR6\t\tOne\n"
214 "Var7\t!-MSITESTVAR7\t\tOne\n"
215 "Var8\t!-*MSITESTVAR8\t\tOne\n"
216 "Var9\t=-MSITESTVAR9\t\tOne\n"
217 "Var10\t=MSITESTVAR10\t\tOne\n"
218 "Var11\t+-MSITESTVAR11\t[~];1\tOne\n"
219 "Var12\t+-MSITESTVAR11\t[~];2\tOne\n"
220 "Var13\t+-MSITESTVAR12\t[~];1\tOne\n"
221 "Var14\t=MSITESTVAR13\t[~];1\tOne\n"
222 "Var15\t=MSITESTVAR13\t[~];2\tOne\n"
223 "Var16\t=MSITESTVAR14\t;1;\tOne\n"
224 "Var17\t=MSITESTVAR15\t;;1;;\tOne\n"
225 "Var18\t=MSITESTVAR16\t 1 \tOne\n"
226 "Var19\t+-MSITESTVAR17\t1\tOne\n"
227 "Var20\t+-MSITESTVAR17\t;;2;;[~]\tOne\n"
228 "Var21\t+-MSITESTVAR18\t1\tOne\n"
229 "Var22\t+-MSITESTVAR18\t[~];;2;;\tOne\n"
230 "Var23\t+-MSITESTVAR19\t1\tOne\n"
231 "Var24\t+-MSITESTVAR19\t[~]2\tOne\n"
232 "Var25\t+-MSITESTVAR20\t1\tOne\n"
233 "Var26\t+-MSITESTVAR20\t2[~]\tOne\n"
234 "Var27\t+-MSITESTVAR21\t[~];1\tOne\n"
235 "Var28\t-MSITESTVAR22\t1\tOne\n"
236 "Var29\t-MSITESTVAR23\t2\tOne\n"
237 "Var30\t*MSITESTVAR100\t1\tOne\n"
238 "Var31\t-=MSITESTVAR24\t[SERVNAME]\tOne\n"
239 "Var32\t-=MSITESTVAR25\t[bogus_prop]\tOne\n";
240
241static const char service_install_dat[] =
242 "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
243 "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
244 "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
245 "ServiceInstall\tServiceInstall\n"
246 "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService\t\t-a arg\tservice_comp\tdescription\n"
247 "TestService2\t[SERVNAME2]\t[SERVDISP2]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService2\t\t-a arg\tservice_comp2\tdescription\n";
248
249static const char service_install2_dat[] =
250 "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
251 "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
252 "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
253 "ServiceInstall\tServiceInstall\n"
254 "TestService\tTestService\tTestService\t2\t3\t32768\t\t\tTestService\t\t\tservice_comp\t\n"
255 "TestService4\tTestService4\tTestService4\t2\t3\t0\t\t\tTestService4\t\t\tservice_comp3\t\n";
256
257static const char service_control_dat[] =
258 "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
259 "s72\tl255\ti2\tL255\tI2\ts72\n"
260 "ServiceControl\tServiceControl\n"
261 "ServiceControl\tTestService3\t8\t\t0\tservice_comp\n"
262 "ServiceControl2\tTestService3\t128\t\t0\tservice_comp2";
263
264static const char sss_service_control_dat[] =
265 "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
266 "s72\tl255\ti2\tL255\tI2\ts72\n"
267 "ServiceControl\tServiceControl\n"
268 "ServiceControl\tSpooler\t1\t\t1\tservice_comp\n"
269 "ServiceControl2\tSpooler\t2\t\t1\tservice_comp\n"
270 "ServiceControl3\tSpooler\t16\t\t1\tservice_comp\n"
271 "ServiceControl4\tSpooler\t32\t\t1\tservice_comp\n";
272
273static const char sss_install_exec_seq_dat[] =
274 "Action\tCondition\tSequence\n"
275 "s72\tS255\tI2\n"
276 "InstallExecuteSequence\tAction\n"
277 "LaunchConditions\t\t100\n"
278 "CostInitialize\t\t800\n"
279 "FileCost\t\t900\n"
280 "ResolveSource\t\t950\n"
281 "CostFinalize\t\t1000\n"
282 "InstallValidate\t\t1400\n"
283 "InstallInitialize\t\t1500\n"
284 "StopServices\t\t4000\n"
285 "stop_immediate\tNOT REMOVE\t4001\n"
286 "stop_deferred\tNOT REMOVE\t4002\n"
287 "DeleteServices\t\t5000\n"
288 "MoveFiles\t\t5100\n"
289 "InstallFiles\t\t5200\n"
290 "DuplicateFiles\t\t5300\n"
291 "StartServices\t\t5400\n"
292 "start_deferred\tNOT REMOVE\t5401\n"
293 "RegisterProduct\t\t5500\n"
294 "PublishFeatures\t\t5600\n"
295 "PublishProduct\t\t5700\n"
296 "UnpublishFeatures\t\t5800\n"
297 "InstallFinalize\t\t6000\n";
298
299static const char sss_custom_action_dat[] =
300 "Action\tType\tSource\tTarget\n"
301 "s72\ti2\tS64\tS0\n"
302 "CustomAction\tAction\n"
303 "stop_immediate\t1\tcustom.dll\tsss_started\n"
304 "stop_deferred\t1025\tcustom.dll\tsss_stopped\n"
305 "start_deferred\t1025\tcustom.dll\tsss_started\n";
306
307static const char sds_install_exec_seq_dat[] =
308 "Action\tCondition\tSequence\n"
309 "s72\tS255\tI2\n"
310 "InstallExecuteSequence\tAction\n"
311 "LaunchConditions\t\t100\n"
312 "CostInitialize\t\t800\n"
313 "FileCost\t\t900\n"
314 "ResolveSource\t\t950\n"
315 "CostFinalize\t\t1000\n"
316 "InstallValidate\t\t1400\n"
317 "InstallInitialize\t\t1500\n"
318 "StopServices\t\t5000\n"
319 "DeleteServices\t\t5050\n"
320 "sds_immediate\tNOT REMOVE\t5051\n"
321 "sds_deferred\tNOT REMOVE\t5052\n"
322 "MoveFiles\t\t5100\n"
323 "InstallFiles\t\t5200\n"
324 "DuplicateFiles\t\t5300\n"
325 "InstallServices\t\t5400\n"
326 "StartServices\t\t5450\n"
327 "RegisterProduct\t\t5500\n"
328 "PublishFeatures\t\t5600\n"
329 "PublishProduct\t\t5700\n"
330 "UnpublishFeatures\t\t5800\n"
331 "InstallFinalize\t\t6000\n";
332
333static const char sds_custom_action_dat[] =
334 "Action\tType\tSource\tTarget\n"
335 "s72\ti2\tS64\tS0\n"
336 "CustomAction\tAction\n"
337 "sds_immediate\t1\tcustom.dll\tsds_present\n"
338 "sds_deferred\t1025\tcustom.dll\tsds_absent\n";
339
340static const char sis_install_exec_seq_dat[] =
341 "Action\tCondition\tSequence\n"
342 "s72\tS255\tI2\n"
343 "InstallExecuteSequence\tAction\n"
344 "CostInitialize\t\t800\n"
345 "FileCost\t\t900\n"
346 "CostFinalize\t\t1000\n"
347 "InstallValidate\t\t1400\n"
348 "InstallInitialize\t\t1500\n"
349 "StopServices\t\t5000\n"
350 "DeleteServices\t\t5050\n"
351 "InstallFiles\t\t5200\n"
352 "InstallServices\t\t5400\n"
353 "sis_immediate\tNOT REMOVE\t5401\n"
354 "sis_deferred\tNOT REMOVE\t5402\n"
355 "StartServices\t\t5450\n"
356 "RegisterProduct\t\t5500\n"
357 "PublishFeatures\t\t5600\n"
358 "PublishProduct\t\t5700\n"
359 "UnpublishFeatures\t\t5800\n"
360 "InstallFinalize\t\t6000\n";
361
362static const char sis_custom_action_dat[] =
363 "Action\tType\tSource\tTarget\n"
364 "s72\ti2\tS64\tS0\n"
365 "CustomAction\tAction\n"
366 "sis_immediate\t1\tcustom.dll\tsis_absent\n"
367 "sis_deferred\t1025\tcustom.dll\tsis_present\n";
368
369static const char rof_component_dat[] =
370 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
371 "s72\tS38\ts72\ti2\tS255\tS72\n"
372 "Component\tComponent\n"
373 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n";
374
375static const char rof_feature_dat[] =
376 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
377 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
378 "Feature\tFeature\n"
379 "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
380 "montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0";
381
382static const char rof_feature_comp_dat[] =
383 "Feature_\tComponent_\n"
384 "s38\ts72\n"
385 "FeatureComponents\tFeature_\tComponent_\n"
386 "feature\tmaximus\n"
387 "montecristo\tmaximus";
388
389static const char rof_file_dat[] =
390 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
391 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
392 "File\tFile\n"
393 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1";
394
395static const char rof_media_dat[] =
396 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
397 "i2\ti4\tL64\tS255\tS32\tS72\n"
398 "Media\tDiskId\n"
399 "1\t1\t\t\tDISK1\t\n";
400
401static const char ci2_feature_comp_dat[] =
402 "Feature_\tComponent_\n"
403 "s38\ts72\n"
404 "FeatureComponents\tFeature_\tComponent_\n"
405 "feature\taugustus";
406
407static const char ci2_file_dat[] =
408 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
409 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
410 "File\tFile\n"
411 "augustus\taugustus\taugustus\t500\t\t\t8192\t1";
412
413static const char pp_install_exec_seq_dat[] =
414 "Action\tCondition\tSequence\n"
415 "s72\tS255\tI2\n"
416 "InstallExecuteSequence\tAction\n"
417 "ValidateProductID\t\t700\n"
418 "CostInitialize\t\t800\n"
419 "FileCost\t\t900\n"
420 "CostFinalize\t\t1000\n"
421 "InstallValidate\t\t1400\n"
422 "InstallInitialize\t\t1500\n"
423 "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
424 "ppc_immediate\tPROCESS_COMPONENTS AND ALLUSERS\t1601\n"
425 "ppc_deferred\tPROCESS_COMPONENTS AND ALLUSERS\t1602\n"
426 "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
427 "uf_immediate\tUNPUBLISH_FEATURES AND ALLUSERS\t1801\n"
428 "uf_deferred\tUNPUBLISH_FEATURES AND ALLUSERS\t1802\n"
429 "RemoveFiles\t\t3500\n"
430 "InstallFiles\t\t4000\n"
431 "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
432 "ru_immediate\tREGISTER_USER AND ALLUSERS\t6001\n"
433 "ru_deferred\tREGISTER_USER AND ALLUSERS\t6002\n"
434 "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
435 "rp_immediate\tREGISTER_PRODUCT AND ALLUSERS AND NOT RP_TEST64\t6101\n"
436 "rp_deferred\tREGISTER_PRODUCT AND ALLUSERS AND NOT RP_TEST64\t6102\n"
437 "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n"
438 "pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
439 "pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
440 "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
441 "pp_immediate\tPUBLISH_PRODUCT AND ALLUSERS\t6401\n"
442 "pp_deferred\tPUBLISH_PRODUCT AND ALLUSERS\t6402\n"
443 "InstallFinalize\t\t6600";
444
445static const char pp_custom_action_dat[] =
446 "Action\tType\tSource\tTarget\n"
447 "s72\ti2\tS64\tS0\n"
448 "CustomAction\tAction\n"
449 "pf_immediate\t1\tcustom.dll\tpf_absent\n"
450 "pf_deferred\t1025\tcustom.dll\tpf_present\n"
451 "uf_immediate\t1\tcustom.dll\tpf_present\n"
452 "uf_deferred\t1025\tcustom.dll\tpf_absent\n"
453 "pp_immediate\t1\tcustom.dll\tpp_absent\n"
454 "pp_deferred\t1025\tcustom.dll\tpp_present\n"
455 "rp_immediate\t1\tcustom.dll\trp_absent\n"
456 "rp_deferred\t1025\tcustom.dll\trp_present\n"
457 "ru_immediate\t1\tcustom.dll\tru_absent\n"
458 "ru_deferred\t1025\tcustom.dll\tru_present\n"
459 "ppc_immediate\t1\tcustom.dll\tppc_absent\n"
460 "ppc_deferred\t1025\tcustom.dll\tppc_present\n";
461
462static const char pp_component_dat[] =
463 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
464 "s72\tS38\ts72\ti2\tS255\tS72\n"
465 "Component\tComponent\n"
466 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\t\tmaximus\n";
467
468static const char ppc_component_dat[] =
469 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
470 "s72\tS38\ts72\ti2\tS255\tS72\n"
471 "Component\tComponent\n"
472 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\t\tmaximus\n"
473 "augustus\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\taugustus\n";
474
475static const char ppc_file_dat[] =
476 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
477 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
478 "File\tFile\n"
479 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1\n"
480 "augustus\taugustus\taugustus\t500\t\t\t8192\t2";
481
482static const char ppc_media_dat[] =
483 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
484 "i2\ti4\tL64\tS255\tS32\tS72\n"
485 "Media\tDiskId\n"
486 "1\t2\t\t\tDISK1\t\n";
487
488static const char ppc_feature_comp_dat[] =
489 "Feature_\tComponent_\n"
490 "s38\ts72\n"
491 "FeatureComponents\tFeature_\tComponent_\n"
492 "feature\tmaximus\n"
493 "feature\taugustus\n"
494 "montecristo\tmaximus";
495
496static const char cwd_component_dat[] =
497 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
498 "s72\tS38\ts72\ti2\tS255\tS72\n"
499 "Component\tComponent\n"
500 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
501
502static const char rem_component_dat[] =
503 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
504 "s72\tS38\ts72\ti2\tS255\tS72\n"
505 "Component\tComponent\n"
506 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t0\t\thydrogen\n"
507 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\thelium\n"
508 "lithium\t\tMSITESTDIR\t2\t\tlithium\n";
509
510static const char rem_feature_comp_dat[] =
511 "Feature_\tComponent_\n"
512 "s38\ts72\n"
513 "FeatureComponents\tFeature_\tComponent_\n"
514 "feature\thydrogen\n"
515 "feature\thelium\n"
516 "feature\tlithium";
517
518static const char rem_file_dat[] =
519 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
520 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
521 "File\tFile\n"
522 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
523 "helium\thelium\thelium\t0\t\t\t8192\t1\n"
524 "lithium\tlithium\tlithium\t0\t\t\t8192\t1";
525
526static const char rem_install_exec_seq_dat[] =
527 "Action\tCondition\tSequence\n"
528 "s72\tS255\tI2\n"
529 "InstallExecuteSequence\tAction\n"
530 "ValidateProductID\t\t700\n"
531 "CostInitialize\t\t800\n"
532 "FileCost\t\t900\n"
533 "CostFinalize\t\t1000\n"
534 "InstallValidate\t\t1400\n"
535 "InstallInitialize\t\t1500\n"
536 "ProcessComponents\t\t1600\n"
537 "RemoveFiles\t\t3500\n"
538 "InstallFiles\t\t4000\n"
539 "RegisterProduct\t\t6100\n"
540 "PublishFeatures\t\t6300\n"
541 "PublishProduct\t\t6400\n"
542 "UnpublishFeatures\t\t6500\n"
543 "InstallFinalize\t\t6600";
544
545static const char rem_remove_files_dat[] =
546 "FileKey\tComponent_\tFileName\tDirProperty\tInstallMode\n"
547 "s72\ts72\tS255\ts72\tI2\n"
548 "RemoveFile\tFileKey\n"
549 "furlong\thydrogen\tfurlong\tMSITESTDIR\t1\n"
550 "firkin\thelium\tfirkin\tMSITESTDIR\t1\n"
551 "fortnight\tlithium\tfortnight\tMSITESTDIR\t1\n"
552 "becquerel\thydrogen\tbecquerel\tMSITESTDIR\t2\n"
553 "dioptre\thelium\tdioptre\tMSITESTDIR\t2\n"
554 "attoparsec\tlithium\tattoparsec\tMSITESTDIR\t2\n"
555 "storeys\thydrogen\tstoreys\tMSITESTDIR\t3\n"
556 "block\thelium\tblock\tMSITESTDIR\t3\n"
557 "siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n"
558 "nanoacre\thydrogen\t\tCABOUTDIR\t3\n";
559
560static const char mov_move_file_dat[] =
561 "FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n"
562 "s72\ts72\tS255\tS255\tS72\ts72\ti2\n"
563 "MoveFile\tFileKey\n"
564 "abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n"
565 "bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n"
566 "cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n"
567 "denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n"
568 "ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n"
569 "fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n"
570 "gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n"
571 "haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n"
572 "iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n"
573 "jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n"
574 "kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n"
575 "laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n"
576 "namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n"
577 "pakistan\taugustus\tperu\tsfn|poland\tSourceDir\tMSITESTDIR\t1\n"
578 "wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n"
579 "single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n"
580 "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
581 "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
582
583static const char mov_install_exec_seq_dat[] =
584 "Action\tCondition\tSequence\n"
585 "s72\tS255\tI2\n"
586 "InstallExecuteSequence\tAction\n"
587 "CostInitialize\t\t100\n"
588 "FileCost\t\t200\n"
589 "ResolveSource\t\t300\n"
590 "CostFinalize\t\t400\n"
591 "InstallValidate\t\t500\n"
592 "InstallInitialize\t\t600\n"
593 "MoveFiles\t\t700\n"
594 "mov_immediate\t\t701\n"
595 "mov_deferred\t\t702\n"
596 "InstallFiles\t\t800\n"
597 "InstallFinalize\t\t900\n";
598
599static const char mov_custom_action_dat[] =
600 "Action\tType\tSource\tTarget\n"
601 "s72\ti2\tS64\tS0\n"
602 "CustomAction\tAction\n"
603 "mov_immediate\t1\tcustom.dll\tmov_absent\n"
604 "mov_deferred\t1025\tcustom.dll\tmov_present\n";
605
606static const char df_directory_dat[] =
607 "Directory\tDirectory_Parent\tDefaultDir\n"
608 "s72\tS72\tl255\n"
609 "Directory\tDirectory\n"
610 "THIS\tMSITESTDIR\tthis\n"
611 "DOESNOT\tTHIS\tdoesnot\n"
612 "NONEXISTENT\tDOESNOT\texist\n"
613 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
614 "ProgramFilesFolder\tTARGETDIR\t.\n"
615 "TARGETDIR\t\tSourceDir";
616
617static const char df_duplicate_file_dat[] =
618 "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
619 "s72\ts72\ts72\tS255\tS72\n"
620 "DuplicateFile\tFileKey\n"
621 "maximus\tmaximus\tmaximus\taugustus\t\n"
622 "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n"
623 "augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n";
624
625static const char wrv_component_dat[] =
626 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
627 "s72\tS38\ts72\ti2\tS255\tS72\n"
628 "Component\tComponent\n"
629 "augustus\t{bafe0297-cbcc-4e08-8a78-7e9b83456eef}\tMSITESTDIR\t0\t\t\n"
630 "caesar\t{bafe0298-cbcc-4e08-8a78-7e9b83456eef}\tMSITESTDIR\t1\t\t\n";
631
632static const char wrv_feature_dat[] =
633 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
634 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
635 "Feature\tFeature\n"
636 "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
637 "feature2\t\tFeature2\tFeature2\t2\t1\tTARGETDIR\t1";
638
639static const char wrv_feature_comp_dat[] =
640 "Feature_\tComponent_\n"
641 "s38\ts72\n"
642 "FeatureComponents\tFeature_\tComponent_\n"
643 "feature\taugustus\n"
644 "feature2\tcaesar";
645
646static const char wrv_registry_dat[] =
647 "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
648 "s72\ti2\tl255\tL255\tL0\ts72\n"
649 "Registry\tRegistry\n"
650 "regdata0\t1\tmsitest\tsz\tstring\taugustus\n"
651 "regdata1\t1\tmsitest\tmultisz\tone[~]two[~]three\taugustus\n"
652 "regdata2\t1\tmsitest\texpandsz\t#%string\taugustus\n"
653 "regdata3\t1\tmsitest\tdword\t#123\taugustus\n"
654 "regdata4\t1\tmsitest\tbinary\t#x01234567\taugustus\n"
655 "regdata5\t1\tmsitest\t\tdefault\taugustus\n"
656 "regdata6\t1\tmsitest\\subkey\t*\t\taugustus\n"
657 "regdata7\t1\tmsitest\\subkey\t*\t#%\taugustus\n"
658 "regdata8\t1\tmsitest\\subkey\t*\t#x\taugustus\n"
659 "regdata9\t1\tmsitest\\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"
660 "regdata10\t1\tmsitest\tValue1\t[~]one[~]\taugustus\n"
661 "regdata11\t1\tmsitest\tValue2\t[~]two\taugustus\n"
662 "regdata12\t1\tmsitest\tValue3\tone[~]\taugustus\n"
663 "regdata13\t1\tmsitest\tValue4\tone[~]two\taugustus\n"
664 "regdata14\t1\tmsitest\tValue5\t[~]one[~]two[~]three\taugustus\n"
665 "regdata15\t1\tmsitest\tValue6\t[~]\taugustus\n"
666 "regdata16\t1\tmsitest\tValue7\t[~]two\taugustus\n"
667 "regdata17\t1\tmsitest\tformat\t[regdata17]\taugustus\n"
668 "regdata18\t1\tmsitest\tsource\t#1\tcaesar\n"
669 "regdata19\t1\tmsitest\\create\t+\t\taugustus\n"
670 "regdata20\t1\tmsitest\\delete\t-\t\taugustus\n";
671
672static const char wrv_remove_registry_dat[] =
673 "RemoveRegistry\tRoot\tKey\tName\tComponent_\n"
674 "s72\ti2\tl255\tL255\ts72\n"
675 "RemoveRegistry\tRemoveRegistry\n"
676 "regdata0\t1\tmsitest\tinstremove\taugustus\n"
677 "regdata1\t1\tmsitest\\instremove\t-\taugustus\n";
678
679static const char wrv_install_exec_seq_dat[] =
680 "Action\tCondition\tSequence\n"
681 "s72\tS255\tI2\n"
682 "InstallExecuteSequence\tAction\n"
683 "CostInitialize\t\t800\n"
684 "FileCost\t\t900\n"
685 "CostFinalize\t\t1000\n"
686 "InstallValidate\t\t1400\n"
687 "InstallInitialize\t\t1500\n"
688 "ProcessComponents\t\t1600\n"
689 "RemoveRegistryValues\t\t4900\n"
690 "rrv_immediate\tREMOVE\t4901\n"
691 "rrv_deferred\tREMOVE\t4902\n"
692 "WriteRegistryValues\t\t5000\n"
693 "wrv_immediate\tNOT REMOVE\t5001\n"
694 "wrv_deferred\tNOT REMOVE\t5002\n"
695 "RegisterProduct\t\t6100\n"
696 "PublishFeatures\t\t6200\n"
697 "PublishProduct\t\t6300\n"
698 "UnpublishFeatures\t\t6400\n"
699 "InstallFinalize\t\t6600\n";
700
701static const char wrv_custom_action_dat[] =
702 "Action\tType\tSource\tTarget\n"
703 "s72\ti2\tS64\tS0\n"
704 "CustomAction\tAction\n"
705 "wrv_immediate\t1\tcustom.dll\twrv_absent\n"
706 "wrv_deferred\t1025\tcustom.dll\twrv_present\n"
707 "rrv_immediate\t1\tcustom.dll\twrv_present\n"
708 "rrv_deferred\t1025\tcustom.dll\twrv_absent\n";
709
710static const char cf_directory_dat[] =
711 "Directory\tDirectory_Parent\tDefaultDir\n"
712 "s72\tS72\tl255\n"
713 "Directory\tDirectory\n"
714 "FIRSTDIR\tMSITESTDIR\tfirst\n"
715 "SECONDDIR\tMSITESTDIR\tsecond\n"
716 "THIRDDIR\tMSITESTDIR\tthird\n"
717 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
718 "ProgramFilesFolder\tTARGETDIR\t.\n"
719 "TARGETDIR\t\tSourceDir";
720
721static const char cf_component_dat[] =
722 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
723 "s72\tS38\ts72\ti2\tS255\tS72\n"
724 "Component\tComponent\n"
725 "One\t{F8CD42AC-9C38-48FE-8664-B35FD121012A}\tFIRSTDIR\t0\t\tone.txt\n"
726 "Two\t{DE2DB02E-2DDF-4E34-8CF6-DCA13E29DF52}\tSECONDDIR\t0\t\ttwo.txt\n";
727
728static const char cf_feature_dat[] =
729 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
730 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
731 "Feature\tFeature\n"
732 "One\t\tOne\tThe One Feature\t1\t3\tFIRSTDIR\t0\n"
733 "Two\t\tTwo\tThe Two Feature\t1\t3\tSECONDDIR\t0\n";
734
735static const char cf_feature_comp_dat[] =
736 "Feature_\tComponent_\n"
737 "s38\ts72\n"
738 "FeatureComponents\tFeature_\tComponent_\n"
739 "One\tOne\n"
740 "Two\tTwo\n";
741
742static const char cf_file_dat[] =
743 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
744 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
745 "File\tFile\n"
746 "one.txt\tOne\tone.txt\t0\t\t\t0\t1\n"
747 "two.txt\tTwo\ttwo.txt\t0\t\t\t0\t2\n";
748
749static const char cf_create_folders_dat[] =
750 "Directory_\tComponent_\n"
751 "s72\ts72\n"
752 "CreateFolder\tDirectory_\tComponent_\n"
753 "FIRSTDIR\tOne\n"
754 "SECONDDIR\tTwo\n"
755 "THIRDDIR\tTwo\n";
756
757static const char cf_install_exec_seq_dat[] =
758 "Action\tCondition\tSequence\n"
759 "s72\tS255\tI2\n"
760 "InstallExecuteSequence\tAction\n"
761 "CostFinalize\t\t1000\n"
762 "ValidateProductID\t\t700\n"
763 "CostInitialize\t\t800\n"
764 "FileCost\t\t900\n"
765 "RemoveFiles\t\t3500\n"
766 "rfi_immediate\tREMOVE\t3501\n"
767 "rfi_deferred\tREMOVE\t3502\n"
768 "CreateFolders\t\t3700\n"
769 "cf_immediate\tNOT REMOVE\t3701\n"
770 "cf_deferred\tNOT REMOVE\t3702\n"
771 "RemoveFolders\t\t3800\n"
772 "rf_immediate\tREMOVE\t3801\n"
773 "rf_deferred\tREMOVE\t3802\n"
774 "InstallFiles\t\t4000\n"
775 "ifi_immediate\tNOT REMOVE\t4001\n"
776 "ifi_deferred\tNOT REMOVE\t4002\n"
777 "RegisterUser\t\t6000\n"
778 "RegisterProduct\t\t6100\n"
779 "PublishFeatures\t\t6300\n"
780 "PublishProduct\t\t6400\n"
781 "InstallFinalize\t\t6600\n"
782 "InstallInitialize\t\t1500\n"
783 "ProcessComponents\t\t1600\n"
784 "UnpublishFeatures\t\t1800\n"
785 "InstallValidate\t\t1400\n"
786 "LaunchConditions\t\t100\n";
787
788static const char cf_custom_action_dat[] =
789 "Action\tType\tSource\tTarget\n"
790 "s72\ti2\tS64\tS0\n"
791 "CustomAction\tAction\n"
792 "ifi_immediate\t1\tcustom.dll\tfile_absent\n"
793 "ifi_deferred\t1025\tcustom.dll\tfile_present\n"
794 "rfi_immediate\t1\tcustom.dll\tfile_present\n"
795 "rfi_deferred\t1025\tcustom.dll\tfile_absent\n"
796 "cf_immediate\t1\tcustom.dll\tcf_absent\n"
797 "cf_deferred\t1025\tcustom.dll\tcf_present\n"
798 "rf_immediate\t1\tcustom.dll\tcf_present\n"
799 "rf_deferred\t1025\tcustom.dll\tcf_absent\n";
800
801static const char sr_file_dat[] =
802 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
803 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
804 "File\tFile\n"
805 "selfreg.dll\tselfreg\tselfreg.dll\t1000\t\t\t8192\t1\n";
806
807static const char sr_feature_dat[] =
808 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
809 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
810 "Feature\tFeature\n"
811 "selfreg\t\t\tselfreg feature\t1\t2\tMSITESTDIR\t0\n";
812
813static const char sr_feature_comp_dat[] =
814 "Feature_\tComponent_\n"
815 "s38\ts72\n"
816 "FeatureComponents\tFeature_\tComponent_\n"
817 "selfreg\tselfreg\n";
818
819static const char sr_component_dat[] =
820 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
821 "s72\tS38\ts72\ti2\tS255\tS72\n"
822 "Component\tComponent\n"
823 "selfreg\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\tselfreg.dll\n";
824
825static const char sr_selfreg_dat[] =
826 "File_\tCost\n"
827 "s72\tI2\n"
828 "SelfReg\tFile_\n"
829 "selfreg.dll\t\n";
830
831static const char sr_install_exec_seq_dat[] =
832 "Action\tCondition\tSequence\n"
833 "s72\tS255\tI2\n"
834 "InstallExecuteSequence\tAction\n"
835 "CostInitialize\t\t800\n"
836 "FileCost\t\t900\n"
837 "CostFinalize\t\t1000\n"
838 "InstallValidate\t\t1400\n"
839 "InstallInitialize\t\t1500\n"
840 "ProcessComponents\t\t1600\n"
841 "SelfUnregModules\t\t3800\n"
842 "su_immediate\tREMOVE\t3801\n"
843 "su_deferred\tREMOVE\t3802\n"
844 "RemoveFiles\t\t3900\n"
845 "InstallFiles\t\t4000\n"
846 "SelfRegModules\t\t4100\n"
847 "sr_immediate\tNOT REMOVE\t4101\n"
848 "sr_deferred\tNOT REMOVE\t4102\n"
849 "CreateShortcuts\t\t4600\n"
850 "RegisterProduct\t\t5100\n"
851 "PublishFeatures\t\t5200\n"
852 "PublishProduct\t\t5300\n"
853 "UnpublishFeatures\t\t5400\n"
854 "InstallFinalize\t\t6600\n";
855
856static const char sr_custom_action_dat[] =
857 "Action\tType\tSource\tTarget\n"
858 "s72\ti2\tS64\tS0\n"
859 "CustomAction\tAction\n"
860 "sr_immediate\t1\tcustom.dll\tsr_absent\n"
861 "sr_deferred\t1025\tcustom.dll\tsr_present\n"
862 "su_immediate\t1\tcustom.dll\tsr_present\n"
863 "su_deferred\t1025\tcustom.dll\tsr_absent\n";
864
865static const char font_media_dat[] =
866 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
867 "i2\ti4\tL64\tS255\tS32\tS72\n"
868 "Media\tDiskId\n"
869 "1\t3\t\t\tDISK1\t\n";
870
871static const char font_file_dat[] =
872 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
873 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
874 "File\tFile\n"
875 "font.ttf\tfonts\tfont.ttf\t1000\t\t\t8192\t1\n";
876
877static const char font_feature_dat[] =
878 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
879 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
880 "Feature\tFeature\n"
881 "fonts\t\t\tfont feature\t1\t2\tMSITESTDIR\t0\n";
882
883static const char font_component_dat[] =
884 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
885 "s72\tS38\ts72\ti2\tS255\tS72\n"
886 "Component\tComponent\n"
887 "fonts\t{F5920ED0-1183-4B8F-9330-86CE56557C05}\tMSITESTDIR\t0\t\tfont.ttf\n";
888
889static const char font_feature_comp_dat[] =
890 "Feature_\tComponent_\n"
891 "s38\ts72\n"
892 "FeatureComponents\tFeature_\tComponent_\n"
893 "fonts\tfonts\n";
894
895static const char font_dat[] =
896 "File_\tFontTitle\n"
897 "s72\tS128\n"
898 "Font\tFile_\n"
899 "font.ttf\tmsi test font\n";
900
901static const char font_install_exec_seq_dat[] =
902 "Action\tCondition\tSequence\n"
903 "s72\tS255\tI2\n"
904 "InstallExecuteSequence\tAction\n"
905 "ValidateProductID\t\t700\n"
906 "CostInitialize\t\t800\n"
907 "FileCost\t\t900\n"
908 "CostFinalize\t\t1000\n"
909 "InstallValidate\t\t1400\n"
910 "InstallInitialize\t\t1500\n"
911 "ProcessComponents\t\t1600\n"
912 "RemoveFiles\t\t3500\n"
913 "InstallFiles\t\t4000\n"
914 "RegisterFonts\t\t4100\n"
915 "rf_immediate\tNOT REMOVE\t4101\n"
916 "rf_deferred\tNOT REMOVE\t4102\n"
917 "UnregisterFonts\t\t4200\n"
918 "uf_immediate\tREMOVE\t4201\n"
919 "uf_deferred\tREMOVE\t4202\n"
920 "RegisterUser\t\t6000\n"
921 "RegisterProduct\t\t6100\n"
922 "PublishFeatures\t\t6300\n"
923 "PublishProduct\t\t6400\n"
924 "UnpublishFeatures\t\t6500\n"
925 "InstallFinalize\t\t6600";
926
927static const char font_custom_action_dat[] =
928 "Action\tType\tSource\tTarget\n"
929 "s72\ti2\tS64\tS0\n"
930 "CustomAction\tAction\n"
931 "rf_immediate\t1\tcustom.dll\tfont_absent\n"
932 "rf_deferred\t1025\tcustom.dll\tfont_present\n"
933 "uf_immediate\t1\tcustom.dll\tfont_present\n"
934 "uf_deferred\t1025\tcustom.dll\tfont_absent\n";
935
936static const char vp_property_dat[] =
937 "Property\tValue\n"
938 "s72\tl0\n"
939 "Property\tProperty\n"
940 "HASUIRUN\t0\n"
941 "INSTALLLEVEL\t3\n"
942 "InstallMode\tTypical\n"
943 "Manufacturer\tWine\n"
944 "PIDTemplate\t###-#######\n"
945 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
946 "ProductLanguage\t1033\n"
947 "ProductName\tMSITEST\n"
948 "ProductVersion\t1.1.1\n"
949 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
950 "MSIFASTINSTALL\t1\n";
951
952static const char vp_custom_action_dat[] =
953 "Action\tType\tSource\tTarget\tISComments\n"
954 "s72\ti2\tS64\tS0\tS255\n"
955 "CustomAction\tAction\n"
956 "SetProductID1\t51\tProductID\t1\t\n"
957 "SetProductID2\t51\tProductID\t2\t\n"
958 "TestProductID1\t19\t\t\tHalts installation\n"
959 "TestProductID2\t19\t\t\tHalts installation\n";
960
961static const char vp_install_exec_seq_dat[] =
962 "Action\tCondition\tSequence\n"
963 "s72\tS255\tI2\n"
964 "InstallExecuteSequence\tAction\n"
965 "LaunchConditions\t\t100\n"
966 "CostInitialize\t\t800\n"
967 "FileCost\t\t900\n"
968 "CostFinalize\t\t1000\n"
969 "InstallValidate\t\t1400\n"
970 "InstallInitialize\t\t1500\n"
971 "SetProductID1\tSET_PRODUCT_ID=1\t3000\n"
972 "SetProductID2\tSET_PRODUCT_ID=2\t3100\n"
973 "ValidateProductID\t\t3200\n"
974 "InstallExecute\t\t3300\n"
975 "TestProductID1\tProductID=1\t3400\n"
976 "TestProductID2\tProductID=\"123-1234567\"\t3500\n"
977 "InstallFiles\t\t4000\n"
978 "InstallFinalize\t\t6000\n";
979
980static const char odbc_file_dat[] =
981 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
982 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
983 "File\tFile\n"
984 "ODBCdriver.dll\todbc\tODBCdriver.dll\t1000\t\t\t8192\t1\n"
985 "ODBCdriver2.dll\todbc\tODBCdriver2.dll\t1000\t\t\t8192\t2\n"
986 "ODBCtranslator.dll\todbc\tODBCtranslator.dll\t1000\t\t\t8192\t3\n"
987 "ODBCtranslator2.dll\todbc\tODBCtranslator2.dll\t1000\t\t\t8192\t4\n"
988 "ODBCsetup.dll\todbc\tODBCsetup.dll\t1000\t\t\t8192\t5\n";
989
990static const char odbc_feature_dat[] =
991 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
992 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
993 "Feature\tFeature\n"
994 "odbc\t\t\todbc feature\t1\t2\tMSITESTDIR\t0\n";
995
996static const char odbc_feature_comp_dat[] =
997 "Feature_\tComponent_\n"
998 "s38\ts72\n"
999 "FeatureComponents\tFeature_\tComponent_\n"
1000 "odbc\todbc64\n"
1001 "odbc\todbc\n";
1002
1003static const char odbc_component_dat[] =
1004 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1005 "s72\tS38\ts72\ti2\tS255\tS72\n"
1006 "Component\tComponent\n"
1007 "odbc64\t{B6F3E4AF-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t256\tMsix64\tODBCdriver.dll\n"
1008 "odbc\t{B6F3E4AE-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t0\t\tODBCdriver.dll\n";
1009
1010static const char odbc_driver_dat[] =
1011 "Driver\tComponent_\tDescription\tFile_\tFile_Setup\n"
1012 "s72\ts72\ts255\ts72\tS72\n"
1013 "ODBCDriver\tDriver\n"
1014 "64-bit driver\todbc64\tODBC test driver\tODBCdriver.dll\t\n"
1015 "64-bit driver2\todbc64\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n"
1016 "ODBC test driver\todbc\tODBC test driver\tODBCdriver.dll\t\n"
1017 "ODBC test driver2\todbc\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n";
1018
1019static const char odbc_translator_dat[] =
1020 "Translator\tComponent_\tDescription\tFile_\tFile_Setup\n"
1021 "s72\ts72\ts255\ts72\tS72\n"
1022 "ODBCTranslator\tTranslator\n"
1023 "ODBC test translator\todbc\tODBC test translator\tODBCtranslator.dll\t\n"
1024 "ODBC test translator2\todbc\tODBC test translator2\tODBCtranslator2.dll\tODBCsetup.dll\n";
1025
1026static const char odbc_datasource_dat[] =
1027 "DataSource\tComponent_\tDescription\tDriverDescription\tRegistration\n"
1028 "s72\ts72\ts255\ts255\ti2\n"
1029 "ODBCDataSource\tDataSource\n"
1030 "ODBC data source\todbc\tODBC data source\tODBC driver\t0\n";
1031
1032static const char odbc_install_exec_seq_dat[] =
1033 "Action\tCondition\tSequence\n"
1034 "s72\tS255\tI2\n"
1035 "InstallExecuteSequence\tAction\n"
1036 "LaunchConditions\t\t100\n"
1037 "CostInitialize\t\t800\n"
1038 "FileCost\t\t900\n"
1039 "CostFinalize\t\t1000\n"
1040 "InstallValidate\t\t1400\n"
1041 "InstallInitialize\t\t1500\n"
1042 "ProcessComponents\t\t1600\n"
1043 "InstallODBC\t\t3000\n"
1044 "io_immediate\tNOT REMOVE\t3001\n"
1045 "io_deferred\tNOT REMOVE\t3002\n"
1046 "RemoveODBC\t\t3100\n"
1047 "ro_immediate\tREMOVE\t3101\n"
1048 "ro_deferred\tREMOVE\t3102\n"
1049 "RemoveFiles\t\t3900\n"
1050 "InstallFiles\t\t4000\n"
1051 "RegisterProduct\t\t5000\n"
1052 "PublishFeatures\t\t5100\n"
1053 "PublishProduct\t\t5200\n"
1054 "UnpublishFeatures\t\t5300\n"
1055 "InstallFinalize\t\t6000\n";
1056
1057static const char odbc_custom_action_dat[] =
1058 "Action\tType\tSource\tTarget\n"
1059 "s72\ti2\tS64\tS0\n"
1060 "CustomAction\tAction\n"
1061 "io_immediate\t1\tcustom.dll\todbc_absent\n"
1062 "io_deferred\t1025\tcustom.dll\todbc_present\n"
1063 "ro_immediate\t1\tcustom.dll\todbc_present\n"
1064 "ro_deferred\t1025\tcustom.dll\todbc_absent\n";
1065
1066static const char odbc_media_dat[] =
1067 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
1068 "i2\ti4\tL64\tS255\tS32\tS72\n"
1069 "Media\tDiskId\n"
1070 "1\t5\t\t\tDISK1\t\n";
1071
1072static const char tl_file_dat[] =
1073 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1074 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1075 "File\tFile\n"
1076 "typelib.dll\ttypelib\ttypelib.dll\t1000\t\t\t8192\t1\n";
1077
1078static const char tl_feature_dat[] =
1079 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1080 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1081 "Feature\tFeature\n"
1082 "typelib\t\t\ttypelib feature\t1\t2\tMSITESTDIR\t0\n";
1083
1084static const char tl_feature_comp_dat[] =
1085 "Feature_\tComponent_\n"
1086 "s38\ts72\n"
1087 "FeatureComponents\tFeature_\tComponent_\n"
1088 "typelib\ttypelib\n";
1089
1090static const char tl_component_dat[] =
1091 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1092 "s72\tS38\ts72\ti2\tS255\tS72\n"
1093 "Component\tComponent\n"
1094 "typelib\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\ttypelib.dll\n";
1095
1096static const char tl_typelib_dat[] =
1097 "LibID\tLanguage\tComponent_\tVersion\tDescription\tDirectory_\tFeature_\tCost\n"
1098 "s38\ti2\ts72\tI4\tL128\tS72\ts38\tI4\n"
1099 "TypeLib\tLibID\tLanguage\tComponent_\n"
1100 "{EAC5166A-9734-4D91-878F-1DD02304C66C}\t0\ttypelib\t1793\t\tMSITESTDIR\ttypelib\t\n";
1101
1102static const char tl_install_exec_seq_dat[] =
1103 "Action\tCondition\tSequence\n"
1104 "s72\tS255\tI2\n"
1105 "InstallExecuteSequence\tAction\n"
1106 "LaunchConditions\t\t100\n"
1107 "CostInitialize\t\t800\n"
1108 "FileCost\t\t900\n"
1109 "CostFinalize\t\t1000\n"
1110 "InstallValidate\t\t1400\n"
1111 "InstallInitialize\t\t1500\n"
1112 "ProcessComponents\t\t1600\n"
1113 "UnregisterTypeLibraries\t\t3100\n"
1114 "ut_immediate\tREMOVE\t3101\n"
1115 "ut_deferred\tREMOVE\t3102\n"
1116 "RemoveFiles\t\t3200\n"
1117 "InstallFiles\t\t3300\n"
1118 "RegisterTypeLibraries\t\t3400\n"
1119 "rt_immediate\tNOT REMOVE\t3401\n"
1120 "rt_deferred\tNOT REMOVE\t3402\n"
1121 "RegisterProduct\t\t5100\n"
1122 "PublishFeatures\t\t5200\n"
1123 "PublishProduct\t\t5300\n"
1124 "UnpublishFeatures\t\t5400\n"
1125 "InstallFinalize\t\t6000\n";
1126
1127static const char tl_custom_action_dat[] =
1128 "Action\tType\tSource\tTarget\n"
1129 "s72\ti2\tS64\tS0\n"
1130 "CustomAction\tAction\n"
1131 "rt_immediate\t1\tcustom.dll\ttl_absent\n"
1132 "rt_deferred\t1025\tcustom.dll\ttl_present\n"
1133 "ut_immediate\t1\tcustom.dll\ttl_present\n"
1134 "ut_deferred\t1025\tcustom.dll\ttl_absent\n";
1135
1136static const char crs_file_dat[] =
1137 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1138 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1139 "File\tFile\n"
1140 "target.txt\tshortcut\ttarget.txt\t1000\t\t\t8192\t1\n";
1141
1142static const char crs_feature_dat[] =
1143 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1144 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1145 "Feature\tFeature\n"
1146 "shortcut\t\t\tshortcut feature\t1\t2\tMSITESTDIR\t0\n";
1147
1148static const char crs_feature_comp_dat[] =
1149 "Feature_\tComponent_\n"
1150 "s38\ts72\n"
1151 "FeatureComponents\tFeature_\tComponent_\n"
1152 "shortcut\tshortcut\n";
1153
1154static const char crs_component_dat[] =
1155 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1156 "s72\tS38\ts72\ti2\tS255\tS72\n"
1157 "Component\tComponent\n"
1158 "shortcut\t{5D20E3C6-7206-498F-AC28-87AF2F9AD4CC}\tMSITESTDIR\t0\t\ttarget.txt\n";
1159
1160static const char crs_shortcut_dat[] =
1161 "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
1162 "s72\ts72\tl128\ts72\ts72\tL255\tL255\tI2\tS72\tI2\tI2\tS72\n"
1163 "Shortcut\tShortcut\n"
1164 "shortcut\tMSITESTDIR\tshortcut\tshortcut\t[MSITESTDIR]target.txt\t\t\t\t\t\t\t\n";
1165
1166static const char crs_install_exec_seq_dat[] =
1167 "Action\tCondition\tSequence\n"
1168 "s72\tS255\tI2\n"
1169 "InstallExecuteSequence\tAction\n"
1170 "LaunchConditions\t\t100\n"
1171 "CostInitialize\t\t800\n"
1172 "FileCost\t\t900\n"
1173 "CostFinalize\t\t1000\n"
1174 "InstallValidate\t\t1400\n"
1175 "InstallInitialize\t\t1500\n"
1176 "ProcessComponents\t\t1600\n"
1177 "RemoveFiles\t\t1700\n"
1178 "InstallFiles\t\t2000\n"
1179 "RemoveShortcuts\t\t3000\n"
1180 "rs_immediate\tREMOVE\t3001\n"
1181 "rs_deferred\tREMOVE\t3002\n"
1182 "CreateShortcuts\t\t3100\n"
1183 "cs_immediate\tNOT REMOVE\t3101\n"
1184 "cs_deferred\tNOT REMOVE\t3102\n"
1185 "RegisterProduct\t\t5000\n"
1186 "PublishFeatures\t\t5100\n"
1187 "PublishProduct\t\t5200\n"
1188 "UnpublishFeatures\t\t5300\n"
1189 "InstallFinalize\t\t6000\n";
1190
1191static const char crs_custom_action_dat[] =
1192 "Action\tType\tSource\tTarget\n"
1193 "s72\ti2\tS64\tS0\n"
1194 "CustomAction\tAction\n"
1195 "cs_immediate\t1\tcustom.dll\tcrs_absent\n"
1196 "cs_deferred\t1025\tcustom.dll\tcrs_present\n"
1197 "rs_immediate\t1\tcustom.dll\tcrs_present\n"
1198 "rs_deferred\t1025\tcustom.dll\tcrs_absent\n";
1199
1200static const char pub_file_dat[] =
1201 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1202 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1203 "File\tFile\n"
1204 "english.txt\tpublish\tenglish.txt\t1000\t\t\t8192\t1\n";
1205
1206static const char pub_feature_dat[] =
1207 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1208 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1209 "Feature\tFeature\n"
1210 "publish\t\t\tpublish feature\t1\t2\tMSITESTDIR\t0\n";
1211
1212static const char pub_feature_comp_dat[] =
1213 "Feature_\tComponent_\n"
1214 "s38\ts72\n"
1215 "FeatureComponents\tFeature_\tComponent_\n"
1216 "publish\tpublish\n";
1217
1218static const char pub_component_dat[] =
1219 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1220 "s72\tS38\ts72\ti2\tS255\tS72\n"
1221 "Component\tComponent\n"
1222 "publish\t{B4EA0ACF-6238-426E-9C6D-7869F0F9C768}\tMSITESTDIR\t0\t\tenglish.txt\n";
1223
1224static const char pub_publish_component_dat[] =
1225 "ComponentId\tQualifier\tComponent_\tAppData\tFeature_\n"
1226 "s38\ts255\ts72\tL255\ts38\n"
1227 "PublishComponent\tComponentId\tQualifier\tComponent_\n"
1228 "{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}\tenglish.txt\tpublish\t\tpublish\n";
1229
1230static const char pub_install_exec_seq_dat[] =
1231 "Action\tCondition\tSequence\n"
1232 "s72\tS255\tI2\n"
1233 "InstallExecuteSequence\tAction\n"
1234 "LaunchConditions\t\t100\n"
1235 "CostInitialize\t\t800\n"
1236 "FileCost\t\t900\n"
1237 "CostFinalize\t\t1000\n"
1238 "InstallValidate\t\t1400\n"
1239 "InstallInitialize\t\t1500\n"
1240 "ProcessComponents\t\t1600\n"
1241 "RemoveFiles\t\t1700\n"
1242 "InstallFiles\t\t2000\n"
1243 "PublishComponents\t\t3000\n"
1244 "pub_immediate\tNOT REMOVE\t3001\n"
1245 "pub_deferred\tNOT REMOVE\t3002\n"
1246 "UnpublishComponents\t\t3100\n"
1247 "unp_immediate\tREMOVE\t3101\n"
1248 "unp_deferred\tREMOVE\t3102\n"
1249 "RegisterProduct\t\t5000\n"
1250 "PublishFeatures\t\t5100\n"
1251 "PublishProduct\t\t5200\n"
1252 "UnpublishFeatures\t\t5300\n"
1253 "InstallFinalize\t\t6000\n";
1254
1255static const char pub_custom_action_dat[] =
1256 "Action\tType\tSource\tTarget\n"
1257 "s72\ti2\tS64\tS0\n"
1258 "CustomAction\tAction\n"
1259 "pub_immediate\t1\tcustom.dll\tpub_absent\n"
1260 "pub_deferred\t1025\tcustom.dll\tpub_present\n"
1261 "unp_immediate\t1\tcustom.dll\tpub_present\n"
1262 "unp_deferred\t1025\tcustom.dll\tpub_absent\n";
1263
1264static const char rd_file_dat[] =
1265 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1266 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1267 "File\tFile\n"
1268 "original.txt\tduplicate\toriginal.txt\t1000\t\t\t8192\t1\n"
1269 "original2.txt\tduplicate\toriginal2.txt\t1000\t\t\t8192\t2\n"
1270 "original3.txt\tduplicate2\toriginal3.txt\t1000\t\t\t8192\t3\n";
1271
1272static const char rd_feature_dat[] =
1273 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1274 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1275 "Feature\tFeature\n"
1276 "duplicate\t\t\tduplicate feature\t1\t2\tMSITESTDIR\t0\n";
1277
1278static const char rd_feature_comp_dat[] =
1279 "Feature_\tComponent_\n"
1280 "s38\ts72\n"
1281 "FeatureComponents\tFeature_\tComponent_\n"
1282 "duplicate\tduplicate\n";
1283
1284static const char rd_component_dat[] =
1285 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1286 "s72\tS38\ts72\ti2\tS255\tS72\n"
1287 "Component\tComponent\n"
1288 "duplicate\t{EB45D06A-ADFE-44E3-8D41-B7DE150E41AD}\tMSITESTDIR\t0\t\toriginal.txt\n"
1289 "duplicate2\t{B8BA60E0-B2E9-488E-9D0E-E60F25F04F97}\tMSITESTDIR\t0\tDUPLICATE2=1\toriginal3.txt\n";
1290
1291static const char rd_duplicate_file_dat[] =
1292 "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
1293 "s72\ts72\ts72\tS255\tS72\n"
1294 "DuplicateFile\tFileKey\n"
1295 "duplicate\tduplicate\toriginal.txt\tduplicate.txt\t\n"
1296 "duplicate2\tduplicate\toriginal2.txt\t\tMSITESTDIR\n"
1297 "duplicate3\tduplicate2\toriginal3.txt\tduplicate2.txt\t\n";
1298
1299static const char rd_install_exec_seq_dat[] =
1300 "Action\tCondition\tSequence\n"
1301 "s72\tS255\tI2\n"
1302 "InstallExecuteSequence\tAction\n"
1303 "LaunchConditions\t\t100\n"
1304 "CostInitialize\t\t800\n"
1305 "FileCost\t\t900\n"
1306 "CostFinalize\t\t1000\n"
1307 "InstallValidate\t\t1400\n"
1308 "InstallInitialize\t\t1500\n"
1309 "ProcessComponents\t\t1600\n"
1310 "RemoveDuplicateFiles\t\t1900\n"
1311 "rd_immediate\tREMOVE\t1901\n"
1312 "rd_deferred\tREMOVE\t1902\n"
1313 "InstallFiles\t\t2000\n"
1314 "DuplicateFiles\t\t2100\n"
1315 "df_immediate\tNOT REMOVE\t2101\n"
1316 "df_deferred\tNOT REMOVE\t2102\n"
1317 "RegisterProduct\t\t5000\n"
1318 "PublishFeatures\t\t5100\n"
1319 "PublishProduct\t\t5200\n"
1320 "UnpublishFeatures\t\t5300\n"
1321 "InstallFinalize\t\t6000\n";
1322
1323static const char rd_custom_action_dat[] =
1324 "Action\tType\tSource\tTarget\n"
1325 "s72\ti2\tS64\tS0\n"
1326 "CustomAction\tAction\n"
1327 "df_immediate\t1\tcustom.dll\trd_absent\n"
1328 "df_deferred\t1025\tcustom.dll\trd_present\n"
1329 "rd_immediate\t1\tcustom.dll\trd_present\n"
1330 "rd_deferred\t1025\tcustom.dll\trd_absent\n";
1331
1332static const char frp_file_dat[] =
1333 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1334 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1335 "File\tFile\n"
1336 "product.txt\tproduct\tproduct.txt\t1000\t\t\t8192\t1\n";
1337
1338static const char frp_feature_dat[] =
1339 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1340 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1341 "Feature\tFeature\n"
1342 "product\t\t\tproduct feature\t1\t2\tMSITESTDIR\t0\n";
1343
1344static const char frp_feature_comp_dat[] =
1345 "Feature_\tComponent_\n"
1346 "s38\ts72\n"
1347 "FeatureComponents\tFeature_\tComponent_\n"
1348 "product\tproduct\n";
1349
1350static const char frp_component_dat[] =
1351 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1352 "s72\tS38\ts72\ti2\tS255\tS72\n"
1353 "Component\tComponent\n"
1354 "product\t{44725EE0-EEA8-40BD-8162-A48224A2FEA1}\tMSITESTDIR\t0\t\tproduct.txt\n";
1355
1356static const char frp_custom_action_dat[] =
1357 "Action\tType\tSource\tTarget\tISComments\n"
1358 "s72\ti2\tS64\tS0\tS255\n"
1359 "CustomAction\tAction\n"
1360 "TestProp\t19\t\t\tPROP set\n";
1361
1362static const char frp_upgrade_dat[] =
1363 "UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
1364 "s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
1365 "Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
1366 "{4C0EAA15-0264-4E5A-8758-609EF142B92D}\t1.1.1\t2.2.2\t\t768\t\tPROP\n";
1367
1368static const char frp_install_exec_seq_dat[] =
1369 "Action\tCondition\tSequence\n"
1370 "s72\tS255\tI2\n"
1371 "InstallExecuteSequence\tAction\n"
1372 "FindRelatedProducts\t\t50\n"
1373 "TestProp\tPROP AND NOT REMOVE\t51\n"
1374 "LaunchConditions\t\t100\n"
1375 "CostInitialize\t\t800\n"
1376 "FileCost\t\t900\n"
1377 "CostFinalize\t\t1000\n"
1378 "InstallValidate\t\t1400\n"
1379 "InstallInitialize\t\t1500\n"
1380 "ProcessComponents\t\t1600\n"
1381 "RemoveFiles\t\t1700\n"
1382 "InstallFiles\t\t2000\n"
1383 "RegisterProduct\t\t5000\n"
1384 "PublishFeatures\t\t5100\n"
1385 "PublishProduct\t\t5200\n"
1386 "UnpublishFeatures\t\t5300\n"
1387 "InstallFinalize\t\t6000\n";
1388
1389static const char ini_file_dat[] =
1390 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1391 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1392 "File\tFile\n"
1393 "inifile.txt\tinifile\tinifile.txt\t1000\t\t\t8192\t1\n";
1394
1395static const char ini_feature_dat[] =
1396 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1397 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1398 "Feature\tFeature\n"
1399 "inifile\t\t\tinifile feature\t1\t2\tMSITESTDIR\t0\n";
1400
1401static const char ini_feature_comp_dat[] =
1402 "Feature_\tComponent_\n"
1403 "s38\ts72\n"
1404 "FeatureComponents\tFeature_\tComponent_\n"
1405 "inifile\tinifile\n";
1406
1407static const char ini_component_dat[] =
1408 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1409 "s72\tS38\ts72\ti2\tS255\tS72\n"
1410 "Component\tComponent\n"
1411 "inifile\t{A0F15705-4F57-4437-88C4-6C8B37ACC6DE}\tMSITESTDIR\t0\t\tinifile.txt\n";
1412
1413static const char ini_ini_file_dat[] =
1414 "IniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
1415 "s72\tl255\tS72\tl96\tl128\tl255\ti2\ts72\n"
1416 "IniFile\tIniFile\n"
1417 "inifile1\ttest.ini\tMSITESTDIR\tsection1\tkey1\tvalue1\t0\tinifile\n";
1418
1419static const char ini_remove_ini_file_dat[] =
1420 "RemoveIniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
1421 "s72\tl255\tS72\tl96\tl128\tL255\ti2\ts72\n"
1422 "RemoveIniFile\tRemoveIniFile\n"
1423 "inifile1\ttest.ini\tMSITESTDIR\tsectionA\tkeyA\tvalueA\t2\tinifile\n";
1424
1425static const char ini_install_exec_seq_dat[] =
1426 "Action\tCondition\tSequence\n"
1427 "s72\tS255\tI2\n"
1428 "InstallExecuteSequence\tAction\n"
1429 "LaunchConditions\t\t100\n"
1430 "CostInitialize\t\t800\n"
1431 "FileCost\t\t900\n"
1432 "CostFinalize\t\t1000\n"
1433 "InstallValidate\t\t1400\n"
1434 "InstallInitialize\t\t1500\n"
1435 "ProcessComponents\t\t1600\n"
1436 "RemoveFiles\t\t1700\n"
1437 "InstallFiles\t\t2000\n"
1438 "RemoveIniValues\t\t3000\n"
1439 "riv_immediate\tREMOVE\t3001\n"
1440 "riv_deferred\tREMOVE\t3002\n"
1441 "WriteIniValues\t\t3100\n"
1442 "wiv_immediate\tNOT REMOVE\t3101\n"
1443 "wiv_deferred\tNOT REMOVE\t3102\n"
1444 "RegisterProduct\t\t5000\n"
1445 "PublishFeatures\t\t5100\n"
1446 "PublishProduct\t\t5200\n"
1447 "UnpublishFeatures\t\t5300\n"
1448 "InstallFinalize\t\t6000\n";
1449
1450static const char ini_custom_action_dat[] =
1451 "Action\tType\tSource\tTarget\n"
1452 "s72\ti2\tS64\tS0\n"
1453 "CustomAction\tAction\n"
1454 "wiv_immediate\t1\tcustom.dll\tini_absent\n"
1455 "wiv_deferred\t1025\tcustom.dll\tini_present\n"
1456 "riv_immediate\t1\tcustom.dll\tini_present\n"
1457 "riv_deferred\t1025\tcustom.dll\tini_absent\n";
1458
1459static const char rci_file_dat[] =
1460 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1461 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1462 "File\tFile\n"
1463 "class.txt\tclass\tclass.txt\t1000\t\t\t8192\t1\n";
1464
1465static const char rci_feature_dat[] =
1466 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1467 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1468 "Feature\tFeature\n"
1469 "class\t\t\tclass feature\t1\t2\tMSITESTDIR\t0\n";
1470
1471static const char rci_feature_comp_dat[] =
1472 "Feature_\tComponent_\n"
1473 "s38\ts72\n"
1474 "FeatureComponents\tFeature_\tComponent_\n"
1475 "class\tclass\n";
1476
1477static const char rci_component_dat[] =
1478 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1479 "s72\tS38\ts72\ti2\tS255\tS72\n"
1480 "Component\tComponent\n"
1481 "class\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tclass.txt\n";
1482
1483static const char rci_appid_dat[] =
1484 "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
1485 "s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
1486 "AppId\tAppId\n"
1487 "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n";
1488
1489static const char rci_class_dat[] =
1490 "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
1491 "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
1492 "Class\tCLSID\tContext\tComponent_\n"
1493 "{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tclass\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tclass\t\n";
1494
1495static const char rci_install_exec_seq_dat[] =
1496 "Action\tCondition\tSequence\n"
1497 "s72\tS255\tI2\n"
1498 "InstallExecuteSequence\tAction\n"
1499 "LaunchConditions\t\t100\n"
1500 "CostInitialize\t\t800\n"
1501 "FileCost\t\t900\n"
1502 "CostFinalize\t\t1000\n"
1503 "InstallValidate\t\t1400\n"
1504 "InstallInitialize\t\t1500\n"
1505 "ProcessComponents\t\t1600\n"
1506 "RemoveFiles\t\t1700\n"
1507 "InstallFiles\t\t2000\n"
1508 "UnregisterClassInfo\t\t3000\n"
1509 "uci_immediate\tREMOVE\t3001\n"
1510 "uci_deferred\tREMOVE\t3002\n"
1511 "RegisterClassInfo\t\t4000\n"
1512 "rci_immediate\tNOT REMOVE\t4001\n"
1513 "rci_deferred\tNOT REMOVE\t4002\n"
1514 "RegisterProduct\t\t5000\n"
1515 "PublishFeatures\t\t5100\n"
1516 "PublishProduct\t\t5200\n"
1517 "UnpublishFeatures\t\t5300\n"
1518 "InstallFinalize\t\t6000\n";
1519
1520static const char rci_custom_action_dat[] =
1521 "Action\tType\tSource\tTarget\n"
1522 "s72\ti2\tS64\tS0\n"
1523 "CustomAction\tAction\n"
1524 "rci_immediate\t1\tcustom.dll\trci_absent\n"
1525 "rci_deferred\t1025\tcustom.dll\trci_present\n"
1526 "uci_immediate\t1\tcustom.dll\trci_present\n"
1527 "uci_deferred\t1025\tcustom.dll\trci_absent\n";
1528
1529static const char rei_file_dat[] =
1530 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1531 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1532 "File\tFile\n"
1533 "extension.txt\textension\textension.txt\t1000\t\t\t8192\t1\n";
1534
1535static const char rei_feature_dat[] =
1536 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1537 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1538 "Feature\tFeature\n"
1539 "extension\t\t\textension feature\t1\t2\tMSITESTDIR\t0\n";
1540
1541static const char rei_feature_comp_dat[] =
1542 "Feature_\tComponent_\n"
1543 "s38\ts72\n"
1544 "FeatureComponents\tFeature_\tComponent_\n"
1545 "extension\textension\n";
1546
1547static const char rei_component_dat[] =
1548 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1549 "s72\tS38\ts72\ti2\tS255\tS72\n"
1550 "Component\tComponent\n"
1551 "extension\t{9A3060D4-60BA-4A82-AB55-9FB148AD013C}\tMSITESTDIR\t0\t\textension.txt\n";
1552
1553static const char rei_extension_dat[] =
1554 "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1555 "s255\ts72\tS255\tS64\ts38\n"
1556 "Extension\tExtension\tComponent_\n"
1557 "extension\textension\tProg.Id.1\t\textension\n";
1558
1559static const char rei_verb_dat[] =
1560 "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1561 "s255\ts32\tI2\tL255\tL255\n"
1562 "Verb\tExtension_\tVerb\n"
1563 "extension\tOpen\t1\t&Open\t/argument\n";
1564
1565static const char rei_progid_dat[] =
1566 "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
1567 "s255\tS255\tS38\tL255\tS72\tI2\n"
1568 "ProgId\tProgId\n"
1569 "Prog.Id.1\t\t\tdescription\t\t\n";
1570
1571static const char rei_install_exec_seq_dat[] =
1572 "Action\tCondition\tSequence\n"
1573 "s72\tS255\tI2\n"
1574 "InstallExecuteSequence\tAction\n"
1575 "LaunchConditions\t\t100\n"
1576 "CostInitialize\t\t800\n"
1577 "FileCost\t\t900\n"
1578 "CostFinalize\t\t1000\n"
1579 "InstallValidate\t\t1400\n"
1580 "InstallInitialize\t\t1500\n"
1581 "ProcessComponents\t\t1600\n"
1582 "RemoveFiles\t\t1700\n"
1583 "InstallFiles\t\t2000\n"
1584 "UnregisterExtensionInfo\t\t3000\n"
1585 "uei_immediate\tREMOVE\t3001\n"
1586 "uei_deferred\tREMOVE\t3002\n"
1587 "RegisterExtensionInfo\t\t4000\n"
1588 "rei_immediate\tNOT REMOVE\t4001\n"
1589 "rei_deferred\tNOT REMOVE\t4002\n"
1590 "RegisterProduct\t\t5000\n"
1591 "PublishFeatures\t\t5100\n"
1592 "PublishProduct\t\t5200\n"
1593 "UnpublishFeatures\t\t5300\n"
1594 "InstallFinalize\t\t6000\n";
1595
1596static const char rei_custom_action_dat[] =
1597 "Action\tType\tSource\tTarget\n"
1598 "s72\ti2\tS64\tS0\n"
1599 "CustomAction\tAction\n"
1600 "rei_immediate\t1\tcustom.dll\trei_absent\n"
1601 "rei_deferred\t1025\tcustom.dll\trei_present\n"
1602 "uei_immediate\t1\tcustom.dll\trei_present\n"
1603 "uei_deferred\t1025\tcustom.dll\trei_absent\n";
1604
1605static const char rpi_file_dat[] =
1606 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1607 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1608 "File\tFile\n"
1609 "progid.txt\tprogid\tprogid.txt\t1000\t\t\t8192\t1\n";
1610
1611static const char rpi_feature_dat[] =
1612 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1613 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1614 "Feature\tFeature\n"
1615 "progid\t\t\tprogid feature\t1\t2\tMSITESTDIR\t0\n";
1616
1617static const char rpi_feature_comp_dat[] =
1618 "Feature_\tComponent_\n"
1619 "s38\ts72\n"
1620 "FeatureComponents\tFeature_\tComponent_\n"
1621 "progid\tprogid\n";
1622
1623static const char rpi_component_dat[] =
1624 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1625 "s72\tS38\ts72\ti2\tS255\tS72\n"
1626 "Component\tComponent\n"
1627 "progid\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tprogid.txt\n";
1628
1629static const char rpi_appid_dat[] =
1630 "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
1631 "s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
1632 "AppId\tAppId\n"
1633 "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n";
1634
1635static const char rpi_class_dat[] =
1636 "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
1637 "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
1638 "Class\tCLSID\tContext\tComponent_\n"
1639 "{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"
1640 "{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"
1641 "{57C413FB-CA02-498A-81F6-7E769BDB7C97}\tLocalServer\tprogid\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n";
1642
1643static const char rpi_extension_dat[] =
1644 "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1645 "s255\ts72\tS255\tS64\ts38\n"
1646 "Extension\tExtension\tComponent_\n"
1647 "winetest\tprogid\tWinetest.Extension\t\tprogid\n";
1648
1649static const char rpi_verb_dat[] =
1650 "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1651 "s255\ts32\tI2\tL255\tL255\n"
1652 "Verb\tExtension_\tVerb\n"
1653 "winetest\tOpen\t1\t&Open\t/argument\n";
1654
1655static const char rpi_progid_dat[] =
1656 "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
1657 "s255\tS255\tS38\tL255\tS72\tI2\n"
1658 "ProgId\tProgId\n"
1659 "Winetest.Class.1\t\t{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tdescription\t\t\n"
1660 "Winetest.Class\tWinetest.Class.1\t\tdescription\t\t\n"
1661 "Winetest.Class.2\t\t{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tdescription\t\t\n"
1662 "Winetest.VerClass.1\t\t{904E6BC9-F57F-4412-B460-D40DE2F256E2}\tdescription\t\t\n"
1663 "Winetest.VerClass\tWinetest.VerClass.1\t\tdescription\t\t\n"
1664 "Winetest.NoProgIdClass.1\t\t{57C413FB-CA02-498A-81F6-7E769BDB7C97}\tdescription\t\t\n"
1665 "Winetest.NoProgIdClass\tWinetest.NoProgIdClass.1\t\tdescription\t\t\n"
1666 "Winetest.Orphaned\t\t\tdescription\t\t\n"
1667 "Winetest.Orphaned2\t\t\tdescription\t\t\n"
1668 "Winetest.Extension\t\t\tdescription\t\t\n";
1669
1670static const char rpi_install_exec_seq_dat[] =
1671 "Action\tCondition\tSequence\n"
1672 "s72\tS255\tI2\n"
1673 "InstallExecuteSequence\tAction\n"
1674 "LaunchConditions\t\t100\n"
1675 "CostInitialize\t\t800\n"
1676 "FileCost\t\t900\n"
1677 "CostFinalize\t\t1000\n"
1678 "InstallValidate\t\t1400\n"
1679 "InstallInitialize\t\t1500\n"
1680 "ProcessComponents\t\t1600\n"
1681 "RemoveFiles\t\t1700\n"
1682 "UnregisterClassInfo\t\t3000\n"
1683 "UnregisterExtensionInfo\t\t3200\n"
1684 "UnregisterProgIdInfo\t\t3400\n"
1685 "upi_immediate\tREMOVE\t3401\n"
1686 "upi_deferred\tREMOVE\t3402\n"
1687 "InstallFiles\t\t3600\n"
1688 "RegisterClassInfo\t\t4000\n"
1689 "RegisterExtensionInfo\t\t4200\n"
1690 "RegisterProgIdInfo\t\t4400\n"
1691 "rpi_immediate\tNOT REMOVE\t4401\n"
1692 "rpi_deferred\tNOT REMOVE\t4402\n"
1693 "RegisterProduct\t\t5000\n"
1694 "PublishFeatures\t\t5100\n"
1695 "PublishProduct\t\t5200\n"
1696 "UnpublishFeatures\t\t5300\n"
1697 "InstallFinalize\t\t6000\n";
1698
1699static const char rpi_custom_action_dat[] =
1700 "Action\tType\tSource\tTarget\n"
1701 "s72\ti2\tS64\tS0\n"
1702 "CustomAction\tAction\n"
1703 "rpi_immediate\t1\tcustom.dll\trpi_absent\n"
1704 "rpi_deferred\t1025\tcustom.dll\trpi_present\n"
1705 "upi_immediate\t1\tcustom.dll\trpi_present\n"
1706 "upi_deferred\t1025\tcustom.dll\trpi_absent\n";
1707
1708static const char rmi_file_dat[] =
1709 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1710 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1711 "File\tFile\n"
1712 "mime.txt\tmime\tmime.txt\t1000\t\t\t8192\t1\n";
1713
1714static const char rmi_feature_dat[] =
1715 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1716 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1717 "Feature\tFeature\n"
1718 "mime\t\t\tmime feature\t1\t2\tMSITESTDIR\t0\n";
1719
1720static const char rmi_feature_comp_dat[] =
1721 "Feature_\tComponent_\n"
1722 "s38\ts72\n"
1723 "FeatureComponents\tFeature_\tComponent_\n"
1724 "mime\tmime\n";
1725
1726static const char rmi_component_dat[] =
1727 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1728 "s72\tS38\ts72\ti2\tS255\tS72\n"
1729 "Component\tComponent\n"
1730 "mime\t{A1D630CE-13A7-4882-AFDD-148E2BBAFC6D}\tMSITESTDIR\t0\t\tmime.txt\n";
1731
1732static const char rmi_extension_dat[] =
1733 "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1734 "s255\ts72\tS255\tS64\ts38\n"
1735 "Extension\tExtension\tComponent_\n"
1736 "mime\tmime\t\tmime/type\tmime\n";
1737
1738static const char rmi_verb_dat[] =
1739 "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1740 "s255\ts32\tI2\tL255\tL255\n"
1741 "Verb\tExtension_\tVerb\n"
1742 "mime\tOpen\t1\t&Open\t/argument\n";
1743
1744static const char rmi_mime_dat[] =
1745 "ContentType\tExtension_\tCLSID\n"
1746 "s64\ts255\tS38\n"
1747 "MIME\tContentType\n"
1748 "mime/type\tmime\t\n";
1749
1750static const char rmi_install_exec_seq_dat[] =
1751 "Action\tCondition\tSequence\n"
1752 "s72\tS255\tI2\n"
1753 "InstallExecuteSequence\tAction\n"
1754 "LaunchConditions\t\t100\n"
1755 "CostInitialize\t\t800\n"
1756 "FileCost\t\t900\n"
1757 "CostFinalize\t\t1000\n"
1758 "InstallValidate\t\t1400\n"
1759 "InstallInitialize\t\t1500\n"
1760 "ProcessComponents\t\t1600\n"
1761 "RemoveFiles\t\t1700\n"
1762 "InstallFiles\t\t2000\n"
1763 "UnregisterExtensionInfo\t\t3000\n"
1764 "UnregisterMIMEInfo\t\t3500\n"
1765 "umi_immediate\tREMOVE\t3501\n"
1766 "umi_deferred\tREMOVE\t3502\n"
1767 "RegisterExtensionInfo\t\t4000\n"
1768 "RegisterMIMEInfo\t\t4500\n"
1769 "rmi_immediate\tNOT REMOVE\t4501\n"
1770 "rmi_deferred\tNOT REMOVE\t4502\n"
1771 "RegisterProduct\t\t5000\n"
1772 "PublishFeatures\t\t5100\n"
1773 "PublishProduct\t\t5200\n"
1774 "UnpublishFeatures\t\t5300\n"
1775 "InstallFinalize\t\t6000\n";
1776
1777static const char rmi_custom_action_dat[] =
1778 "Action\tType\tSource\tTarget\n"
1779 "s72\ti2\tS64\tS0\n"
1780 "CustomAction\tAction\n"
1781 "rmi_immediate\t1\tcustom.dll\trmi_absent\n"
1782 "rmi_deferred\t1025\tcustom.dll\trmi_present\n"
1783 "umi_immediate\t1\tcustom.dll\trmi_present\n"
1784 "umi_deferred\t1025\tcustom.dll\trmi_absent\n";
1785
1786static const char pa_file_dat[] =
1787 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1788 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1789 "File\tFile\n"
1790 "fake_local.txt\tfake_local\tfake_local.txt\t1000\t\t\t8192\t1\n"
1791 "win32.txt\twin32\twin32.txt\t1000\t\t\t8192\t1\n"
1792 "manifest.txt\twin32\tmanifest.txt\t1000\t\t\t8192\t1\n"
1793 "win32_local.txt\twin32_local\twin32_local.txt\t1000\t\t\t8192\t1\n"
1794 "manifest_local.txt\twin32_local\tmanifest_local.txt\t1000\t\t\t8192\t1\n"
1795 "dotnet.txt\tdotnet\tdotnet.txt\t1000\t\t\t8192\t1\n"
1796 "dotnet_local.txt\tdotnet_local\tdotnet_local.txt\t1000\t\t\t8192\t1\n"
1797 "application_win32.txt\twin32_local\tapplication_win32.txt\t1000\t\t\t8192\t1\n"
1798 "application_dotnet.txt\tdotnet_local\tapplication_dotnet.txt\t1000\t\t\t8192\t1\n";
1799
1800static const char pa_feature_dat[] =
1801 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1802 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1803 "Feature\tFeature\n"
1804 "assembly\t\t\tassembly feature\t1\t2\tMSITESTDIR\t0\n";
1805
1806static const char pa_feature_comp_dat[] =
1807 "Feature_\tComponent_\n"
1808 "s38\ts72\n"
1809 "FeatureComponents\tFeature_\tComponent_\n"
1810 "assembly\tfake_local\n"
1811 "assembly\twin32\n"
1812 "assembly\twin32_local\n"
1813 "assembly\tdotnet\n"
1814 "assembly\tdotnet_local\n";
1815
1816static const char pa_component_dat[] =
1817 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1818 "s72\tS38\ts72\ti2\tS255\tS72\n"
1819 "Component\tComponent\n"
1820 "fake_local\t{F515549D-7E61-425D-AAC1-9BEF2E066D06}\tMSITESTDIR\t0\t\tfake_local.txt\n"
1821 "win32\t{F515549E-7E61-425D-AAC1-9BEF2E066D06}\tMSITESTDIR\t0\t\twin32.txt\n"
1822 "win32_local\t{D34D3FBA-6789-4E57-AD1A-1281297DC201}\tMSITESTDIR\t0\t\twin32_local.txt\n"
1823 "dotnet\t{8943164F-2B31-4C09-A894-493A8CBDE0A4}\tMSITESTDIR\t0\t\tdotnet.txt\n"
1824 "dotnet_local\t{4E8567E8-8EAE-4E36-90F1-B99D33C663F8}\tMSITESTDIR\t0\t\tdotnet_local.txt\n";
1825
1826static const char pa_msi_assembly_dat[] =
1827 "Component_\tFeature_\tFile_Manifest\tFile_Application\tAttributes\n"
1828 "s72\ts38\tS72\tS72\tI2\n"
1829 "MsiAssembly\tComponent_\n"
1830 "fake_local\tassembly\t\tnonexistent.txt\t0\n"
1831 "win32\tassembly\tmanifest.txt\t\t1\n"
1832 "win32_local\tassembly\tmanifest_local.txt\tapplication_win32.txt\t1\n"
1833 "dotnet\tassembly\t\t\t0\n"
1834 "dotnet_local\tassembly\t\tapplication_dotnet.txt\t0\n";
1835
1836static const char pa_msi_assembly_name_dat[] =
1837 "Component_\tName\tValue\n"
1838 "s72\ts255\ts255\n"
1839 "MsiAssemblyName\tComponent_\tName\n"
1840 "fake_local\tName\tWine.Fake.Application.Assembly\n"
1841 "fake_local\tprocessorArchitecture\tx86\n"
1842 "fake_local\tpublicKeyToken\tabcdef0123456789\n"
1843 "fake_local\ttype\twin32\n"
1844 "fake_local\tversion\t1.0.0.0\n"
1845 "win32\tName\tWine.Win32.Assembly\n"
1846 "win32\tprocessorArchitecture\tx86\n"
1847 "win32\tpublicKeyToken\tabcdef0123456789\n"
1848 "win32\ttype\twin32\n"
1849 "win32\tversion\t1.0.0.0\n"
1850 "win32_local\tName\tWine.Win32.Local.Assembly\n"
1851 "win32_local\tprocessorArchitecture\tx86\n"
1852 "win32_local\tpublicKeyToken\tabcdef0123456789\n"
1853 "win32_local\ttype\twin32\n"
1854 "win32_local\tversion\t1.0.0.0\n"
1855 "dotnet\tName\tWine.Dotnet.Assembly\n"
1856 "dotnet\tprocessorArchitecture\tMSIL\n"
1857 "dotnet\tpublicKeyToken\tabcdef0123456789\n"
1858 "dotnet\tculture\tneutral\n"
1859 "dotnet\tversion\t1.0.0.0\n"
1860 "dotnet_local\tName\tWine.Dotnet.Local.Assembly\n"
1861 "dotnet_local\tprocessorArchitecture\tMSIL\n"
1862 "dotnet_local\tpublicKeyToken\tabcdef0123456789\n"
1863 "dotnet_local\tculture\tneutral\n"
1864 "dotnet_local\tversion\t1.0.0.0\n";
1865
1866static const char pa_install_exec_seq_dat[] =
1867 "Action\tCondition\tSequence\n"
1868 "s72\tS255\tI2\n"
1869 "InstallExecuteSequence\tAction\n"
1870 "LaunchConditions\t\t100\n"
1871 "CostInitialize\t\t800\n"
1872 "FileCost\t\t900\n"
1873 "CostFinalize\t\t1000\n"
1874 "InstallValidate\t\t1400\n"
1875 "InstallInitialize\t\t1500\n"
1876 "ProcessComponents\t\t1600\n"
1877 "MsiPublishAssemblies\t\t3000\n"
1878 "pa_immediate\tNOT REMOVE AND NOT ALLUSERS\t3001\n"
1879 "pa_deferred\tNOT REMOVE AND NOT ALLUSERS\t3002\n"
1880 "MsiUnpublishAssemblies\t\t4000\n"
1881 "ua_immediate\tREMOVE AND NOT ALLUSERS\t4001\n"
1882 "ua_deferred\tREMOVE AND NOT ALLUSERS\t4002\n"
1883 "RegisterProduct\t\t5000\n"
1884 "PublishFeatures\t\t5100\n"
1885 "PublishProduct\t\t5200\n"
1886 "UnpublishFeatures\t\t5300\n"
1887 "InstallFinalize\t\t6000\n";
1888
1889static const char pa_custom_action_dat[] =
1890 "Action\tType\tSource\tTarget\n"
1891 "s72\ti2\tS64\tS0\n"
1892 "CustomAction\tAction\n"
1893 "pa_immediate\t1\tcustom.dll\tpa_absent\n"
1894 "pa_deferred\t1025\tcustom.dll\tpa_present\n"
1895 "ua_immediate\t1\tcustom.dll\tpa_present\n"
1896 "ua_deferred\t1025\tcustom.dll\tpa_absent\n";
1897
1898static const char rep_file_dat[] =
1899 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1900 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1901 "File\tFile\n"
1902 "rep.txt\trep\trep.txt\t1000\t\t\t8192\t1\n";
1903
1904static const char rep_feature_dat[] =
1905 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1906 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1907 "Feature\tFeature\n"
1908 "rep\t\t\trep feature\t1\t2\tMSITESTDIR\t0\n";
1909
1910static const char rep_feature_comp_dat[] =
1911 "Feature_\tComponent_\n"
1912 "s38\ts72\n"
1913 "FeatureComponents\tFeature_\tComponent_\n"
1914 "rep\trep\n";
1915
1916static const char rep_component_dat[] =
1917 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1918 "s72\tS38\ts72\ti2\tS255\tS72\n"
1919 "Component\tComponent\n"
1920 "rep\t{A24FAF2A-3B2E-41EF-AA78-331542E1A29D}\tMSITESTDIR\t0\t\trep.txt\n";
1921
1922static const char rep_upgrade_dat[] =
1923 "UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
1924 "s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
1925 "Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
1926 "{2967C1CC-34D4-42EE-8D96-CD6836F192BF}\t\t\t\t256\t\tPRODUCT\n";
1927
1928static const char rep_property_dat[] =
1929 "Property\tValue\n"
1930 "s72\tl0\n"
1931 "Property\tProperty\n"
1932 "HASUIRUN\t0\n"
1933 "INSTALLLEVEL\t3\n"
1934 "InstallMode\tTypical\n"
1935 "Manufacturer\tWine\n"
1936 "PIDTemplate\t###-#######\n"
1937 "ProductCode\t{1699F0BB-0B61-4A89-AFE4-CFD60DFD76F3}\n"
1938 "ProductLanguage\t1033\n"
1939 "ProductName\tMSITEST\n"
1940 "ProductVersion\t1.1.1\n"
1941 "UpgradeCode\t{2967C1CC-34D4-42EE-8D96-CD6836F192BF}\n"
1942 "PRODUCT\t2F41860D-7B4C-4DA7-BED9-B64F26594C56\n"
1943 "MSIFASTINSTALL\t1\n";
1944
1945static const char rep_install_exec_seq_dat[] =
1946 "Action\tCondition\tSequence\n"
1947 "s72\tS255\tI2\n"
1948 "InstallExecuteSequence\tAction\n"
1949 "FindRelatedProducts\t\t100\n"
1950 "CostInitialize\t\t800\n"
1951 "FileCost\t\t900\n"
1952 "CostFinalize\t\t1000\n"
1953 "InstallValidate\t\t1400\n"
1954 "RemoveExistingProducts\t\t1499\n"
1955 "InstallInitialize\t\t1500\n"
1956 "ProcessComponents\t\t1600\n"
1957 "RemoveFiles\t\t1700\n"
1958 "InstallFiles\t\t2000\n"
1959 "UnregisterExtensionInfo\t\t3000\n"
1960 "UnregisterMIMEInfo\t\t3500\n"
1961 "RegisterExtensionInfo\t\t4000\n"
1962 "RegisterMIMEInfo\t\t4500\n"
1963 "RegisterProduct\t\t5000\n"
1964 "PublishFeatures\t\t5100\n"
1965 "PublishProduct\t\t5200\n"
1966 "UnpublishFeatures\t\t5300\n"
1967 "InstallFinalize\t\t6000\n";
1968
1969static const msi_table env_tables[] =
1970{
1971 ADD_TABLE(component),
1974 ADD_TABLE(feature_comp),
1975 ADD_TABLE(file),
1976 ADD_TABLE(env_install_exec_seq),
1977 ADD_TABLE(env_custom_action),
1980 ADD_TABLE(env_environment)
1981};
1982
1983static const msi_table pp_tables[] =
1984{
1985 ADD_TABLE(pp_component),
1987 ADD_TABLE(rof_feature),
1988 ADD_TABLE(rof_feature_comp),
1989 ADD_TABLE(rof_file),
1990 ADD_TABLE(pp_install_exec_seq),
1991 ADD_TABLE(pp_custom_action),
1992 ADD_TABLE(rof_media),
1994};
1995
1996static const msi_table ppc_tables[] =
1997{
1998 ADD_TABLE(ppc_component),
2000 ADD_TABLE(rof_feature),
2001 ADD_TABLE(ppc_feature_comp),
2002 ADD_TABLE(ppc_file),
2003 ADD_TABLE(pp_install_exec_seq),
2004 ADD_TABLE(pp_custom_action),
2005 ADD_TABLE(ppc_media),
2007};
2008
2009static const msi_table rem_tables[] =
2010{
2011 ADD_TABLE(rem_component),
2013 ADD_TABLE(rof_feature),
2014 ADD_TABLE(rem_feature_comp),
2015 ADD_TABLE(rem_file),
2016 ADD_TABLE(rem_install_exec_seq),
2017 ADD_TABLE(rof_media),
2019 ADD_TABLE(rem_remove_files),
2020};
2021
2022static const msi_table mov_tables[] =
2023{
2024 ADD_TABLE(cwd_component),
2026 ADD_TABLE(rof_feature),
2027 ADD_TABLE(ci2_feature_comp),
2028 ADD_TABLE(ci2_file),
2029 ADD_TABLE(mov_install_exec_seq),
2030 ADD_TABLE(mov_custom_action),
2031 ADD_TABLE(rof_media),
2033 ADD_TABLE(mov_move_file),
2034};
2035
2036static const msi_table df_tables[] =
2037{
2038 ADD_TABLE(rof_component),
2039 ADD_TABLE(df_directory),
2040 ADD_TABLE(rof_feature),
2041 ADD_TABLE(rof_feature_comp),
2042 ADD_TABLE(rof_file),
2043 ADD_TABLE(install_exec_seq),
2044 ADD_TABLE(rof_media),
2046 ADD_TABLE(df_duplicate_file),
2047};
2048
2049static const msi_table wrv_tables[] =
2050{
2051 ADD_TABLE(wrv_component),
2053 ADD_TABLE(wrv_feature),
2054 ADD_TABLE(wrv_feature_comp),
2055 ADD_TABLE(wrv_install_exec_seq),
2056 ADD_TABLE(wrv_custom_action),
2059 ADD_TABLE(wrv_registry),
2060 ADD_TABLE(wrv_remove_registry),
2061};
2062
2063static const msi_table cf_tables[] =
2064{
2065 ADD_TABLE(cf_component),
2066 ADD_TABLE(cf_directory),
2067 ADD_TABLE(cf_feature),
2068 ADD_TABLE(cf_feature_comp),
2069 ADD_TABLE(cf_file),
2070 ADD_TABLE(cf_create_folders),
2071 ADD_TABLE(cf_install_exec_seq),
2072 ADD_TABLE(cf_custom_action),
2075};
2076
2077static const msi_table sss_tables[] =
2078{
2079 ADD_TABLE(component),
2082 ADD_TABLE(feature_comp),
2083 ADD_TABLE(file),
2084 ADD_TABLE(sss_install_exec_seq),
2085 ADD_TABLE(sss_service_control),
2086 ADD_TABLE(sss_custom_action),
2089};
2090
2091static const msi_table sds_tables[] =
2092{
2093 ADD_TABLE(component),
2096 ADD_TABLE(feature_comp),
2097 ADD_TABLE(file),
2098 ADD_TABLE(sds_install_exec_seq),
2099 ADD_TABLE(sds_custom_action),
2100 ADD_TABLE(service_control),
2101 ADD_TABLE(service_install),
2104};
2105
2106static const msi_table sis_tables[] =
2107{
2108 ADD_TABLE(component),
2111 ADD_TABLE(feature_comp),
2112 ADD_TABLE(file),
2113 ADD_TABLE(sis_install_exec_seq),
2114 ADD_TABLE(sis_custom_action),
2115 ADD_TABLE(service_install2),
2118};
2119
2120static const msi_table sr_tables[] =
2121{
2122 ADD_TABLE(sr_component),
2124 ADD_TABLE(sr_feature),
2125 ADD_TABLE(sr_feature_comp),
2126 ADD_TABLE(sr_file),
2127 ADD_TABLE(sr_selfreg),
2128 ADD_TABLE(sr_install_exec_seq),
2129 ADD_TABLE(sr_custom_action),
2132};
2133
2134static const msi_table font_tables[] =
2135{
2136 ADD_TABLE(font_component),
2138 ADD_TABLE(font_feature),
2139 ADD_TABLE(font_feature_comp),
2140 ADD_TABLE(font_file),
2141 ADD_TABLE(font),
2142 ADD_TABLE(font_install_exec_seq),
2143 ADD_TABLE(font_custom_action),
2144 ADD_TABLE(font_media),
2146};
2147
2148static const msi_table vp_tables[] =
2149{
2150 ADD_TABLE(component),
2153 ADD_TABLE(feature_comp),
2154 ADD_TABLE(file),
2155 ADD_TABLE(vp_custom_action),
2156 ADD_TABLE(vp_install_exec_seq),
2158 ADD_TABLE(vp_property)
2159};
2160
2161static const msi_table odbc_tables[] =
2162{
2163 ADD_TABLE(odbc_component),
2165 ADD_TABLE(odbc_feature),
2166 ADD_TABLE(odbc_feature_comp),
2167 ADD_TABLE(odbc_file),
2168 ADD_TABLE(odbc_driver),
2169 ADD_TABLE(odbc_translator),
2170 ADD_TABLE(odbc_datasource),
2171 ADD_TABLE(odbc_install_exec_seq),
2172 ADD_TABLE(odbc_custom_action),
2173 ADD_TABLE(odbc_media),
2175};
2176
2177static const msi_table tl_tables[] =
2178{
2179 ADD_TABLE(tl_component),
2181 ADD_TABLE(tl_feature),
2182 ADD_TABLE(tl_feature_comp),
2183 ADD_TABLE(tl_file),
2184 ADD_TABLE(tl_typelib),
2185 ADD_TABLE(tl_install_exec_seq),
2186 ADD_TABLE(tl_custom_action),
2189};
2190
2191static const msi_table crs_tables[] =
2192{
2193 ADD_TABLE(crs_component),
2195 ADD_TABLE(crs_feature),
2196 ADD_TABLE(crs_feature_comp),
2197 ADD_TABLE(crs_file),
2198 ADD_TABLE(crs_shortcut),
2199 ADD_TABLE(crs_install_exec_seq),
2200 ADD_TABLE(crs_custom_action),
2203};
2204
2205static const msi_table pub_tables[] =
2206{
2208 ADD_TABLE(pub_component),
2209 ADD_TABLE(pub_feature),
2210 ADD_TABLE(pub_feature_comp),
2211 ADD_TABLE(pub_file),
2212 ADD_TABLE(pub_publish_component),
2213 ADD_TABLE(pub_install_exec_seq),
2214 ADD_TABLE(pub_custom_action),
2217};
2218
2219static const msi_table rd_tables[] =
2220{
2222 ADD_TABLE(rd_component),
2223 ADD_TABLE(rd_feature),
2224 ADD_TABLE(rd_feature_comp),
2225 ADD_TABLE(rd_file),
2226 ADD_TABLE(rd_duplicate_file),
2227 ADD_TABLE(rd_install_exec_seq),
2228 ADD_TABLE(rd_custom_action),
2231};
2232
2233static const msi_table frp_tables[] =
2234{
2236 ADD_TABLE(frp_component),
2237 ADD_TABLE(frp_feature),
2238 ADD_TABLE(frp_feature_comp),
2239 ADD_TABLE(frp_file),
2240 ADD_TABLE(frp_upgrade),
2241 ADD_TABLE(frp_custom_action),
2242 ADD_TABLE(frp_install_exec_seq),
2245};
2246
2247static const msi_table ini_tables[] =
2248{
2250 ADD_TABLE(ini_component),
2251 ADD_TABLE(ini_feature),
2252 ADD_TABLE(ini_feature_comp),
2253 ADD_TABLE(ini_file),
2254 ADD_TABLE(ini_ini_file),
2255 ADD_TABLE(ini_remove_ini_file),
2256 ADD_TABLE(ini_install_exec_seq),
2257 ADD_TABLE(ini_custom_action),
2260};
2261
2262static const msi_table rci_tables[] =
2263{
2265 ADD_TABLE(rci_component),
2266 ADD_TABLE(rci_feature),
2267 ADD_TABLE(rci_feature_comp),
2268 ADD_TABLE(rci_file),
2269 ADD_TABLE(rci_appid),
2270 ADD_TABLE(rci_class),
2271 ADD_TABLE(rci_install_exec_seq),
2272 ADD_TABLE(rci_custom_action),
2275};
2276
2277static const msi_table rei_tables[] =
2278{
2280 ADD_TABLE(rei_component),
2281 ADD_TABLE(rei_feature),
2282 ADD_TABLE(rei_feature_comp),
2283 ADD_TABLE(rei_file),
2284 ADD_TABLE(rei_extension),
2285 ADD_TABLE(rei_verb),
2286 ADD_TABLE(rei_progid),
2287 ADD_TABLE(rei_install_exec_seq),
2288 ADD_TABLE(rei_custom_action),
2291};
2292
2293static const msi_table rpi_tables[] =
2294{
2296 ADD_TABLE(rpi_component),
2297 ADD_TABLE(rpi_feature),
2298 ADD_TABLE(rpi_feature_comp),
2299 ADD_TABLE(rpi_file),
2300 ADD_TABLE(rpi_appid),
2301 ADD_TABLE(rpi_class),
2302 ADD_TABLE(rpi_extension),
2303 ADD_TABLE(rpi_verb),
2304 ADD_TABLE(rpi_progid),
2305 ADD_TABLE(rpi_install_exec_seq),
2306 ADD_TABLE(rpi_custom_action),
2309};
2310
2311static const msi_table rmi_tables[] =
2312{
2314 ADD_TABLE(rmi_component),
2315 ADD_TABLE(rmi_feature),
2316 ADD_TABLE(rmi_feature_comp),
2317 ADD_TABLE(rmi_file),
2318 ADD_TABLE(rmi_extension),
2319 ADD_TABLE(rmi_verb),
2320 ADD_TABLE(rmi_mime),
2321 ADD_TABLE(rmi_install_exec_seq),
2322 ADD_TABLE(rmi_custom_action),
2325};
2326
2327static const msi_table pa_tables[] =
2328{
2330 ADD_TABLE(pa_component),
2331 ADD_TABLE(pa_feature),
2332 ADD_TABLE(pa_feature_comp),
2333 ADD_TABLE(pa_file),
2334 ADD_TABLE(pa_msi_assembly),
2335 ADD_TABLE(pa_msi_assembly_name),
2336 ADD_TABLE(pa_install_exec_seq),
2337 ADD_TABLE(pa_custom_action),
2340};
2341
2342static const msi_table rep_tables[] =
2343{
2345 ADD_TABLE(rep_component),
2346 ADD_TABLE(rep_feature),
2347 ADD_TABLE(rep_feature_comp),
2348 ADD_TABLE(rep_file),
2349 ADD_TABLE(rep_upgrade),
2350 ADD_TABLE(rep_property),
2351 ADD_TABLE(rep_install_exec_seq),
2353};
2354
2355/* cabinet definitions */
2356
2357/* make the max size large so there is only one cab file */
2358#define MEDIA_SIZE 0x7FFFFFFF
2359
2360static char *get_user_sid(void)
2361{
2362 HANDLE token;
2363 DWORD size = 0;
2365 char *usersid = NULL;
2366
2369
2370 user = malloc(size);
2372 ConvertSidToStringSidA(user->User.Sid, &usersid);
2373 free(user);
2374
2376 return usersid;
2377}
2378
2379static void create_test_files(void)
2380{
2381 CreateDirectoryA("msitest", NULL);
2382 create_file("msitest\\one.txt", 100);
2383 CreateDirectoryA("msitest\\first", NULL);
2384 create_file("msitest\\first\\two.txt", 100);
2385 CreateDirectoryA("msitest\\second", NULL);
2386 create_file("msitest\\second\\three.txt", 100);
2387
2388 create_file("four.txt", 100);
2389 create_file("five.txt", 100);
2390 create_cab_file("msitest.cab", MEDIA_SIZE, "four.txt\0five.txt\0");
2391
2392 create_file("msitest\\filename", 100);
2393 create_file("msitest\\service.exe", 100);
2394 create_file("msitest\\service2.exe", 100);
2395
2396 DeleteFileA("four.txt");
2397 DeleteFileA("five.txt");
2398}
2399
2400static void delete_test_files(void)
2401{
2402 DeleteFileA("msitest.msi");
2403 DeleteFileA("msitest.cab");
2404 DeleteFileA("msitest\\second\\three.txt");
2405 DeleteFileA("msitest\\first\\two.txt");
2406 DeleteFileA("msitest\\one.txt");
2407 DeleteFileA("msitest\\service.exe");
2408 DeleteFileA("msitest\\service2.exe");
2409 DeleteFileA("msitest\\filename");
2410 RemoveDirectoryA("msitest\\second");
2411 RemoveDirectoryA("msitest\\first");
2412 RemoveDirectoryA("msitest");
2413}
2414
2415static void delete_pfmsitest_files(void)
2416{
2417 SHFILEOPSTRUCTA shfl;
2418 CHAR path[MAX_PATH+11];
2419
2421 lstrcatA(path, "\\msitest\\*");
2422 path[strlen(path) + 1] = '\0';
2423
2424 shfl.hwnd = NULL;
2425 shfl.wFunc = FO_DELETE;
2426 shfl.pFrom = path;
2427 shfl.pTo = NULL;
2429
2430 SHFileOperationA(&shfl);
2431
2433 lstrcatA(path, "\\msitest");
2435}
2436
2438{
2439 char val[MAX_PATH];
2440 DWORD size, type;
2441 LONG res;
2442
2443 size = MAX_PATH;
2444 val[0] = '\0';
2445 res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size);
2446 ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
2447 ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %lu\n", type);
2449 {
2450 if (bcase)
2451 ok_(__FILE__, line)(!strcmp(val, expected), "got %s\n", debugstr_a(val));
2452 else
2453 ok_(__FILE__, line)(!strcasecmp(val, expected), "got %s\n", debugstr_a(val));
2454 }
2455}
2456
2457static void check_reg_multi(HKEY prodkey, const char *name, const char *expect, DWORD line)
2458{
2459 char val[MAX_PATH];
2460 DWORD expect_size = 0, size, type;
2461 const char *p;
2462 LONG res;
2463
2464 for (p = expect; *p; p += strlen(p) + 1)
2465 ;
2466 expect_size = (p + 1) - expect;
2467
2468 size = MAX_PATH;
2469 val[0] = '\0';
2470 res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size);
2471 ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
2472 ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %lu\n", type);
2473 ok_(__FILE__, line)(size == expect_size, "expected size %lu, got %lu\n", expect_size, size);
2474 ok_(__FILE__, line)(!memcmp(val, expect, size), "got %s\n", debugstr_an(val, size));
2475}
2476
2478{
2479 DWORD val, size, type;
2480 LONG res;
2481
2482 size = sizeof(DWORD);
2483 res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)&val, &size);
2484 ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
2485 ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %lu\n", type);
2487 ok_(__FILE__, line)(val == expected, "Expected %lu, got %lu\n", expected, val);
2488}
2489
2490#define CHECK_REG_STR(prodkey, name, expected) \
2491 check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__);
2492
2493#define CHECK_DEL_REG_STR(prodkey, name, expected) \
2494 do { \
2495 check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__); \
2496 RegDeleteValueA(prodkey, name); \
2497 } while(0)
2498
2499#define CHECK_DEL_REG_STR_TODO(prodkey, name, expected) \
2500 do { \
2501 check_reg_str(prodkey, name, expected, TRUE, TRUE, __LINE__); \
2502 RegDeleteValueA(prodkey, name); \
2503 } while(0)
2504
2505#define CHECK_REG_ISTR(prodkey, name, expected) \
2506 check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__);
2507
2508#define CHECK_DEL_REG_ISTR(prodkey, name, expected) \
2509 do { \
2510 check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__); \
2511 RegDeleteValueA(prodkey, name); \
2512 } while(0)
2513
2514#define CHECK_REG_MULTI(key, name, expect) \
2515 check_reg_multi(key, name, expect, __LINE__);
2516
2517#define CHECK_DEL_REG_MULTI(key, name, expect) \
2518 do { \
2519 check_reg_multi(key, name, expect, __LINE__); \
2520 RegDeleteValueA(key, name); \
2521 } while(0)
2522
2523#define CHECK_REG_DWORD(prodkey, name, expected) \
2524 check_reg_dword(prodkey, name, expected, FALSE, __LINE__);
2525
2526#define CHECK_REG_DWORD_TODO(prodkey, name, expected) \
2527 check_reg_dword(prodkey, name, expected, TRUE, __LINE__);
2528
2529#define CHECK_DEL_REG_DWORD(prodkey, name, expected) \
2530 do { \
2531 check_reg_dword(prodkey, name, expected, FALSE, __LINE__); \
2532 RegDeleteValueA(prodkey, name); \
2533 } while(0)
2534
2535#define CHECK_DEL_REG_DWORD_TODO(prodkey, name, expected) \
2536 do { \
2537 check_reg_dword(prodkey, name, expected, TRUE, __LINE__); \
2538 RegDeleteValueA(prodkey, name); \
2539 } while(0)
2540
2542{
2543 SYSTEMTIME systime;
2544
2545 static const char date_fmt[] = "%d%02d%02d";
2546 GetLocalTime(&systime);
2547 sprintf(date, date_fmt, systime.wYear, systime.wMonth, systime.wDay);
2548}
2549
2550/* EstimatedSize is the size in KiB of .msi + installed files, rounded up to page size. */
2552{
2553 SYSTEM_INFO si;
2554 HANDLE file;
2555 DWORD size;
2556
2557 GetSystemInfo(&si);
2558
2560 size = ((GetFileSize(file, NULL) + si.dwPageSize - 1) / si.dwPageSize + 1);
2561 size = size * si.dwPageSize / 1024;
2563 return size;
2564}
2565
2566static void extract_resource(const char *name, const char *type, const char *path)
2567{
2568 DWORD written;
2569 HANDLE file;
2570 HRSRC res;
2571 void *ptr;
2572
2574 ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %lu\n", path, GetLastError());
2575
2577 ok( res != 0, "couldn't find resource\n" );
2580 ok( written == SizeofResource( GetModuleHandleA(NULL), res ), "couldn't write resource\n" );
2581 CloseHandle( file );
2582}
2583
2584static void test_register_product(void)
2585{
2586 UINT r;
2587 LONG res;
2588 HKEY hkey, props, usage;
2589 LPSTR usersid;
2590 char date[MAX_PATH], temp[MAX_PATH], keypath[MAX_PATH], path[MAX_PATH];
2591 DWORD size, type;
2592
2593 static const CHAR uninstall[] = "Software\\Microsoft\\Windows\\CurrentVersion"
2594 "\\Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
2595 static const CHAR userdata[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
2596 "\\UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2597 static const CHAR ugkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
2598 "\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
2599 static const CHAR userugkey[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
2600 "\\51AAE0C44620A5E4788506E91F249BD2";
2601
2602 if (!is_process_elevated())
2603 {
2604 skip("process is limited\n");
2605 return;
2606 }
2607
2608 if (!(usersid = get_user_sid()))
2609 return;
2610
2613
2614 CreateDirectoryA("msitest", NULL);
2615 create_file("msitest\\maximus", 500);
2616
2618
2620
2621 /* RegisterProduct */
2622 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1");
2624 {
2625 skip("Not enough rights to perform tests\n");
2626 goto error;
2627 }
2628 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
2629 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2630 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2631
2632 res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey);
2633 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
2634
2635 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
2636 ok(!res, "got %ld\n", res);
2637
2638 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2639 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2640 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2641 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2642 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2643 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2644 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2645 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", "");
2646 CHECK_DEL_REG_STR(hkey, "Comments", "");
2647 CHECK_DEL_REG_STR(hkey, "Contact", "");
2648 CHECK_DEL_REG_STR(hkey, "HelpLink", "");
2649 CHECK_DEL_REG_STR(hkey, "HelpTelephone", "");
2650 CHECK_DEL_REG_STR(hkey, "InstallLocation", "");
2651 CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
2652 CHECK_DEL_REG_STR(hkey, "Readme", "");
2653 CHECK_DEL_REG_STR(hkey, "Size", "");
2654 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", "");
2655 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", "");
2656 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2657 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2658 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2659 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2660 CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1);
2661 CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
2662
2663 res = RegDeleteKeyA(hkey, "");
2664 ok(!res, "got %ld\n", res);
2665 RegCloseKey(hkey);
2666
2667 sprintf(keypath, userdata, usersid);
2669 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2670
2671 res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
2672 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2673
2674 size = sizeof(path);
2675 RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
2677 RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
2678
2679 CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
2680 CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
2681 CHECK_DEL_REG_STR(props, "InstallDate", date);
2682 CHECK_DEL_REG_STR(props, "InstallSource", temp);
2683 CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2684 CHECK_DEL_REG_STR(props, "Publisher", "Wine");
2685 CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2686 CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", "");
2687 CHECK_DEL_REG_STR(props, "Comments", "");
2688 CHECK_DEL_REG_STR(props, "Contact", "");
2689 CHECK_DEL_REG_STR(props, "HelpLink", "");
2690 CHECK_DEL_REG_STR(props, "HelpTelephone", "");
2691 CHECK_DEL_REG_STR(props, "InstallLocation", "");
2692 CHECK_DEL_REG_DWORD(props, "NoModify", 1);
2693 CHECK_DEL_REG_STR(props, "Readme", "");
2694 CHECK_DEL_REG_STR(props, "Size", "");
2695 CHECK_DEL_REG_STR(props, "URLInfoAbout", "");
2696 CHECK_DEL_REG_STR(props, "URLUpdateInfo", "");
2697 CHECK_DEL_REG_DWORD(props, "Language", 1033);
2698 CHECK_DEL_REG_DWORD(props, "Version", 0x1010001);
2699 CHECK_DEL_REG_DWORD(props, "VersionMajor", 1);
2700 CHECK_DEL_REG_DWORD(props, "VersionMinor", 1);
2701 CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1);
2703
2704 res = RegDeleteKeyA(props, "");
2705 ok(!res, "got %ld\n", res);
2707
2708 res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
2709 todo_wine
2710 {
2711 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2712 }
2713
2714 res = RegDeleteKeyA(usage, "");
2715 todo_wine
2716 ok(!res, "got %ld\n", res);
2718 res = RegDeleteKeyA(hkey, "");
2719 ok(!res, "got %ld\n", res);
2720 RegCloseKey(hkey);
2721
2723 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2724
2725 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
2726
2727 res = RegDeleteKeyA(hkey, "");
2728 ok(!res, "got %ld\n", res);
2729 RegCloseKey(hkey);
2730
2731 /* RegisterProduct, machine */
2732 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1");
2733 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2734 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2735 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2736
2737 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
2738 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
2739
2740 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
2741 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2742
2743 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2744 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2745 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2746 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2747 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2748 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2749 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2750 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", "");
2751 CHECK_DEL_REG_STR(hkey, "Comments", "");
2752 CHECK_DEL_REG_STR(hkey, "Contact", "");
2753 CHECK_DEL_REG_STR(hkey, "HelpLink", "");
2754 CHECK_DEL_REG_STR(hkey, "HelpTelephone", "");
2755 CHECK_DEL_REG_STR(hkey, "InstallLocation", "");
2756 CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
2757 CHECK_DEL_REG_STR(hkey, "Readme", "");
2758 CHECK_DEL_REG_STR(hkey, "Size", "");
2759 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", "");
2760 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", "");
2761 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2762 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2763 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2764 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2765 CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1);
2766 CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
2767
2768 res = RegDeleteKeyA(hkey, "");
2769 ok(!res, "got %ld\n", res);
2770 RegCloseKey(hkey);
2771
2772 sprintf(keypath, userdata, "S-1-5-18");
2774 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2775
2776 res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
2777 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2778
2779 size = sizeof(path);
2780 RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
2782 RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
2783
2784 CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
2785 CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
2786 CHECK_DEL_REG_STR(props, "InstallDate", date);
2787 CHECK_DEL_REG_STR(props, "InstallSource", temp);
2788 CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2789 CHECK_DEL_REG_STR(props, "Publisher", "Wine");
2790 CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2791 CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", "");
2792 CHECK_DEL_REG_STR(props, "Comments", "");
2793 CHECK_DEL_REG_STR(props, "Contact", "");
2794 CHECK_DEL_REG_STR(props, "HelpLink", "");
2795 CHECK_DEL_REG_STR(props, "HelpTelephone", "");
2796 CHECK_DEL_REG_STR(props, "InstallLocation", "");
2797 CHECK_DEL_REG_DWORD(props, "NoModify", 1);
2798 CHECK_DEL_REG_STR(props, "Readme", "");
2799 CHECK_DEL_REG_STR(props, "Size", "");
2800 CHECK_DEL_REG_STR(props, "URLInfoAbout", "");
2801 CHECK_DEL_REG_STR(props, "URLUpdateInfo", "");
2802 CHECK_DEL_REG_DWORD(props, "Language", 1033);
2803 CHECK_DEL_REG_DWORD(props, "Version", 0x1010001);
2804 CHECK_DEL_REG_DWORD(props, "VersionMajor", 1);
2805 CHECK_DEL_REG_DWORD(props, "VersionMinor", 1);
2806 CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1);
2808
2809 res = RegDeleteKeyA(props, "");
2810 ok(!res, "got %ld\n", res);
2812
2813 res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
2814 todo_wine
2815 {
2816 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2817 }
2818
2819 res = RegDeleteKeyA(usage, "");
2820 todo_wine
2821 ok(!res, "got %ld\n", res);
2823 res = RegDeleteKeyA(hkey, "");
2824 ok(!res, "got %ld\n", res);
2825 RegCloseKey(hkey);
2826
2828 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2829
2830 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
2831
2832 res = RegDeleteKeyA(hkey, "");
2833 ok(!res, "got %ld\n", res);
2834 RegCloseKey(hkey);
2835
2836 if (is_wow64 || is_64bit)
2837 {
2840
2841 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1 RP_TEST64=1");
2842 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
2843 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2844 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2845
2846 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
2847 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
2848
2849 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
2850 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %ld\n", res);
2851
2852 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
2853 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2854
2855 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2856 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2857 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2858 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2859 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2860 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2861 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2862 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", "");
2863 CHECK_DEL_REG_STR(hkey, "Comments", "");
2864 CHECK_DEL_REG_STR(hkey, "Contact", "");
2865 CHECK_DEL_REG_STR(hkey, "HelpLink", "");
2866 CHECK_DEL_REG_STR(hkey, "HelpTelephone", "");
2867 CHECK_DEL_REG_STR(hkey, "InstallLocation", "");
2868 CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
2869 CHECK_DEL_REG_STR(hkey, "Readme", "");
2870 CHECK_DEL_REG_STR(hkey, "Size", "");
2871 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", "");
2872 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", "");
2873 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2874 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2875 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2876 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2877 CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1);
2878 CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
2879
2880 res = RegDeleteKeyA(hkey, "");
2881 ok(!res, "got %ld\n", res);
2882 RegCloseKey(hkey);
2883
2884 sprintf(keypath, userdata, "S-1-5-18");
2886 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2887
2888 res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
2889 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2890
2891 size = sizeof(path);
2892 RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
2894 RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
2895
2896 CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
2897 CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
2898 CHECK_DEL_REG_STR(props, "InstallDate", date);
2899 CHECK_DEL_REG_STR(props, "InstallSource", temp);
2900 CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2901 CHECK_DEL_REG_STR(props, "Publisher", "Wine");
2902 CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2903 CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", "");
2904 CHECK_DEL_REG_STR(props, "Comments", "");
2905 CHECK_DEL_REG_STR(props, "Contact", "");
2906 CHECK_DEL_REG_STR(props, "HelpLink", "");
2907 CHECK_DEL_REG_STR(props, "HelpTelephone", "");
2908 CHECK_DEL_REG_STR(props, "InstallLocation", "");
2909 CHECK_DEL_REG_DWORD(props, "NoModify", 1);
2910 CHECK_DEL_REG_STR(props, "Readme", "");
2911 CHECK_DEL_REG_STR(props, "Size", "");
2912 CHECK_DEL_REG_STR(props, "URLInfoAbout", "");
2913 CHECK_DEL_REG_STR(props, "URLUpdateInfo", "");
2914 CHECK_DEL_REG_DWORD(props, "Language", 1033);
2915 CHECK_DEL_REG_DWORD(props, "Version", 0x1010001);
2916 CHECK_DEL_REG_DWORD(props, "VersionMajor", 1);
2917 CHECK_DEL_REG_DWORD(props, "VersionMinor", 1);
2918 CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1);
2920
2921 res = RegDeleteKeyA(props, "");
2922 ok(!res, "got %ld\n", res);
2924
2925 res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
2926 todo_wine
2927 {
2928 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2929 }
2930
2931 res = RegDeleteKeyA(usage, "");
2932 todo_wine
2933 ok(!res, "got %ld\n", res);
2935 res = RegDeleteKeyA(hkey, "");
2936 ok(!res, "got %ld\n", res);
2937 RegCloseKey(hkey);
2938
2940 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2941
2942 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
2943
2944 res = RegDeleteKeyA(hkey, "");
2945 ok(!res, "got %ld\n", res);
2946 RegCloseKey(hkey);
2947 }
2948 else
2949 skip("64-bit RegisterProduct tests\n");
2950
2951error:
2953 DeleteFileA("msitest\\maximus");
2954 RemoveDirectoryA("msitest");
2955 LocalFree(usersid);
2956}
2957
2958static void test_publish_product(void)
2959{
2960 static const char prodpath[] =
2961 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
2962 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2963 static const char cuprodpath[] =
2964 "Software\\Microsoft\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2965 static const char cuupgrades[] =
2966 "Software\\Microsoft\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
2967 static const char badprod[] =
2968 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products"
2969 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2970 static const char machprod[] =
2971 "Software\\Classes\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2972 static const char machup[] =
2973 "Software\\Classes\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
2974 UINT r;
2975 LONG res;
2976 LPSTR usersid;
2977 HKEY sourcelist, net, props;
2978 HKEY hkey, patches, media;
2979 CHAR keypath[MAX_PATH];
2982 BOOL old_installer = FALSE;
2984
2985 if (!is_process_elevated())
2986 {
2987 skip("process is limited\n");
2988 return;
2989 }
2990
2991 if (!(usersid = get_user_sid()))
2992 return;
2993
2995
2996 CreateDirectoryA("msitest", NULL);
2997 create_file("msitest\\maximus", 500);
2998
3000
3001 if (is_wow64)
3003
3005
3006 /* PublishProduct, current user */
3007 r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1");
3009 {
3010 skip("Not enough rights to perform tests\n");
3011 goto error;
3012 }
3013 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3014 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3015 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3016
3017 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey);
3018 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3019
3020 sprintf(keypath, prodpath, usersid);
3021 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3023 {
3024 res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey);
3025 if (res == ERROR_SUCCESS)
3026 {
3027 win_skip("Windows Installer < 3.0 detected\n");
3028 RegCloseKey(hkey);
3029 old_installer = TRUE;
3030 goto currentuser;
3031 }
3032 else
3033 {
3034 win_skip("Install failed, no need to continue\n");
3035 return;
3036 }
3037 }
3038 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3039
3040 res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
3041 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3042
3043 res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches);
3044 todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res);
3045 if (!res)
3046 CHECK_DEL_REG_STR(patches, "AllPatches", "");
3047
3048 RegDeleteKeyExA(patches, "", access, 0);
3049 RegCloseKey(patches);
3050 RegDeleteKeyExA(hkey, "", access, 0);
3051 RegCloseKey(hkey);
3052
3053currentuser:
3054 res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey);
3055 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3056
3057 CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
3058 CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
3059 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
3060 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
3061 if (!old_installer)
3062 CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0);
3063 CHECK_DEL_REG_DWORD(hkey, "Assignment", 0);
3064 CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184);
3065 CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0);
3066 CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
3067
3068 res = RegOpenKeyA(hkey, "SourceList", &sourcelist);
3069 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3070
3071 lstrcpyA(path, "n;1;");
3072 lstrcatA(path, temp);
3073 CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path);
3074 CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
3075
3076 res = RegOpenKeyA(sourcelist, "Net", &net);
3077 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3078
3079 CHECK_DEL_REG_STR(net, "1", temp);
3080
3081 RegDeleteKeyA(net, "");
3083
3084 res = RegOpenKeyA(sourcelist, "Media", &media);
3085 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3086
3087 CHECK_DEL_REG_STR(media, "1", "DISK1;");
3088
3089 RegDeleteKeyA(media, "");
3091 RegDeleteKeyA(sourcelist, "");
3092 RegCloseKey(sourcelist);
3093 RegDeleteKeyA(hkey, "");
3094 RegCloseKey(hkey);
3095
3096 res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey);
3097 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3098
3099 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
3100
3101 RegDeleteKeyA(hkey, "");
3102 RegCloseKey(hkey);
3103
3104 /* PublishProduct, machine */
3105 r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1");
3106 if (old_installer)
3107 goto machprod;
3108 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3109 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3110 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3111
3112 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey);
3113 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3114
3115 sprintf(keypath, prodpath, "S-1-5-18");
3116 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3117 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3118
3119 res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
3120 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3121
3122 res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches);
3123 todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res);
3124 if (!res)
3125 CHECK_DEL_REG_STR(patches, "AllPatches", "");
3126
3127 RegDeleteKeyExA(patches, "", access, 0);
3128 RegCloseKey(patches);
3129 RegDeleteKeyExA(hkey, "", access, 0);
3130 RegCloseKey(hkey);
3131
3132machprod:
3133 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machprod, 0, access, &hkey);
3134 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3135
3136 CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
3137 CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
3138 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
3139 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
3140 if (!old_installer)
3141 CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0);
3142 CHECK_DEL_REG_DWORD_TODO(hkey, "Assignment", 1);
3143 CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184);
3144 CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0);
3145 CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
3146
3147 res = RegOpenKeyExA(hkey, "SourceList", 0, access, &sourcelist);
3148 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3149
3150 lstrcpyA(path, "n;1;");
3151 lstrcatA(path, temp);
3152 CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path);
3153 CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
3154
3155 res = RegOpenKeyExA(sourcelist, "Net", 0, access, &net);
3156 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3157
3158 CHECK_DEL_REG_STR(net, "1", temp);
3159
3160 res = RegDeleteKeyExA(net, "", access, 0);
3161 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3163
3164 res = RegOpenKeyExA(sourcelist, "Media", 0, access, &media);
3165 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3166
3167 CHECK_DEL_REG_STR(media, "1", "DISK1;");
3168
3169 res = RegDeleteKeyExA(media, "", access, 0);
3170 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3172 res = RegDeleteKeyExA(sourcelist, "", access, 0);
3173 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3174 RegCloseKey(sourcelist);
3175 res = RegDeleteKeyExA(hkey, "", access, 0);
3176 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3177 RegCloseKey(hkey);
3178
3179 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machup, 0, access, &hkey);
3180 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3181
3182 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
3183
3184 res = RegDeleteKeyExA(hkey, "", access, 0);
3185 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3186 RegCloseKey(hkey);
3187
3188error:
3190 DeleteFileA("msitest\\maximus");
3191 RemoveDirectoryA("msitest");
3192 LocalFree(usersid);
3193}
3194
3195static void test_publish_features(void)
3196{
3197 static const char cupath[] =
3198 "Software\\Microsoft\\Installer\\Features\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3199 static const char udfeatpath[] =
3200 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
3201 "\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features";
3202 static const char udpridpath[] =
3203 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
3204 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3205 static const char featkey[] =
3206 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Features";
3207 static const char classfeat[] =
3208 "Software\\Classes\\Installer\\Features\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3209 UINT r;
3210 LONG res;
3211 HKEY hkey;
3212 LPSTR usersid;
3213 CHAR keypath[MAX_PATH];
3215
3216 if (!is_process_elevated())
3217 {
3218 skip("process is limited\n");
3219 return;
3220 }
3221
3222 if (!(usersid = get_user_sid()))
3223 return;
3224
3225 CreateDirectoryA("msitest", NULL);
3226 create_file("msitest\\maximus", 500);
3227
3229
3230 if (is_wow64)
3232
3234
3235 /* PublishFeatures, current user */
3236 r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1");
3238 {
3239 skip("Not enough rights to perform tests\n");
3240 goto error;
3241 }
3242 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3243 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3244 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3245
3246 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey);
3247 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3248
3249 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey);
3250 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3251
3252 res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
3253 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3254
3255 CHECK_REG_STR(hkey, "feature", "");
3256 CHECK_REG_STR(hkey, "montecristo", "");
3257
3258 RegDeleteValueA(hkey, "feature");
3259 RegDeleteValueA(hkey, "montecristo");
3260 RegDeleteKeyExA(hkey, "", access, 0);
3261 RegCloseKey(hkey);
3262
3263 sprintf(keypath, udfeatpath, usersid);
3264 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3265 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3266
3267 CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE");
3268 CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE");
3269
3270 RegDeleteValueA(hkey, "feature");
3271 RegDeleteValueA(hkey, "montecristo");
3272 RegDeleteKeyExA(hkey, "", access, 0);
3273 RegCloseKey(hkey);
3274 sprintf(keypath, udpridpath, usersid);
3276
3277 /* PublishFeatures, machine */
3278 r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1 ALLUSERS=1");
3279 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3280 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3281 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3282
3283 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey);
3284 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3285
3286 res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
3287 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3288 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey);
3289 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3290
3291 CHECK_REG_STR(hkey, "feature", "");
3292 CHECK_REG_STR(hkey, "montecristo", "");
3293
3294 RegDeleteValueA(hkey, "feature");
3295 RegDeleteValueA(hkey, "montecristo");
3296 RegDeleteKeyExA(hkey, "", access, 0);
3297 RegCloseKey(hkey);
3298
3299 sprintf(keypath, udfeatpath, "S-1-5-18");
3300 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3301 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3302
3303 CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE");
3304 CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE");
3305
3306 RegDeleteValueA(hkey, "feature");
3307 RegDeleteValueA(hkey, "montecristo");
3308 RegDeleteKeyExA(hkey, "", access, 0);
3309 RegCloseKey(hkey);
3310 sprintf(keypath, udpridpath, "S-1-5-18");
3312
3313error:
3315 DeleteFileA("msitest\\maximus");
3316 RemoveDirectoryA("msitest");
3317 LocalFree(usersid);
3318}
3319
3321{
3322 DWORD len = 0;
3323 LPSTR val;
3324 LONG r;
3325
3326 r = RegQueryValueExA(hkey, name, NULL, NULL, NULL, &len);
3327 if (r != ERROR_SUCCESS)
3328 return NULL;
3329
3330 len += sizeof (WCHAR);
3331 val = malloc(len);
3332 if (!val) return NULL;
3333 val[0] = 0;
3335 return val;
3336}
3337
3338static void get_owner_company(LPSTR *owner, LPSTR *company)
3339{
3340 LONG res;
3341 HKEY hkey;
3343
3344 *owner = *company = NULL;
3345
3346 if (is_wow64)
3348
3350 "Software\\Microsoft\\MS Setup (ACME)\\User Info", &hkey);
3351 if (res == ERROR_SUCCESS)
3352 {
3353 *owner = reg_get_val_str(hkey, "DefName");
3354 *company = reg_get_val_str(hkey, "DefCompany");
3355 RegCloseKey(hkey);
3356 }
3357
3358 if (!*owner || !*company)
3359 {
3361 "Software\\Microsoft\\Windows NT\\CurrentVersion", 0, access, &hkey);
3362 if (res == ERROR_SUCCESS)
3363 {
3364 *owner = reg_get_val_str(hkey, "RegisteredOwner");
3365 *company = reg_get_val_str(hkey, "RegisteredOrganization");
3366 RegCloseKey(hkey);
3367 }
3368 }
3369
3370 if (!*owner || !*company)
3371 {
3373 "Software\\Microsoft\\Windows\\CurrentVersion", 0, access, &hkey);
3374 if (res == ERROR_SUCCESS)
3375 {
3376 *owner = reg_get_val_str(hkey, "RegisteredOwner");
3377 *company = reg_get_val_str(hkey, "RegisteredOrganization");
3378 RegCloseKey(hkey);
3379 }
3380 }
3381}
3382
3383static void test_register_user(void)
3384{
3385 UINT r;
3386 LONG res;
3387 HKEY props;
3388 LPSTR usersid;
3389 LPSTR owner, company;
3390 CHAR keypath[MAX_PATH];
3392
3393 static const CHAR keypropsfmt[] =
3394 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
3395 "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties";
3396 static const CHAR keypridfmt[] =
3397 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
3398 "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3399
3400 if (!is_process_elevated())
3401 {
3402 skip("process is limited\n");
3403 return;
3404 }
3405
3406 if (!(usersid = get_user_sid()))
3407 return;
3408
3409 get_owner_company(&owner, &company);
3410
3411 CreateDirectoryA("msitest", NULL);
3412 create_file("msitest\\maximus", 500);
3413
3415
3416 if (is_wow64)
3418
3420
3421 /* RegisterUser, per-user */
3422 r = MsiInstallProductA(msifile, "REGISTER_USER=1");
3424 {
3425 skip("Not enough rights to perform tests\n");
3426 goto error;
3427 }
3428 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3429 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3430 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3431
3432 sprintf(keypath, keypropsfmt, usersid);
3434 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3435
3436 CHECK_REG_STR(props, "ProductID", "none");
3437 CHECK_REG_STR(props, "RegCompany", company);
3438 CHECK_REG_STR(props, "RegOwner", owner);
3439
3440 RegDeleteValueA(props, "ProductID");
3441 RegDeleteValueA(props, "RegCompany");
3442 RegDeleteValueA(props, "RegOwner");
3443 RegDeleteKeyExA(props, "", access, 0);
3445 sprintf(keypath, keypridfmt, usersid);
3447
3448 /* RegisterUser, machine */
3449 r = MsiInstallProductA(msifile, "REGISTER_USER=1 ALLUSERS=1");
3450 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3451 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3452 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3453
3454 sprintf(keypath, keypropsfmt, "S-1-5-18");
3456 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3457
3458 CHECK_REG_STR(props, "ProductID", "none");
3459 CHECK_REG_STR(props, "RegCompany", company);
3460 CHECK_REG_STR(props, "RegOwner", owner);
3461
3462 RegDeleteValueA(props, "ProductID");
3463 RegDeleteValueA(props, "RegCompany");
3464 RegDeleteValueA(props, "RegOwner");
3465 RegDeleteKeyExA(props, "", access, 0);
3467 sprintf(keypath, keypridfmt, "S-1-5-18");
3469
3470error:
3471 free(company);
3472 free(owner);
3473
3475 DeleteFileA("msitest\\maximus");
3476 RemoveDirectoryA("msitest");
3477 LocalFree(usersid);
3478}
3479
3481{
3482 static const char keyfmt[] =
3483 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Components\\%s";
3484 static const char compkey[] =
3485 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Components";
3486 UINT r;
3487 LONG res;
3488 DWORD size;
3489 HKEY comp, hkey;
3490 LPSTR usersid;
3491 CHAR val[MAX_PATH];
3492 CHAR keypath[MAX_PATH];
3493 CHAR program_files_maximus[MAX_PATH];
3495
3496 if (!is_process_elevated())
3497 {
3498 skip("process is limited\n");
3499 return;
3500 }
3501
3502 if (!(usersid = get_user_sid()))
3503 return;
3504
3505 CreateDirectoryA("msitest", NULL);
3506 create_file("msitest\\maximus", 500);
3507
3509
3510 if (is_wow64)
3512
3514
3515 /* ProcessComponents, per-user */
3516 r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1");
3518 {
3519 skip("Not enough rights to perform tests\n");
3520 goto error;
3521 }
3522 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3523 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3524 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3525
3526 sprintf(keypath, keyfmt, usersid, "CBABC2FDCCB35E749A8944D8C1C098B5");
3527 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3528 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3529
3530 size = MAX_PATH;
3531 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3532 NULL, NULL, (LPBYTE)val, &size);
3533 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3534
3535 lstrcpyA(program_files_maximus,PROG_FILES_DIR);
3536 lstrcatA(program_files_maximus,"\\msitest\\maximus");
3537
3538 ok(!lstrcmpiA(val, program_files_maximus),
3539 "Expected \"%s\", got \"%s\"\n", program_files_maximus, val);
3540
3541 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3542 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3543
3544 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3545 RegDeleteKeyExA(comp, "", access, 0);
3546 RegCloseKey(comp);
3547
3548 sprintf(keypath, keyfmt, usersid, "241C3DA58FECD0945B9687D408766058");
3549 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3550 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3551
3552 size = MAX_PATH;
3553 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3554 NULL, NULL, (LPBYTE)val, &size);
3555 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3556 ok(!lstrcmpA(val, "01\\msitest\\augustus"),
3557 "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val);
3558
3559 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3560 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3561
3562 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3563 RegDeleteKeyExA(comp, "", access, 0);
3564 RegCloseKey(comp);
3565
3566 /* ProcessComponents, machine */
3567 r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1 ALLUSERS=1");
3568 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3569 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3570 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3571
3572 sprintf(keypath, keyfmt, "S-1-5-18", "CBABC2FDCCB35E749A8944D8C1C098B5");
3573 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3574 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3575
3576 size = MAX_PATH;
3577 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3578 NULL, NULL, (LPBYTE)val, &size);
3579 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3580 ok(!lstrcmpiA(val, program_files_maximus),
3581 "Expected \"%s\", got \"%s\"\n", program_files_maximus, val);
3582
3583 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3584 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3585
3586 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3587 RegDeleteKeyExA(comp, "", access, 0);
3588 RegCloseKey(comp);
3589
3590 sprintf(keypath, keyfmt, "S-1-5-18", "241C3DA58FECD0945B9687D408766058");
3591 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3592 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3593
3594 size = MAX_PATH;
3595 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3596 NULL, NULL, (LPBYTE)val, &size);
3597 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3598 ok(!lstrcmpA(val, "01\\msitest\\augustus"),
3599 "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val);
3600
3601 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3602 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3603
3604 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3605 RegDeleteKeyExA(comp, "", access, 0);
3606 RegCloseKey(comp);
3607
3608error:
3610 DeleteFileA("msitest\\maximus");
3611 RemoveDirectoryA("msitest");
3612 LocalFree(usersid);
3613}
3614
3615static void test_publish(void)
3616{
3617 static const char subkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
3618 static const char subkey_32node[] = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
3619 UINT r;
3620 LONG res;
3621 HKEY uninstall, prodkey, uninstall_32node = NULL;
3623 char date[MAX_PATH], date2[MAX_PATH], temp[MAX_PATH], buf[MAX_PATH];
3624 const char prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
3626 DWORD error, type, size;
3627
3628 if (!is_process_elevated())
3629 {
3630 skip("process is limited\n");
3631 return;
3632 }
3633
3636
3637 if (is_wow64)
3639
3640 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey, 0, KEY_ALL_ACCESS, &uninstall);
3641 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3642
3643 if (is_64bit)
3644 {
3645 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey_32node, 0, KEY_ALL_ACCESS, &uninstall_32node);
3646 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3647 }
3648
3649 CreateDirectoryA("msitest", NULL);
3650 create_file("msitest\\maximus", 500);
3651
3653
3655
3656 state = MsiQueryProductStateA(prodcode);
3657 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3658
3659 state = MsiQueryFeatureStateA(prodcode, "feature");
3660 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3661
3662 state = 0xdead;
3663 SetLastError(0xdeadbeef);
3665 error = GetLastError();
3666 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3667 ok(state == 0xdead, "got %d\n", state);
3668 ok(error == 0xdeadbeef, "got %lu\n", error);
3669
3670 state = 0xdead;
3671 SetLastError(0xdeadbeef);
3673 error = GetLastError();
3674 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3675 ok(state == 0xdead, "got %d\n", state);
3676 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3677
3678 state = 0xdead;
3679 SetLastError(0xdeadbeef);
3681 error = GetLastError();
3682 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3683 ok(state == 0xdead, "got %d\n", state);
3684 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3685
3686 state = MsiQueryFeatureStateA(prodcode, "feature");
3687 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3688
3689 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3690 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3691
3693 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3694 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3695 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3696
3697 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3698 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3699
3700 /* nothing published */
3703 {
3704 skip("Not enough rights to perform tests\n");
3705 goto error;
3706 }
3707 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
3708 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3709 ok(pf_exists("msitest"), "File not installed\n");
3710
3711 state = MsiQueryProductStateA(prodcode);
3712 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3713
3714 state = MsiQueryFeatureStateA(prodcode, "feature");
3715 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3716
3717 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3718 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3719
3721 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3722 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3723 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3724
3725 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3726 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3727
3728 /* PublishProduct and RegisterProduct */
3729 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 PUBLISH_PRODUCT=1");
3730 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3731 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3732 ok(pf_exists("msitest"), "File not installed\n");
3733
3734 state = MsiQueryProductStateA(prodcode);
3735 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
3736
3737 state = MsiQueryFeatureStateA(prodcode, "feature");
3738 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3739
3740 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3741 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3742
3744 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3745 ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
3746 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3747
3748 if (is_64bit)
3749 {
3750 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3751 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3752 }
3753 else
3754 {
3755 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3756 if (is_wow64 && res == ERROR_FILE_NOT_FOUND) /* XP - Vista, Wow64 */
3757 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3758 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3759 }
3760
3761 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
3762 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
3763 CHECK_REG_STR(prodkey, "InstallDate", date);
3764 CHECK_REG_STR(prodkey, "InstallSource", temp);
3765 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3766 CHECK_REG_STR(prodkey, "Publisher", "Wine");
3767 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3768 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
3769 CHECK_REG_STR(prodkey, "Comments", "");
3770 CHECK_REG_STR(prodkey, "Contact", "");
3771 CHECK_REG_STR(prodkey, "HelpLink", "");
3772 CHECK_REG_STR(prodkey, "HelpTelephone", "");
3773 CHECK_REG_STR(prodkey, "InstallLocation", "");
3774 CHECK_REG_DWORD(prodkey, "NoModify", 1);
3775 CHECK_REG_STR(prodkey, "Readme", "");
3776 CHECK_REG_STR(prodkey, "Size", "");
3777 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
3778 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
3779 CHECK_REG_DWORD(prodkey, "Language", 1033);
3780 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
3781 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
3782 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
3783 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
3784 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
3785
3786 RegCloseKey(prodkey);
3787
3788 r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
3789 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3790 ok(pf_exists("msitest\\maximus"), "File deleted\n");
3791 ok(pf_exists("msitest"), "File deleted\n");
3792
3793 state = MsiQueryProductStateA(prodcode);
3794 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3795
3796 state = MsiQueryFeatureStateA(prodcode, "feature");
3797 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3798
3799 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3800 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3801
3803 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3804 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3805 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3806
3807 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3808 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3809
3810 /* complete install */
3811 r = MsiInstallProductA(msifile, "FULL=1");
3812 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3813 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3814 ok(pf_exists("msitest"), "File not installed\n");
3815
3816 state = MsiQueryProductStateA(prodcode);
3817 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
3818
3819 state = MsiQueryFeatureStateA(prodcode, "feature");
3820 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3821
3822 state = 0xdead;
3823 SetLastError(0xdeadbeef);
3825 error = GetLastError();
3826 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3827 ok(state == 0xdead, "got %d\n", state);
3828 ok(error == 0xdeadbeef, "got %lu\n", error);
3829
3830 state = 0xdead;
3831 SetLastError(0xdeadbeef);
3833 error = GetLastError();
3834 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3835 ok(state == 0xdead, "got %d\n", state);
3836 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3837
3838 state = 0xdead;
3839 SetLastError(0xdeadbeef);
3841 error = GetLastError();
3842 ok(r == ERROR_SUCCESS, "got %u\n", r);
3843 ok(state == INSTALLSTATE_LOCAL, "got %d\n", state);
3844 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3845
3846 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3847 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3848
3850 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3851 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3852 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3853
3854 if (is_64bit)
3855 {
3856 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3857 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3858 }
3859 else
3860 {
3861 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3862 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3863 }
3864
3865 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
3866 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
3867 CHECK_REG_STR(prodkey, "InstallDate", date);
3868 CHECK_REG_STR(prodkey, "InstallSource", temp);
3869 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3870 CHECK_REG_STR(prodkey, "Publisher", "Wine");
3871 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3872 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
3873 CHECK_REG_STR(prodkey, "Comments", "");
3874 CHECK_REG_STR(prodkey, "Contact", "");
3875 CHECK_REG_STR(prodkey, "HelpLink", "");
3876 CHECK_REG_STR(prodkey, "HelpTelephone", "");
3877 CHECK_REG_STR(prodkey, "InstallLocation", "");
3878 CHECK_REG_DWORD(prodkey, "NoModify", 1);
3879 CHECK_REG_STR(prodkey, "Readme", "");
3880 CHECK_REG_STR(prodkey, "Size", "");
3881 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
3882 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
3883 CHECK_REG_DWORD(prodkey, "Language", 1033);
3884 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
3885 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
3886 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
3887 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
3888 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
3889
3890 RegCloseKey(prodkey);
3891
3892 /* no UnpublishFeatures */
3893 r = MsiInstallProductA(msifile, "REMOVE=ALL");
3894 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3895 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
3896 ok(!pf_exists("msitest"), "Directory not deleted\n");
3897
3898 state = MsiQueryProductStateA(prodcode);
3899 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3900
3901 state = MsiQueryFeatureStateA(prodcode, "feature");
3902 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3903
3904 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3905 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3906
3908 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3909 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3910 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3911
3912 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3913 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3914
3915 /* complete install */
3916 r = MsiInstallProductA(msifile, "FULL=1");
3917 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3918 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3919 ok(pf_exists("msitest"), "File not installed\n");
3920
3921 state = MsiQueryProductStateA(prodcode);
3922 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
3923
3924 state = MsiQueryFeatureStateA(prodcode, "feature");
3925 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3926
3927 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3928 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3929
3931 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3932 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3933 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3934
3935 if (is_64bit)
3936 {
3937 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3938 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3939 }
3940 else
3941 {
3942 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3943 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3944 }
3945
3946 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
3947 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
3948 CHECK_REG_STR(prodkey, "InstallDate", date);
3949 CHECK_REG_STR(prodkey, "InstallSource", temp);
3950 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3951 CHECK_REG_STR(prodkey, "Publisher", "Wine");
3952 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3953 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
3954 CHECK_REG_STR(prodkey, "Comments", "");
3955 CHECK_REG_STR(prodkey, "Contact", "");
3956 CHECK_REG_STR(prodkey, "HelpLink", "");
3957 CHECK_REG_STR(prodkey, "HelpTelephone", "");
3958 CHECK_REG_STR(prodkey, "InstallLocation", "");
3959 CHECK_REG_DWORD(prodkey, "NoModify", 1);
3960 CHECK_REG_STR(prodkey, "Readme", "");
3961 CHECK_REG_STR(prodkey, "Size", "");
3962 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
3963 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
3964 CHECK_REG_DWORD(prodkey, "Language", 1033);
3965 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
3966 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
3967 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
3968 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
3969 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
3970
3971 RegCloseKey(prodkey);
3972
3973 /* UnpublishFeatures, only feature removed. Only works when entire product is removed */