2 * Copyright (C) 2006 James Hawkins
4 * A test program for installing MSI products.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #define _WIN32_MSI 300
32 #include <srrestoreptapi.h>
35 #include "wine/test.h"
37 static UINT (WINAPI
*pMsiQueryComponentStateA
)
38 (LPCSTR
, LPCSTR
, MSIINSTALLCONTEXT
, LPCSTR
, INSTALLSTATE
*);
39 static UINT (WINAPI
*pMsiSetExternalUIRecord
)
40 (INSTALLUI_HANDLER_RECORD
, DWORD
, LPVOID
, PINSTALLUI_HANDLER_RECORD
);
41 static UINT (WINAPI
*pMsiSourceListEnumSourcesA
)
42 (LPCSTR
, LPCSTR
, MSIINSTALLCONTEXT
, DWORD
, DWORD
, LPSTR
, LPDWORD
);
43 static UINT (WINAPI
*pMsiSourceListGetInfoA
)
44 (LPCSTR
, LPCSTR
, MSIINSTALLCONTEXT
, DWORD
, LPCSTR
, LPSTR
, LPDWORD
);
46 static BOOL (WINAPI
*pConvertSidToStringSidA
)(PSID
, LPSTR
*);
47 static BOOL (WINAPI
*pGetTokenInformation
)( HANDLE
, TOKEN_INFORMATION_CLASS
, LPVOID
, DWORD
, PDWORD
);
48 static BOOL (WINAPI
*pOpenProcessToken
)( HANDLE
, DWORD
, PHANDLE
);
49 static LONG (WINAPI
*pRegDeleteKeyExA
)(HKEY
, LPCSTR
, REGSAM
, DWORD
);
50 static BOOL (WINAPI
*pIsWow64Process
)(HANDLE
, PBOOL
);
52 static HMODULE hsrclient
= 0;
53 static BOOL (WINAPI
*pSRRemoveRestorePoint
)(DWORD
);
54 static BOOL (WINAPI
*pSRSetRestorePointA
)(RESTOREPOINTINFOA
*, STATEMGRSTATUS
*);
56 static BOOL on_win9x
= FALSE
;
58 static const char *msifile
= "msitest.msi";
59 static const char *msifile2
= "winetest2.msi";
60 static const char *mstfile
= "winetest.mst";
61 static CHAR CURR_DIR
[MAX_PATH
];
62 static CHAR PROG_FILES_DIR
[MAX_PATH
];
63 static CHAR COMMON_FILES_DIR
[MAX_PATH
];
64 static CHAR APP_DATA_DIR
[MAX_PATH
];
65 static CHAR WINDOWS_DIR
[MAX_PATH
];
67 /* msi database data */
69 static const CHAR component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
70 "s72\tS38\ts72\ti2\tS255\tS72\n"
71 "Component\tComponent\n"
72 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
73 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
74 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n"
75 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
76 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
77 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
78 "component\t\tMSITESTDIR\t0\t1\tfile\n"
79 "service_comp\t\tMSITESTDIR\t0\t1\tservice_file";
81 static const CHAR directory_dat
[] = "Directory\tDirectory_Parent\tDefaultDir\n"
83 "Directory\tDirectory\n"
84 "CABOUTDIR\tMSITESTDIR\tcabout\n"
85 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
86 "FIRSTDIR\tMSITESTDIR\tfirst\n"
87 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
88 "NEWDIR\tCABOUTDIR\tnew\n"
89 "ProgramFilesFolder\tTARGETDIR\t.\n"
90 "TARGETDIR\t\tSourceDir";
92 static const CHAR feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
93 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
95 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
96 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
97 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
98 "Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
99 "Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
100 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n"
101 "service_feature\t\t\t\t2\t1\tTARGETDIR\t0";
103 static const CHAR feature_comp_dat
[] = "Feature_\tComponent_\n"
105 "FeatureComponents\tFeature_\tComponent_\n"
111 "feature\tcomponent\n"
112 "service_feature\tservice_comp\n";
114 static const CHAR file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
115 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
117 "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
118 "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
119 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
120 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
121 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
122 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
123 "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1";
125 static const CHAR install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
127 "InstallExecuteSequence\tAction\n"
128 "AllocateRegistrySpace\tNOT Installed\t1550\n"
129 "CostFinalize\t\t1000\n"
130 "CostInitialize\t\t800\n"
132 "ResolveSource\t\t950\n"
133 "MoveFiles\t\t1700\n"
134 "InstallFiles\t\t4000\n"
135 "DuplicateFiles\t\t4500\n"
136 "WriteEnvironmentStrings\t\t4550\n"
137 "CreateShortcuts\t\t4600\n"
138 "InstallServices\t\t5000\n"
139 "InstallFinalize\t\t6600\n"
140 "InstallInitialize\t\t1500\n"
141 "InstallValidate\t\t1400\n"
142 "LaunchConditions\t\t100\n"
143 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000";
145 static const CHAR media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
146 "i2\ti4\tL64\tS255\tS32\tS72\n"
148 "1\t3\t\t\tDISK1\t\n"
149 "2\t5\t\tmsitest.cab\tDISK2\t\n";
151 static const CHAR property_dat
[] = "Property\tValue\n"
153 "Property\tProperty\n"
154 "DefaultUIFont\tDlgFont8\n"
157 "InstallMode\tTypical\n"
158 "Manufacturer\tWine\n"
159 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
160 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
162 "ProductLanguage\t1033\n"
163 "ProductName\tMSITEST\n"
164 "ProductVersion\t1.1.1\n"
165 "PROMPTROLLBACKCOST\tP\n"
167 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
168 "AdminProperties\tPOSTADMIN\n"
170 "SERVNAME\tTestService\n"
171 "SERVDISP\tTestServiceDisp\n";
173 static const CHAR aup_property_dat
[] = "Property\tValue\n"
175 "Property\tProperty\n"
176 "DefaultUIFont\tDlgFont8\n"
180 "InstallMode\tTypical\n"
181 "Manufacturer\tWine\n"
182 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
183 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
185 "ProductLanguage\t1033\n"
186 "ProductName\tMSITEST\n"
187 "ProductVersion\t1.1.1\n"
188 "PROMPTROLLBACKCOST\tP\n"
190 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
191 "AdminProperties\tPOSTADMIN\n"
193 "SERVNAME\tTestService\n"
194 "SERVDISP\tTestServiceDisp\n";
196 static const CHAR aup2_property_dat
[] = "Property\tValue\n"
198 "Property\tProperty\n"
199 "DefaultUIFont\tDlgFont8\n"
203 "InstallMode\tTypical\n"
204 "Manufacturer\tWine\n"
205 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
206 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
208 "ProductLanguage\t1033\n"
209 "ProductName\tMSITEST\n"
210 "ProductVersion\t1.1.1\n"
211 "PROMPTROLLBACKCOST\tP\n"
213 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
214 "AdminProperties\tPOSTADMIN\n"
216 "SERVNAME\tTestService\n"
217 "SERVDISP\tTestServiceDisp\n";
219 static const CHAR icon_property_dat
[] = "Property\tValue\n"
221 "Property\tProperty\n"
222 "DefaultUIFont\tDlgFont8\n"
225 "InstallMode\tTypical\n"
226 "Manufacturer\tWine\n"
227 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
228 "ProductCode\t{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}\n"
230 "ProductLanguage\t1033\n"
231 "ProductName\tMSITEST\n"
232 "ProductVersion\t1.1.1\n"
233 "PROMPTROLLBACKCOST\tP\n"
235 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
236 "AdminProperties\tPOSTADMIN\n"
238 "SERVNAME\tTestService\n"
239 "SERVDISP\tTestServiceDisp\n";
241 static const CHAR shortcut_dat
[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
242 "s72\ts72\tl128\ts72\ts72\tS255\tL255\tI2\tS72\tI2\tI2\tS72\n"
243 "Shortcut\tShortcut\n"
244 "Shortcut\tMSITESTDIR\tShortcut\tcomponent\tShortcut\t\tShortcut\t\t\t\t\t\n";
246 static const CHAR environment_dat
[] = "Environment\tName\tValue\tComponent_\n"
247 "s72\tl255\tL255\ts72\n"
248 "Environment\tEnvironment\n"
249 "Var1\t=-MSITESTVAR1\t1\tOne\n"
250 "Var2\tMSITESTVAR2\t1\tOne\n"
251 "Var3\t=-MSITESTVAR3\t1\tOne\n"
252 "Var4\tMSITESTVAR4\t1\tOne\n"
253 "Var5\t-MSITESTVAR5\t\tOne\n"
254 "Var6\tMSITESTVAR6\t\tOne\n"
255 "Var7\t!-MSITESTVAR7\t\tOne\n"
256 "Var8\t!-*MSITESTVAR8\t\tOne\n"
257 "Var9\t=-MSITESTVAR9\t\tOne\n"
258 "Var10\t=MSITESTVAR10\t\tOne\n"
259 "Var11\t+-MSITESTVAR11\t[~];1\tOne\n"
260 "Var12\t+-MSITESTVAR11\t[~];2\tOne\n"
261 "Var13\t+-MSITESTVAR12\t[~];1\tOne\n"
262 "Var14\t=MSITESTVAR13\t[~];1\tOne\n"
263 "Var15\t=MSITESTVAR13\t[~];2\tOne\n"
264 "Var16\t=MSITESTVAR14\t;1;\tOne\n"
265 "Var17\t=MSITESTVAR15\t;;1;;\tOne\n"
266 "Var18\t=MSITESTVAR16\t 1 \tOne\n"
267 "Var19\t+-MSITESTVAR17\t1\tOne\n"
268 "Var20\t+-MSITESTVAR17\t;;2;;[~]\tOne\n"
269 "Var21\t+-MSITESTVAR18\t1\tOne\n"
270 "Var22\t+-MSITESTVAR18\t[~];;2;;\tOne\n"
271 "Var23\t+-MSITESTVAR19\t1\tOne\n"
272 "Var24\t+-MSITESTVAR19\t[~]2\tOne\n"
273 "Var25\t+-MSITESTVAR20\t1\tOne\n"
274 "Var26\t+-MSITESTVAR20\t2[~]\tOne\n";
276 /* Expected results, starting from MSITESTVAR11 onwards */
277 static const CHAR
*environment_dat_results
[] = {"1;2", /*MSITESTVAR11*/
278 "1", /*MSITESTVAR12*/
279 "1;2", /*MSITESTVAR13*/
280 ";1;", /*MSITESTVAR14*/
281 ";;1;;", /*MSITESTVAR15*/
282 " 1 ", /*MSITESTVAR16*/
283 ";;2;;1", /*MSITESTVAR17*/
284 "1;;2;;", /*MSITESTVAR18*/
285 "1", /*MSITESTVAR19*/
286 "1", /*MSITESTVAR20*/
289 static const CHAR condition_dat
[] = "Feature_\tLevel\tCondition\n"
291 "Condition\tFeature_\tLevel\n"
294 static const CHAR up_property_dat
[] = "Property\tValue\n"
296 "Property\tProperty\n"
297 "DefaultUIFont\tDlgFont8\n"
300 "InstallMode\tTypical\n"
301 "Manufacturer\tWine\n"
302 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
303 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
305 "ProductLanguage\t1033\n"
306 "ProductName\tMSITEST\n"
307 "ProductVersion\t1.1.1\n"
308 "PROMPTROLLBACKCOST\tP\n"
310 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
311 "AdminProperties\tPOSTADMIN\n"
313 "SERVNAME\tTestService\n"
314 "SERVDISP\tTestServiceDisp\n"
315 "RemovePreviousVersions\t1\n";
317 static const CHAR up2_property_dat
[] = "Property\tValue\n"
319 "Property\tProperty\n"
320 "DefaultUIFont\tDlgFont8\n"
323 "InstallMode\tTypical\n"
324 "Manufacturer\tWine\n"
325 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
326 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
328 "ProductLanguage\t1033\n"
329 "ProductName\tMSITEST\n"
330 "ProductVersion\t1.1.2\n"
331 "PROMPTROLLBACKCOST\tP\n"
333 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
334 "AdminProperties\tPOSTADMIN\n"
336 "SERVNAME\tTestService\n"
337 "SERVDISP\tTestServiceDisp\n";
339 static const CHAR up3_property_dat
[] = "Property\tValue\n"
341 "Property\tProperty\n"
342 "DefaultUIFont\tDlgFont8\n"
345 "InstallMode\tTypical\n"
346 "Manufacturer\tWine\n"
347 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
348 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
350 "ProductLanguage\t1033\n"
351 "ProductName\tMSITEST\n"
352 "ProductVersion\t1.1.2\n"
353 "PROMPTROLLBACKCOST\tP\n"
355 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
356 "AdminProperties\tPOSTADMIN\n"
358 "SERVNAME\tTestService\n"
359 "SERVDISP\tTestServiceDisp\n"
360 "RemovePreviousVersions\t1\n";
362 static const CHAR registry_dat
[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
363 "s72\ti2\tl255\tL255\tL0\ts72\n"
364 "Registry\tRegistry\n"
365 "Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
366 "Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
367 "regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
368 "OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent";
370 static const CHAR service_install_dat
[] = "ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
371 "LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
372 "s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
373 "ServiceInstall\tServiceInstall\n"
374 "TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\t\tTestService\t\t\tservice_comp\t\t";
376 static const CHAR service_control_dat
[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
377 "s72\tl255\ti2\tL255\tI2\ts72\n"
378 "ServiceControl\tServiceControl\n"
379 "ServiceControl\tTestService\t8\t\t0\tservice_comp";
381 static const CHAR sss_service_control_dat
[] = "ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
382 "s72\tl255\ti2\tL255\tI2\ts72\n"
383 "ServiceControl\tServiceControl\n"
384 "ServiceControl\tSpooler\t1\t\t0\tservice_comp";
386 static const CHAR sss_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
388 "InstallExecuteSequence\tAction\n"
389 "LaunchConditions\t\t100\n"
390 "CostInitialize\t\t800\n"
392 "ResolveSource\t\t950\n"
393 "CostFinalize\t\t1000\n"
394 "InstallValidate\t\t1400\n"
395 "InstallInitialize\t\t1500\n"
396 "DeleteServices\t\t5000\n"
397 "MoveFiles\t\t5100\n"
398 "InstallFiles\t\t5200\n"
399 "DuplicateFiles\t\t5300\n"
400 "StartServices\t\t5400\n"
401 "InstallFinalize\t\t6000\n";
403 static const CHAR sds_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
405 "InstallExecuteSequence\tAction\n"
406 "LaunchConditions\t\t100\n"
407 "CostInitialize\t\t800\n"
409 "ResolveSource\t\t950\n"
410 "CostFinalize\t\t1000\n"
411 "InstallValidate\t\t1400\n"
412 "InstallInitialize\t\t1500\n"
413 "DeleteServices\tInstalled\t5000\n"
414 "MoveFiles\t\t5100\n"
415 "InstallFiles\t\t5200\n"
416 "DuplicateFiles\t\t5300\n"
417 "InstallServices\tNOT Installed\t5400\n"
418 "RegisterProduct\t\t5500\n"
419 "PublishFeatures\t\t5600\n"
420 "PublishProduct\t\t5700\n"
421 "InstallFinalize\t\t6000\n";
423 /* tables for test_continuouscabs */
424 static const CHAR cc_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
425 "s72\tS38\ts72\ti2\tS255\tS72\n"
426 "Component\tComponent\n"
427 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
428 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
429 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n";
431 static const CHAR cc2_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
432 "s72\tS38\ts72\ti2\tS255\tS72\n"
433 "Component\tComponent\n"
434 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
435 "augustus\t\tMSITESTDIR\t0\t0\taugustus\n"
436 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n";
438 static const CHAR cc_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
439 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
441 "feature\t\t\t\t2\t1\tTARGETDIR\t0";
443 static const CHAR cc_feature_comp_dat
[] = "Feature_\tComponent_\n"
445 "FeatureComponents\tFeature_\tComponent_\n"
447 "feature\taugustus\n"
450 static const CHAR cc_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
451 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
453 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
454 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
455 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12";
457 static const CHAR cc2_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
458 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
460 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
461 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
462 "tiberius\tmaximus\ttiberius\t500\t\t\t16384\t3\n"
463 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12";
465 static const CHAR cc_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
466 "i2\ti4\tL64\tS255\tS32\tS72\n"
468 "1\t10\t\ttest1.cab\tDISK1\t\n"
469 "2\t2\t\ttest2.cab\tDISK2\t\n"
470 "3\t12\t\ttest3.cab\tDISK3\t\n";
472 static const CHAR co_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
473 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
475 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
476 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
477 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3";
479 static const CHAR co_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
480 "i2\ti4\tL64\tS255\tS32\tS72\n"
482 "1\t10\t\ttest1.cab\tDISK1\t\n"
483 "2\t2\t\ttest2.cab\tDISK2\t\n"
484 "3\t3\t\ttest3.cab\tDISK3\t\n";
486 static const CHAR co2_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
487 "i2\ti4\tL64\tS255\tS32\tS72\n"
489 "1\t10\t\ttest1.cab\tDISK1\t\n"
490 "2\t12\t\ttest3.cab\tDISK3\t\n"
491 "3\t2\t\ttest2.cab\tDISK2\t\n";
493 static const CHAR mm_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
494 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
496 "maximus\tmaximus\tmaximus\t500\t\t\t512\t1\n"
497 "augustus\taugustus\taugustus\t500\t\t\t512\t2\n"
498 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3";
500 static const CHAR mm_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
501 "i2\ti4\tL64\tS255\tS32\tS72\n"
503 "1\t3\t\ttest1.cab\tDISK1\t\n";
505 static const CHAR ss_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
506 "i2\ti4\tL64\tS255\tS32\tS72\n"
508 "1\t2\t\ttest1.cab\tDISK1\t\n"
509 "2\t2\t\ttest2.cab\tDISK2\t\n"
510 "3\t12\t\ttest3.cab\tDISK3\t\n";
512 /* tables for test_uiLevelFlags */
513 static const CHAR ui_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
514 "s72\tS38\ts72\ti2\tS255\tS72\n"
515 "Component\tComponent\n"
516 "maximus\t\tMSITESTDIR\t0\tHASUIRUN=1\tmaximus\n"
517 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
518 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n";
520 static const CHAR ui_install_ui_seq_dat
[] = "Action\tCondition\tSequence\n"
522 "InstallUISequence\tAction\n"
523 "SetUIProperty\t\t5\n"
524 "ExecuteAction\t\t1100\n";
526 static const CHAR ui_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
527 "s72\ti2\tS64\tS0\tS255\n"
528 "CustomAction\tAction\n"
529 "SetUIProperty\t51\tHASUIRUN\t1\t\n";
531 static const CHAR rof_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
532 "s72\tS38\ts72\ti2\tS255\tS72\n"
533 "Component\tComponent\n"
534 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n";
536 static const CHAR rof_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
537 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
539 "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
540 "montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0";
542 static const CHAR rof_feature_comp_dat
[] = "Feature_\tComponent_\n"
544 "FeatureComponents\tFeature_\tComponent_\n"
546 "montecristo\tmaximus";
548 static const CHAR rof_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
549 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
551 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1";
553 static const CHAR rof_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
554 "i2\ti4\tL64\tS255\tS32\tS72\n"
556 "1\t1\t\t\tDISK1\t\n";
558 static const CHAR rofc_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
559 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
561 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1";
563 static const CHAR rofc_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
564 "i2\ti4\tL64\tS255\tS32\tS72\n"
566 "1\t1\t\ttest1.cab\tDISK1\t\n";
568 static const CHAR lus2_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
569 "i2\ti4\tL64\tS255\tS32\tS72\n"
571 "1\t1\t\t#test1.cab\tDISK1\t\n";
573 static const CHAR sdp_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
575 "InstallExecuteSequence\tAction\n"
576 "AllocateRegistrySpace\tNOT Installed\t1550\n"
577 "CostFinalize\t\t1000\n"
578 "CostInitialize\t\t800\n"
580 "InstallFiles\t\t4000\n"
581 "InstallFinalize\t\t6600\n"
582 "InstallInitialize\t\t1500\n"
583 "InstallValidate\t\t1400\n"
584 "LaunchConditions\t\t100\n"
585 "SetDirProperty\t\t950";
587 static const CHAR sdp_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
588 "s72\ti2\tS64\tS0\tS255\n"
589 "CustomAction\tAction\n"
590 "SetDirProperty\t51\tMSITESTDIR\t[CommonFilesFolder]msitest\\\t\n";
592 static const CHAR cie_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
593 "s72\tS38\ts72\ti2\tS255\tS72\n"
594 "Component\tComponent\n"
595 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
596 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
597 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"
598 "gaius\t\tMSITESTDIR\t0\t1\tgaius\n";
600 static const CHAR cie_feature_comp_dat
[] = "Feature_\tComponent_\n"
602 "FeatureComponents\tFeature_\tComponent_\n"
604 "feature\taugustus\n"
608 static const CHAR cie_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
609 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
611 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
612 "augustus\taugustus\taugustus\t50000\t\t\t16384\t2\n"
613 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t12\n"
614 "gaius\tgaius\tgaius\t500\t\t\t8192\t11";
616 static const CHAR cie_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
617 "i2\ti4\tL64\tS255\tS32\tS72\n"
619 "1\t1\t\ttest1.cab\tDISK1\t\n"
620 "2\t2\t\ttest2.cab\tDISK2\t\n"
621 "3\t12\t\ttest3.cab\tDISK3\t\n";
623 static const CHAR ci_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
625 "InstallExecuteSequence\tAction\n"
626 "CostFinalize\t\t1000\n"
627 "CostInitialize\t\t800\n"
629 "InstallFiles\t\t4000\n"
630 "InstallServices\t\t5000\n"
631 "InstallFinalize\t\t6600\n"
632 "InstallInitialize\t\t1500\n"
633 "RunInstall\t\t1600\n"
634 "InstallValidate\t\t1400\n"
635 "LaunchConditions\t\t100";
637 static const CHAR ci_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
638 "s72\ti2\tS64\tS0\tS255\n"
639 "CustomAction\tAction\n"
640 "RunInstall\t87\tmsitest\\concurrent.msi\tMYPROP=[UILevel]\t\n";
642 static const CHAR ci_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
643 "s72\tS38\ts72\ti2\tS255\tS72\n"
644 "Component\tComponent\n"
645 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n";
647 static const CHAR ci2_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
648 "s72\tS38\ts72\ti2\tS255\tS72\n"
649 "Component\tComponent\n"
650 "augustus\t\tMSITESTDIR\t0\tUILevel=3 AND MYPROP=5\taugustus\n";
652 static const CHAR ci2_feature_comp_dat
[] = "Feature_\tComponent_\n"
654 "FeatureComponents\tFeature_\tComponent_\n"
657 static const CHAR ci2_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
658 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
660 "augustus\taugustus\taugustus\t500\t\t\t8192\t1";
662 static const CHAR spf_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
663 "s72\ti2\tS64\tS0\tS255\n"
664 "CustomAction\tAction\n"
665 "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n";
667 static const CHAR spf_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
669 "InstallExecuteSequence\tAction\n"
670 "CostFinalize\t\t1000\n"
671 "CostInitialize\t\t800\n"
673 "SetFolderProp\t\t950\n"
674 "InstallFiles\t\t4000\n"
675 "InstallServices\t\t5000\n"
676 "InstallFinalize\t\t6600\n"
677 "InstallInitialize\t\t1500\n"
678 "InstallValidate\t\t1400\n"
679 "LaunchConditions\t\t100";
681 static const CHAR spf_install_ui_seq_dat
[] = "Action\tCondition\tSequence\n"
683 "InstallUISequence\tAction\n"
684 "CostInitialize\t\t800\n"
686 "CostFinalize\t\t1000\n"
687 "ExecuteAction\t\t1100\n";
689 static const CHAR pp_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
691 "InstallExecuteSequence\tAction\n"
692 "ValidateProductID\t\t700\n"
693 "CostInitialize\t\t800\n"
695 "CostFinalize\t\t1000\n"
696 "InstallValidate\t\t1400\n"
697 "InstallInitialize\t\t1500\n"
698 "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
699 "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
700 "RemoveFiles\t\t3500\n"
701 "InstallFiles\t\t4000\n"
702 "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n"
703 "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n"
704 "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n"
705 "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
706 "InstallFinalize\t\t6600";
708 static const CHAR ppc_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
709 "s72\tS38\ts72\ti2\tS255\tS72\n"
710 "Component\tComponent\n"
711 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n"
712 "augustus\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\taugustus\n";
714 static const CHAR ppc_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
715 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
717 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1\n"
718 "augustus\taugustus\taugustus\t500\t\t\t8192\t2";
720 static const CHAR ppc_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
721 "i2\ti4\tL64\tS255\tS32\tS72\n"
723 "1\t2\t\t\tDISK1\t\n";
725 static const CHAR ppc_feature_comp_dat
[] = "Feature_\tComponent_\n"
727 "FeatureComponents\tFeature_\tComponent_\n"
729 "feature\taugustus\n"
730 "montecristo\tmaximus";
732 static const CHAR tp_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
733 "s72\tS38\ts72\ti2\tS255\tS72\n"
734 "Component\tComponent\n"
735 "augustus\t\tMSITESTDIR\t0\tprop=\"val\"\taugustus\n";
737 static const CHAR cwd_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
738 "s72\tS38\ts72\ti2\tS255\tS72\n"
739 "Component\tComponent\n"
740 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
742 static const CHAR adm_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
743 "s72\tS38\ts72\ti2\tS255\tS72\n"
744 "Component\tComponent\n"
745 "augustus\t\tMSITESTDIR\t0\tPOSTADMIN=1\taugustus";
747 static const CHAR adm_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
748 "s72\ti2\tS64\tS0\tS255\n"
749 "CustomAction\tAction\n"
750 "SetPOSTADMIN\t51\tPOSTADMIN\t1\t\n";
752 static const CHAR adm_admin_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
754 "AdminExecuteSequence\tAction\n"
755 "CostFinalize\t\t1000\n"
756 "CostInitialize\t\t800\n"
758 "SetPOSTADMIN\t\t950\n"
759 "InstallFiles\t\t4000\n"
760 "InstallFinalize\t\t6600\n"
761 "InstallInitialize\t\t1500\n"
762 "InstallValidate\t\t1400\n"
763 "LaunchConditions\t\t100";
765 static const CHAR amp_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
766 "s72\tS38\ts72\ti2\tS255\tS72\n"
767 "Component\tComponent\n"
768 "augustus\t\tMSITESTDIR\t0\tMYPROP=2718 and MyProp=42\taugustus\n";
770 static const CHAR rem_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
771 "s72\tS38\ts72\ti2\tS255\tS72\n"
772 "Component\tComponent\n"
773 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t0\t\thydrogen\n"
774 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\thelium\n"
775 "lithium\t\tMSITESTDIR\t2\t\tlithium\n";
777 static const CHAR rem_feature_comp_dat
[] = "Feature_\tComponent_\n"
779 "FeatureComponents\tFeature_\tComponent_\n"
780 "feature\thydrogen\n"
784 static const CHAR rem_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
785 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
787 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
788 "helium\thelium\thelium\t0\t\t\t8192\t1\n"
789 "lithium\tlithium\tlithium\t0\t\t\t8192\t1";
791 static const CHAR rem_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
793 "InstallExecuteSequence\tAction\n"
794 "ValidateProductID\t\t700\n"
795 "CostInitialize\t\t800\n"
797 "CostFinalize\t\t1000\n"
798 "InstallValidate\t\t1400\n"
799 "InstallInitialize\t\t1500\n"
800 "ProcessComponents\t\t1600\n"
801 "UnpublishFeatures\t\t1800\n"
802 "RemoveFiles\t\t3500\n"
803 "InstallFiles\t\t4000\n"
804 "RegisterProduct\t\t6100\n"
805 "PublishFeatures\t\t6300\n"
806 "PublishProduct\t\t6400\n"
807 "InstallFinalize\t\t6600";
809 static const CHAR rem_remove_files_dat
[] = "FileKey\tComponent_\tFileName\tDirProperty\tInstallMode\n"
810 "s72\ts72\tS255\ts72\tI2\n"
811 "RemoveFile\tFileKey\n"
812 "furlong\thydrogen\tfurlong\tMSITESTDIR\t1\n"
813 "firkin\thelium\tfirkin\tMSITESTDIR\t1\n"
814 "fortnight\tlithium\tfortnight\tMSITESTDIR\t1\n"
815 "becquerel\thydrogen\tbecquerel\tMSITESTDIR\t2\n"
816 "dioptre\thelium\tdioptre\tMSITESTDIR\t2\n"
817 "attoparsec\tlithium\tattoparsec\tMSITESTDIR\t2\n"
818 "storeys\thydrogen\tstoreys\tMSITESTDIR\t3\n"
819 "block\thelium\tblock\tMSITESTDIR\t3\n"
820 "siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n"
821 "nanoacre\thydrogen\t\tCABOUTDIR\t3\n";
823 static const CHAR mov_move_file_dat
[] = "FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n"
824 "s72\ts72\tS255\tS255\tS72\ts72\ti2\n"
825 "MoveFile\tFileKey\n"
826 "abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n"
827 "bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n"
828 "cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n"
829 "denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n"
830 "ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n"
831 "fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n"
832 "gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n"
833 "haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n"
834 "iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n"
835 "jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n"
836 "kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n"
837 "laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n"
838 "namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n"
839 "pakistan\taugustus\tperu\tsfn|poland\tSourceDir\tMSITESTDIR\t1\n"
840 "wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n"
841 "single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n"
842 "wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
843 "singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
845 static const CHAR mc_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
846 "s72\tS38\ts72\ti2\tS255\tS72\n"
847 "Component\tComponent\n"
848 "maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"
849 "augustus\t\tMSITESTDIR\t0\t1\taugustus\n"
850 "caesar\t\tMSITESTDIR\t0\t1\tcaesar\n"
851 "gaius\t\tMSITESTDIR\t0\tGAIUS=1\tgaius\n";
853 static const CHAR mc_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
854 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
856 "maximus\tmaximus\tmaximus\t500\t\t\t16384\t1\n"
857 "augustus\taugustus\taugustus\t500\t\t\t0\t2\n"
858 "caesar\tcaesar\tcaesar\t500\t\t\t16384\t3\n"
859 "gaius\tgaius\tgaius\t500\t\t\t16384\t4";
861 static const CHAR mc_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
862 "i2\ti4\tL64\tS255\tS32\tS72\n"
864 "1\t1\t\ttest1.cab\tDISK1\t\n"
865 "2\t2\t\ttest2.cab\tDISK2\t\n"
866 "3\t3\t\ttest3.cab\tDISK3\t\n"
867 "4\t4\t\ttest3.cab\tDISK3\t\n";
869 static const CHAR mc_file_hash_dat
[] = "File_\tOptions\tHashPart1\tHashPart2\tHashPart3\tHashPart4\n"
870 "s72\ti2\ti4\ti4\ti4\ti4\n"
871 "MsiFileHash\tFile_\n"
872 "caesar\t0\t850433704\t-241429251\t675791761\t-1221108824";
874 static const CHAR df_directory_dat
[] = "Directory\tDirectory_Parent\tDefaultDir\n"
876 "Directory\tDirectory\n"
877 "THIS\tMSITESTDIR\tthis\n"
878 "DOESNOT\tTHIS\tdoesnot\n"
879 "NONEXISTENT\tDOESNOT\texist\n"
880 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
881 "ProgramFilesFolder\tTARGETDIR\t.\n"
882 "TARGETDIR\t\tSourceDir";
884 static const CHAR df_duplicate_file_dat
[] = "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
885 "s72\ts72\ts72\tS255\tS72\n"
886 "DuplicateFile\tFileKey\n"
887 "maximus\tmaximus\tmaximus\taugustus\t\n"
888 "caesar\tmaximus\tmaximus\t\tNONEXISTENT\n"
889 "augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n";
891 static const CHAR wrv_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
892 "s72\tS38\ts72\ti2\tS255\tS72\n"
893 "Component\tComponent\n"
894 "augustus\t\tMSITESTDIR\t0\t\taugustus\n";
896 static const CHAR wrv_registry_dat
[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
897 "s72\ti2\tl255\tL255\tL0\ts72\n"
898 "Registry\tRegistry\n"
899 "regdata\t2\tSOFTWARE\\Wine\\msitest\tValue\t[~]one[~]two[~]three\taugustus";
901 static const CHAR ca51_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
902 "s72\tS38\ts72\ti2\tS255\tS72\n"
903 "Component\tComponent\n"
904 "augustus\t\tMSITESTDIR\t0\tMYPROP=42\taugustus\n";
906 static const CHAR ca51_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
908 "InstallExecuteSequence\tAction\n"
909 "ValidateProductID\t\t700\n"
910 "GoodSetProperty\t\t725\n"
911 "BadSetProperty\t\t750\n"
912 "CostInitialize\t\t800\n"
913 "ResolveSource\t\t810\n"
915 "SetSourceDir\tSRCDIR\t910\n"
916 "CostFinalize\t\t1000\n"
917 "InstallValidate\t\t1400\n"
918 "InstallInitialize\t\t1500\n"
919 "InstallFiles\t\t4000\n"
920 "InstallFinalize\t\t6600";
922 static const CHAR ca51_custom_action_dat
[] = "Action\tType\tSource\tTarget\n"
924 "CustomAction\tAction\n"
925 "GoodSetProperty\t51\tMYPROP\t42\n"
926 "BadSetProperty\t51\t\tMYPROP\n"
927 "SetSourceDir\t51\tSourceDir\t[SRCDIR]\n";
929 static const CHAR is_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
930 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
932 "one\t\t\t\t2\t1\t\t0\n" /* favorLocal */
933 "two\t\t\t\t2\t1\t\t1\n" /* favorSource */
934 "three\t\t\t\t2\t1\t\t4\n" /* favorAdvertise */
935 "four\t\t\t\t2\t0\t\t0"; /* disabled */
937 static const CHAR is_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
938 "s72\tS38\ts72\ti2\tS255\tS72\n"
939 "Component\tComponent\n"
940 "alpha\t\tMSITESTDIR\t0\t\talpha_file\n" /* favorLocal:Local */
941 "beta\t\tMSITESTDIR\t1\t\tbeta_file\n" /* favorLocal:Source */
942 "gamma\t\tMSITESTDIR\t2\t\tgamma_file\n" /* favorLocal:Optional */
943 "theta\t\tMSITESTDIR\t0\t\ttheta_file\n" /* favorSource:Local */
944 "delta\t\tMSITESTDIR\t1\t\tdelta_file\n" /* favorSource:Source */
945 "epsilon\t\tMSITESTDIR\t2\t\tepsilon_file\n" /* favorSource:Optional */
946 "zeta\t\tMSITESTDIR\t0\t\tzeta_file\n" /* favorAdvertise:Local */
947 "iota\t\tMSITESTDIR\t1\t\tiota_file\n" /* favorAdvertise:Source */
948 "eta\t\tMSITESTDIR\t2\t\teta_file\n" /* favorAdvertise:Optional */
949 "kappa\t\tMSITESTDIR\t0\t\tkappa_file\n" /* disabled:Local */
950 "lambda\t\tMSITESTDIR\t1\t\tlambda_file\n" /* disabled:Source */
951 "mu\t\tMSITESTDIR\t2\t\tmu_file\n"; /* disabled:Optional */
953 static const CHAR is_feature_comp_dat
[] = "Feature_\tComponent_\n"
955 "FeatureComponents\tFeature_\tComponent_\n"
969 static const CHAR is_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
970 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
972 "alpha_file\talpha\talpha\t500\t\t\t8192\t1\n"
973 "beta_file\tbeta\tbeta\t500\t\t\t8291\t2\n"
974 "gamma_file\tgamma\tgamma\t500\t\t\t8192\t3\n"
975 "theta_file\ttheta\ttheta\t500\t\t\t8192\t4\n"
976 "delta_file\tdelta\tdelta\t500\t\t\t8192\t5\n"
977 "epsilon_file\tepsilon\tepsilon\t500\t\t\t8192\t6\n"
978 "zeta_file\tzeta\tzeta\t500\t\t\t8192\t7\n"
979 "iota_file\tiota\tiota\t500\t\t\t8192\t8\n"
980 "eta_file\teta\teta\t500\t\t\t8192\t9\n"
981 "kappa_file\tkappa\tkappa\t500\t\t\t8192\t10\n"
982 "lambda_file\tlambda\tlambda\t500\t\t\t8192\t11\n"
983 "mu_file\tmu\tmu\t500\t\t\t8192\t12";
985 static const CHAR is_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
986 "i2\ti4\tL64\tS255\tS32\tS72\n"
988 "1\t12\t\t\tDISK1\t\n";
990 static const CHAR sp_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
991 "s72\tS38\ts72\ti2\tS255\tS72\n"
992 "Component\tComponent\n"
993 "augustus\t\tTWODIR\t0\t\taugustus\n";
995 static const CHAR sp_directory_dat
[] = "Directory\tDirectory_Parent\tDefaultDir\n"
997 "Directory\tDirectory\n"
998 "TARGETDIR\t\tSourceDir\n"
999 "ProgramFilesFolder\tTARGETDIR\t.\n"
1000 "MSITESTDIR\tProgramFilesFolder\tmsitest:.\n"
1001 "ONEDIR\tMSITESTDIR\t.:shortone|longone\n"
1002 "TWODIR\tONEDIR\t.:shorttwo|longtwo";
1004 static const CHAR mcp_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1005 "s72\tS38\ts72\ti2\tS255\tS72\n"
1006 "Component\tComponent\n"
1007 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t2\t\thydrogen\n"
1008 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t2\t\thelium\n"
1009 "lithium\t{4AF28FFC-71C7-4307-BDE4-B77C5338F56F}\tMSITESTDIR\t2\tPROPVAR=42\tlithium\n";
1011 static const CHAR mcp_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1012 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1013 "Feature\tFeature\n"
1014 "hydroxyl\t\thydroxyl\thydroxyl\t2\t1\tTARGETDIR\t0\n"
1015 "heliox\t\theliox\theliox\t2\t5\tTARGETDIR\t0\n"
1016 "lithia\t\tlithia\tlithia\t2\t10\tTARGETDIR\t0";
1018 static const CHAR mcp_feature_comp_dat
[] = "Feature_\tComponent_\n"
1020 "FeatureComponents\tFeature_\tComponent_\n"
1021 "hydroxyl\thydrogen\n"
1025 static const CHAR mcomp_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1026 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1028 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
1029 "helium\thelium\thelium\t0\t\t\t8192\t1\n"
1030 "lithium\tlithium\tlithium\t0\t\t\t8192\t1\n"
1031 "beryllium\tmissingcomp\tberyllium\t0\t\t\t8192\t1";
1033 static const CHAR ai_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1034 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1036 "five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
1037 "four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
1038 "one.txt\tOne\tone.txt\t1000\t\t\t16384\t1\n"
1039 "three.txt\tThree\tthree.txt\t1000\t\t\t16384\t3\n"
1040 "two.txt\tTwo\ttwo.txt\t1000\t\t\t16384\t2\n"
1041 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
1042 "service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t1";
1044 static const CHAR ip_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1046 "InstallExecuteSequence\tAction\n"
1047 "CostFinalize\t\t1000\n"
1048 "ValidateProductID\t\t700\n"
1049 "CostInitialize\t\t800\n"
1051 "RemoveFiles\t\t3500\n"
1052 "InstallFiles\t\t4000\n"
1053 "RegisterUser\t\t6000\n"
1054 "RegisterProduct\t\t6100\n"
1055 "PublishFeatures\t\t6300\n"
1056 "PublishProduct\t\t6400\n"
1057 "InstallFinalize\t\t6600\n"
1058 "InstallInitialize\t\t1500\n"
1059 "ProcessComponents\t\t1600\n"
1060 "UnpublishFeatures\t\t1800\n"
1061 "InstallValidate\t\t1400\n"
1062 "LaunchConditions\t\t100\n"
1063 "TestInstalledProp\tInstalled AND NOT REMOVE\t950\n";
1065 static const CHAR ip_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
1066 "s72\ti2\tS64\tS0\tS255\n"
1067 "CustomAction\tAction\n"
1068 "TestInstalledProp\t19\t\tTest failed\t\n";
1070 static const CHAR aup_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1072 "InstallExecuteSequence\tAction\n"
1073 "CostFinalize\t\t1000\n"
1074 "ValidateProductID\t\t700\n"
1075 "CostInitialize\t\t800\n"
1077 "RemoveFiles\t\t3500\n"
1078 "InstallFiles\t\t4000\n"
1079 "RegisterUser\t\t6000\n"
1080 "RegisterProduct\t\t6100\n"
1081 "PublishFeatures\t\t6300\n"
1082 "PublishProduct\t\t6400\n"
1083 "InstallFinalize\t\t6600\n"
1084 "InstallInitialize\t\t1500\n"
1085 "ProcessComponents\t\t1600\n"
1086 "UnpublishFeatures\t\t1800\n"
1087 "InstallValidate\t\t1400\n"
1088 "LaunchConditions\t\t100\n"
1089 "TestAllUsersProp\tALLUSERS AND NOT REMOVE\t50\n";
1091 static const CHAR aup2_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1093 "InstallExecuteSequence\tAction\n"
1094 "CostFinalize\t\t1000\n"
1095 "ValidateProductID\t\t700\n"
1096 "CostInitialize\t\t800\n"
1098 "RemoveFiles\t\t3500\n"
1099 "InstallFiles\t\t4000\n"
1100 "RegisterUser\t\t6000\n"
1101 "RegisterProduct\t\t6100\n"
1102 "PublishFeatures\t\t6300\n"
1103 "PublishProduct\t\t6400\n"
1104 "InstallFinalize\t\t6600\n"
1105 "InstallInitialize\t\t1500\n"
1106 "ProcessComponents\t\t1600\n"
1107 "UnpublishFeatures\t\t1800\n"
1108 "InstallValidate\t\t1400\n"
1109 "LaunchConditions\t\t100\n"
1110 "TestAllUsersProp\tALLUSERS=2 AND NOT REMOVE\t50\n";
1112 static const CHAR aup3_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1114 "InstallExecuteSequence\tAction\n"
1115 "CostFinalize\t\t1000\n"
1116 "ValidateProductID\t\t700\n"
1117 "CostInitialize\t\t800\n"
1119 "RemoveFiles\t\t3500\n"
1120 "InstallFiles\t\t4000\n"
1121 "RegisterUser\t\t6000\n"
1122 "RegisterProduct\t\t6100\n"
1123 "PublishFeatures\t\t6300\n"
1124 "PublishProduct\t\t6400\n"
1125 "InstallFinalize\t\t6600\n"
1126 "InstallInitialize\t\t1500\n"
1127 "ProcessComponents\t\t1600\n"
1128 "UnpublishFeatures\t\t1800\n"
1129 "InstallValidate\t\t1400\n"
1130 "LaunchConditions\t\t100\n"
1131 "TestAllUsersProp\tALLUSERS=1 AND NOT REMOVE\t50\n";
1133 static const CHAR aup_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
1134 "s72\ti2\tS64\tS0\tS255\n"
1135 "CustomAction\tAction\n"
1136 "TestAllUsersProp\t19\t\tTest failed\t\n";
1138 static const CHAR cf_create_folders_dat
[] = "Directory_\tComponent_\n"
1140 "CreateFolder\tDirectory_\tComponent_\n"
1143 static const CHAR cf_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1145 "InstallExecuteSequence\tAction\n"
1146 "CostFinalize\t\t1000\n"
1147 "ValidateProductID\t\t700\n"
1148 "CostInitialize\t\t800\n"
1150 "RemoveFiles\t\t3500\n"
1151 "CreateFolders\t\t3700\n"
1152 "InstallExecute\t\t3800\n"
1153 "TestCreateFolders\t\t3900\n"
1154 "InstallFiles\t\t4000\n"
1155 "RegisterUser\t\t6000\n"
1156 "RegisterProduct\t\t6100\n"
1157 "PublishFeatures\t\t6300\n"
1158 "PublishProduct\t\t6400\n"
1159 "InstallFinalize\t\t6600\n"
1160 "InstallInitialize\t\t1500\n"
1161 "ProcessComponents\t\t1600\n"
1162 "UnpublishFeatures\t\t1800\n"
1163 "InstallValidate\t\t1400\n"
1164 "LaunchConditions\t\t100\n";
1166 static const CHAR cf_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
1167 "s72\ti2\tS64\tS0\tS255\n"
1168 "CustomAction\tAction\n"
1169 "TestCreateFolders\t19\t\tHalts installation\t\n";
1171 static const CHAR rf_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1173 "InstallExecuteSequence\tAction\n"
1174 "CostFinalize\t\t1000\n"
1175 "ValidateProductID\t\t700\n"
1176 "CostInitialize\t\t800\n"
1178 "RemoveFiles\t\t3500\n"
1179 "CreateFolders\t\t3600\n"
1180 "RemoveFolders\t\t3700\n"
1181 "InstallExecute\t\t3800\n"
1182 "TestCreateFolders\t\t3900\n"
1183 "InstallFiles\t\t4000\n"
1184 "RegisterUser\t\t6000\n"
1185 "RegisterProduct\t\t6100\n"
1186 "PublishFeatures\t\t6300\n"
1187 "PublishProduct\t\t6400\n"
1188 "InstallFinalize\t\t6600\n"
1189 "InstallInitialize\t\t1500\n"
1190 "ProcessComponents\t\t1600\n"
1191 "UnpublishFeatures\t\t1800\n"
1192 "InstallValidate\t\t1400\n"
1193 "LaunchConditions\t\t100\n";
1196 static const CHAR sr_selfreg_dat
[] = "File_\tCost\n"
1201 static const CHAR sr_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1203 "InstallExecuteSequence\tAction\n"
1204 "CostFinalize\t\t1000\n"
1205 "CostInitialize\t\t800\n"
1207 "ResolveSource\t\t950\n"
1208 "MoveFiles\t\t1700\n"
1209 "SelfUnregModules\t\t3900\n"
1210 "InstallFiles\t\t4000\n"
1211 "DuplicateFiles\t\t4500\n"
1212 "WriteEnvironmentStrings\t\t4550\n"
1213 "CreateShortcuts\t\t4600\n"
1214 "InstallFinalize\t\t6600\n"
1215 "InstallInitialize\t\t1500\n"
1216 "InstallValidate\t\t1400\n"
1217 "LaunchConditions\t\t100\n";
1219 static const CHAR font_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
1220 "i2\ti4\tL64\tS255\tS32\tS72\n"
1222 "1\t3\t\t\tDISK1\t\n";
1224 static const CHAR font_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1225 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1227 "font.ttf\tfonts\tfont.ttf\t1000\t\t\t8192\t1\n";
1229 static const CHAR font_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1230 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1231 "Feature\tFeature\n"
1232 "fonts\t\t\tfont feature\t1\t2\tMSITESTDIR\t0\n";
1234 static const CHAR font_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1235 "s72\tS38\ts72\ti2\tS255\tS72\n"
1236 "Component\tComponent\n"
1237 "fonts\t{F5920ED0-1183-4B8F-9330-86CE56557C05}\tMSITESTDIR\t0\t\tfont.ttf\n";
1239 static const CHAR font_feature_comp_dat
[] = "Feature_\tComponent_\n"
1241 "FeatureComponents\tFeature_\tComponent_\n"
1244 static const CHAR font_dat
[] = "File_\tFontTitle\n"
1247 "font.ttf\tmsi test font\n";
1249 static const CHAR font_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1251 "InstallExecuteSequence\tAction\n"
1252 "ValidateProductID\t\t700\n"
1253 "CostInitialize\t\t800\n"
1255 "CostFinalize\t\t1000\n"
1256 "InstallValidate\t\t1400\n"
1257 "InstallInitialize\t\t1500\n"
1258 "ProcessComponents\t\t1600\n"
1259 "UnpublishFeatures\t\t1800\n"
1260 "RemoveFiles\t\t3500\n"
1261 "InstallFiles\t\t4000\n"
1262 "RegisterFonts\t\t4100\n"
1263 "UnregisterFonts\t\t4200\n"
1264 "RegisterUser\t\t6000\n"
1265 "RegisterProduct\t\t6100\n"
1266 "PublishFeatures\t\t6300\n"
1267 "PublishProduct\t\t6400\n"
1268 "InstallFinalize\t\t6600";
1270 static const CHAR vp_property_dat
[] = "Property\tValue\n"
1272 "Property\tProperty\n"
1275 "InstallMode\tTypical\n"
1276 "Manufacturer\tWine\n"
1277 "PIDTemplate\t###-#######\n"
1278 "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
1279 "ProductLanguage\t1033\n"
1280 "ProductName\tMSITEST\n"
1281 "ProductVersion\t1.1.1\n"
1282 "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n";
1284 static const CHAR vp_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
1285 "s72\ti2\tS64\tS0\tS255\n"
1286 "CustomAction\tAction\n"
1287 "SetProductID1\t51\tProductID\t1\t\n"
1288 "SetProductID2\t51\tProductID\t2\t\n"
1289 "TestProductID1\t19\t\t\tHalts installation\n"
1290 "TestProductID2\t19\t\t\tHalts installation\n";
1292 static const CHAR vp_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1294 "InstallExecuteSequence\tAction\n"
1295 "LaunchConditions\t\t100\n"
1296 "CostInitialize\t\t800\n"
1298 "CostFinalize\t\t1000\n"
1299 "InstallValidate\t\t1400\n"
1300 "InstallInitialize\t\t1500\n"
1301 "SetProductID1\tSET_PRODUCT_ID=1\t3000\n"
1302 "SetProductID2\tSET_PRODUCT_ID=2\t3100\n"
1303 "ValidateProductID\t\t3200\n"
1304 "InstallExecute\t\t3300\n"
1305 "TestProductID1\tProductID=1\t3400\n"
1306 "TestProductID2\tProductID=\"123-1234567\"\t3500\n"
1307 "InstallFiles\t\t4000\n"
1308 "InstallFinalize\t\t6000\n";
1310 static const CHAR odbc_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1311 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1313 "ODBCdriver.dll\todbc\tODBCdriver.dll\t1000\t\t\t8192\t1\n"
1314 "ODBCdriver2.dll\todbc\tODBCdriver2.dll\t1000\t\t\t8192\t2\n"
1315 "ODBCtranslator.dll\todbc\tODBCtranslator.dll\t1000\t\t\t8192\t3\n"
1316 "ODBCtranslator2.dll\todbc\tODBCtranslator2.dll\t1000\t\t\t8192\t4\n"
1317 "ODBCsetup.dll\todbc\tODBCsetup.dll\t1000\t\t\t8192\t5\n";
1319 static const CHAR odbc_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1320 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1321 "Feature\tFeature\n"
1322 "odbc\t\t\todbc feature\t1\t2\tMSITESTDIR\t0\n";
1324 static const CHAR odbc_feature_comp_dat
[] = "Feature_\tComponent_\n"
1326 "FeatureComponents\tFeature_\tComponent_\n"
1329 static const CHAR odbc_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1330 "s72\tS38\ts72\ti2\tS255\tS72\n"
1331 "Component\tComponent\n"
1332 "odbc\t{B6F3E4AE-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t0\t\tODBCdriver.dll\n";
1334 static const CHAR odbc_driver_dat
[] = "Driver\tComponent_\tDescription\tFile_\tFile_Setup\n"
1335 "s72\ts72\ts255\ts72\tS72\n"
1336 "ODBCDriver\tDriver\n"
1337 "ODBC test driver\todbc\tODBC test driver\tODBCdriver.dll\t\n"
1338 "ODBC test driver2\todbc\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n";
1340 static const CHAR odbc_translator_dat
[] = "Translator\tComponent_\tDescription\tFile_\tFile_Setup\n"
1341 "s72\ts72\ts255\ts72\tS72\n"
1342 "ODBCTranslator\tTranslator\n"
1343 "ODBC test translator\todbc\tODBC test translator\tODBCtranslator.dll\t\n"
1344 "ODBC test translator2\todbc\tODBC test translator2\tODBCtranslator2.dll\tODBCsetup.dll\n";
1346 static const CHAR odbc_datasource_dat
[] = "DataSource\tComponent_\tDescription\tDriverDescription\tRegistration\n"
1347 "s72\ts72\ts255\ts255\ti2\n"
1348 "ODBCDataSource\tDataSource\n"
1349 "ODBC data source\todbc\tODBC data source\tODBC driver\t0\n";
1351 static const CHAR odbc_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1353 "InstallExecuteSequence\tAction\n"
1354 "LaunchConditions\t\t100\n"
1355 "CostInitialize\t\t800\n"
1357 "CostFinalize\t\t1000\n"
1358 "InstallValidate\t\t1400\n"
1359 "InstallInitialize\t\t1500\n"
1360 "ProcessComponents\t\t1600\n"
1361 "InstallODBC\t\t3000\n"
1362 "RemoveODBC\t\t3100\n"
1363 "RemoveFiles\t\t3900\n"
1364 "InstallFiles\t\t4000\n"
1365 "RegisterProduct\t\t5000\n"
1366 "PublishFeatures\t\t5100\n"
1367 "PublishProduct\t\t5200\n"
1368 "InstallFinalize\t\t6000\n";
1370 static const CHAR odbc_media_dat
[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
1371 "i2\ti4\tL64\tS255\tS32\tS72\n"
1373 "1\t5\t\t\tDISK1\t\n";
1375 static const CHAR tl_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1376 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1378 "typelib.dll\ttypelib\ttypelib.dll\t1000\t\t\t8192\t1\n";
1380 static const CHAR tl_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1381 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1382 "Feature\tFeature\n"
1383 "typelib\t\t\ttypelib feature\t1\t2\tMSITESTDIR\t0\n";
1385 static const CHAR tl_feature_comp_dat
[] = "Feature_\tComponent_\n"
1387 "FeatureComponents\tFeature_\tComponent_\n"
1388 "typelib\ttypelib\n";
1390 static const CHAR tl_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1391 "s72\tS38\ts72\ti2\tS255\tS72\n"
1392 "Component\tComponent\n"
1393 "typelib\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\ttypelib.dll\n";
1395 static const CHAR tl_typelib_dat
[] = "LibID\tLanguage\tComponent_\tVersion\tDescription\tDirectory_\tFeature_\tCost\n"
1396 "s38\ti2\ts72\tI4\tL128\tS72\ts38\tI4\n"
1397 "TypeLib\tLibID\tLanguage\tComponent_\n"
1398 "{EAC5166A-9734-4D91-878F-1DD02304C66C}\t0\ttypelib\t1793\t\tMSITESTDIR\ttypelib\t\n";
1400 static const CHAR tl_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1402 "InstallExecuteSequence\tAction\n"
1403 "LaunchConditions\t\t100\n"
1404 "CostInitialize\t\t800\n"
1406 "CostFinalize\t\t1000\n"
1407 "InstallValidate\t\t1400\n"
1408 "InstallInitialize\t\t1500\n"
1409 "ProcessComponents\t\t1600\n"
1410 "RemoveFiles\t\t1700\n"
1411 "InstallFiles\t\t2000\n"
1412 "RegisterTypeLibraries\tREGISTER_TYPELIB=1\t3000\n"
1413 "UnregisterTypeLibraries\t\t3100\n"
1414 "RegisterProduct\t\t5100\n"
1415 "PublishFeatures\t\t5200\n"
1416 "PublishProduct\t\t5300\n"
1417 "InstallFinalize\t\t6000\n";
1419 static const CHAR crs_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1420 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1422 "target.txt\tshortcut\ttarget.txt\t1000\t\t\t8192\t1\n";
1424 static const CHAR crs_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1425 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1426 "Feature\tFeature\n"
1427 "shortcut\t\t\tshortcut feature\t1\t2\tMSITESTDIR\t0\n";
1429 static const CHAR crs_feature_comp_dat
[] = "Feature_\tComponent_\n"
1431 "FeatureComponents\tFeature_\tComponent_\n"
1432 "shortcut\tshortcut\n";
1434 static const CHAR crs_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1435 "s72\tS38\ts72\ti2\tS255\tS72\n"
1436 "Component\tComponent\n"
1437 "shortcut\t{5D20E3C6-7206-498F-AC28-87AF2F9AD4CC}\tMSITESTDIR\t0\t\ttarget.txt\n";
1439 static const CHAR crs_shortcut_dat
[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
1440 "s72\ts72\tl128\ts72\ts72\tL255\tL255\tI2\tS72\tI2\tI2\tS72\n"
1441 "Shortcut\tShortcut\n"
1442 "shortcut\tMSITESTDIR\tshortcut\tshortcut\t[MSITESTDIR]target.txt\t\t\t\t\t\t\t\n";
1444 static const CHAR crs_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1446 "InstallExecuteSequence\tAction\n"
1447 "LaunchConditions\t\t100\n"
1448 "CostInitialize\t\t800\n"
1450 "CostFinalize\t\t1000\n"
1451 "InstallValidate\t\t1400\n"
1452 "InstallInitialize\t\t1500\n"
1453 "ProcessComponents\t\t1600\n"
1454 "RemoveFiles\t\t1700\n"
1455 "InstallFiles\t\t2000\n"
1456 "RemoveShortcuts\t\t3000\n"
1457 "CreateShortcuts\t\t3100\n"
1458 "RegisterProduct\t\t5000\n"
1459 "PublishFeatures\t\t5100\n"
1460 "PublishProduct\t\t5200\n"
1461 "InstallFinalize\t\t6000\n";
1463 static const CHAR fo_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1464 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1466 "override.txt\toverride\toverride.txt\t1000\t\t\t8192\t1\n"
1467 "preselected.txt\tpreselected\tpreselected.txt\t1000\t\t\t8192\t2\n"
1468 "notpreselected.txt\tnotpreselected\tnotpreselected.txt\t1000\t\t\t8192\t3\n";
1470 static const CHAR fo_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1471 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1472 "Feature\tFeature\n"
1473 "override\t\t\toverride feature\t1\t1\tMSITESTDIR\t0\n"
1474 "preselected\t\t\tpreselected feature\t1\t1\tMSITESTDIR\t0\n"
1475 "notpreselected\t\t\tnotpreselected feature\t1\t1\tMSITESTDIR\t0\n";
1477 static const CHAR fo_condition_dat
[] = "Feature_\tLevel\tCondition\n"
1479 "Condition\tFeature_\tLevel\n"
1480 "preselected\t0\tPreselected\n"
1481 "notpreselected\t0\tNOT Preselected\n";
1483 static const CHAR fo_feature_comp_dat
[] = "Feature_\tComponent_\n"
1485 "FeatureComponents\tFeature_\tComponent_\n"
1486 "override\toverride\n"
1487 "preselected\tpreselected\n"
1488 "notpreselected\tnotpreselected\n";
1490 static const CHAR fo_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1491 "s72\tS38\ts72\ti2\tS255\tS72\n"
1492 "Component\tComponent\n"
1493 "override\t{0A00FB1D-97B0-4B42-ADF0-BB8913416623}\tMSITESTDIR\t0\t\toverride.txt\n"
1494 "preselected\t{44E1DB75-605A-43DD-8CF5-CAB17F1BBD60}\tMSITESTDIR\t0\t\tpreselected.txt\n"
1495 "notpreselected\t{E1647733-5E75-400A-A92E-5E60B4D4EF9F}\tMSITESTDIR\t0\t\tnotpreselected.txt\n";
1497 static const CHAR fo_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
1498 "s72\ti2\tS64\tS0\tS255\n"
1499 "CustomAction\tAction\n"
1500 "SetPreselected\t51\tPreselected\t1\t\n";
1502 static const CHAR fo_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1504 "InstallExecuteSequence\tAction\n"
1505 "LaunchConditions\t\t100\n"
1506 "SetPreselected\tpreselect=1\t200\n"
1507 "CostInitialize\t\t800\n"
1509 "CostFinalize\t\t1000\n"
1510 "InstallValidate\t\t1400\n"
1511 "InstallInitialize\t\t1500\n"
1512 "ProcessComponents\t\t1600\n"
1513 "RemoveFiles\t\t1700\n"
1514 "InstallFiles\t\t2000\n"
1515 "RegisterProduct\t\t5000\n"
1516 "PublishFeatures\t\t5100\n"
1517 "PublishProduct\t\t5200\n"
1518 "InstallFinalize\t\t6000\n";
1520 static const CHAR pub_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1521 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1523 "english.txt\tpublish\tenglish.txt\t1000\t\t\t8192\t1\n";
1525 static const CHAR pub_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1526 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1527 "Feature\tFeature\n"
1528 "publish\t\t\tpublish feature\t1\t2\tMSITESTDIR\t0\n";
1530 static const CHAR pub_feature_comp_dat
[] = "Feature_\tComponent_\n"
1532 "FeatureComponents\tFeature_\tComponent_\n"
1533 "publish\tpublish\n";
1535 static const CHAR pub_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1536 "s72\tS38\ts72\ti2\tS255\tS72\n"
1537 "Component\tComponent\n"
1538 "publish\t{B4EA0ACF-6238-426E-9C6D-7869F0F9C768}\tMSITESTDIR\t0\t\tenglish.txt\n";
1540 static const CHAR pub_publish_component_dat
[] = "ComponentId\tQualifier\tComponent_\tAppData\tFeature_\n"
1541 "s38\ts255\ts72\tL255\ts38\n"
1542 "PublishComponent\tComponentId\tQualifier\tComponent_\n"
1543 "{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}\tenglish.txt\tpublish\t\tpublish\n";
1545 static const CHAR pub_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1547 "InstallExecuteSequence\tAction\n"
1548 "LaunchConditions\t\t100\n"
1549 "CostInitialize\t\t800\n"
1551 "CostFinalize\t\t1000\n"
1552 "InstallValidate\t\t1400\n"
1553 "InstallInitialize\t\t1500\n"
1554 "ProcessComponents\t\t1600\n"
1555 "RemoveFiles\t\t1700\n"
1556 "InstallFiles\t\t2000\n"
1557 "PublishComponents\t\t3000\n"
1558 "UnpublishComponents\t\t3100\n"
1559 "RegisterProduct\t\t5000\n"
1560 "PublishFeatures\t\t5100\n"
1561 "PublishProduct\t\t5200\n"
1562 "InstallFinalize\t\t6000\n";
1564 static const CHAR rd_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1565 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1567 "original.txt\tduplicate\toriginal.txt\t1000\t\t\t8192\t1\n"
1568 "original2.txt\tduplicate\toriginal2.txt\t1000\t\t\t8192\t2\n"
1569 "original3.txt\tduplicate2\toriginal3.txt\t1000\t\t\t8192\t3\n";
1571 static const CHAR rd_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1572 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1573 "Feature\tFeature\n"
1574 "duplicate\t\t\tduplicate feature\t1\t2\tMSITESTDIR\t0\n";
1576 static const CHAR rd_feature_comp_dat
[] = "Feature_\tComponent_\n"
1578 "FeatureComponents\tFeature_\tComponent_\n"
1579 "duplicate\tduplicate\n";
1581 static const CHAR rd_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1582 "s72\tS38\ts72\ti2\tS255\tS72\n"
1583 "Component\tComponent\n"
1584 "duplicate\t{EB45D06A-ADFE-44E3-8D41-B7DE150E41AD}\tMSITESTDIR\t0\t\toriginal.txt\n"
1585 "duplicate2\t{B8BA60E0-B2E9-488E-9D0E-E60F25F04F97}\tMSITESTDIR\t0\tDUPLICATE2=1\toriginal3.txt\n";
1587 static const CHAR rd_duplicate_file_dat
[] = "FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
1588 "s72\ts72\ts72\tS255\tS72\n"
1589 "DuplicateFile\tFileKey\n"
1590 "duplicate\tduplicate\toriginal.txt\tduplicate.txt\t\n"
1591 "duplicate2\tduplicate\toriginal2.txt\t\tMSITESTDIR\n"
1592 "duplicate3\tduplicate2\toriginal3.txt\tduplicate2.txt\t\n";
1594 static const CHAR rd_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1596 "InstallExecuteSequence\tAction\n"
1597 "LaunchConditions\t\t100\n"
1598 "CostInitialize\t\t800\n"
1600 "CostFinalize\t\t1000\n"
1601 "InstallValidate\t\t1400\n"
1602 "InstallInitialize\t\t1500\n"
1603 "ProcessComponents\t\t1600\n"
1604 "RemoveDuplicateFiles\t\t1900\n"
1605 "InstallFiles\t\t2000\n"
1606 "DuplicateFiles\t\t2100\n"
1607 "RegisterProduct\t\t5000\n"
1608 "PublishFeatures\t\t5100\n"
1609 "PublishProduct\t\t5200\n"
1610 "InstallFinalize\t\t6000\n";
1612 static const CHAR rrv_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1613 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1615 "registry.txt\tregistry\tregistry.txt\t1000\t\t\t8192\t1\n";
1617 static const CHAR rrv_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1618 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1619 "Feature\tFeature\n"
1620 "registry\t\t\tregistry feature\t1\t2\tMSITESTDIR\t0\n";
1622 static const CHAR rrv_feature_comp_dat
[] = "Feature_\tComponent_\n"
1624 "FeatureComponents\tFeature_\tComponent_\n"
1625 "registry\tregistry\n";
1627 static const CHAR rrv_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1628 "s72\tS38\ts72\ti2\tS255\tS72\n"
1629 "Component\tComponent\n"
1630 "registry\t{DA97585B-962D-45EB-AD32-DA15E60CA9EE}\tMSITESTDIR\t0\t\tregistry.txt\n";
1632 static const CHAR rrv_registry_dat
[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n"
1633 "s72\ti2\tl255\tL255\tL0\ts72\n"
1634 "Registry\tRegistry\n"
1635 "reg1\t2\tSOFTWARE\\Wine\\keyA\t\tA\tregistry\n"
1636 "reg2\t2\tSOFTWARE\\Wine\\keyA\tvalueA\tA\tregistry\n"
1637 "reg3\t2\tSOFTWARE\\Wine\\key1\t-\t\tregistry\n";
1639 static const CHAR rrv_remove_registry_dat
[] = "RemoveRegistry\tRoot\tKey\tName\tComponent_\n"
1640 "s72\ti2\tl255\tL255\ts72\n"
1641 "RemoveRegistry\tRemoveRegistry\n"
1642 "reg1\t2\tSOFTWARE\\Wine\\keyB\t\tregistry\n"
1643 "reg2\t2\tSOFTWARE\\Wine\\keyB\tValueB\tregistry\n"
1644 "reg3\t2\tSOFTWARE\\Wine\\key2\t-\tregistry\n";
1646 static const CHAR rrv_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1648 "InstallExecuteSequence\tAction\n"
1649 "LaunchConditions\t\t100\n"
1650 "CostInitialize\t\t800\n"
1652 "CostFinalize\t\t1000\n"
1653 "InstallValidate\t\t1400\n"
1654 "InstallInitialize\t\t1500\n"
1655 "ProcessComponents\t\t1600\n"
1656 "RemoveFiles\t\t1700\n"
1657 "InstallFiles\t\t2000\n"
1658 "RemoveRegistryValues\t\t3000\n"
1659 "RegisterProduct\t\t5000\n"
1660 "PublishFeatures\t\t5100\n"
1661 "PublishProduct\t\t5200\n"
1662 "InstallFinalize\t\t6000\n";
1664 static const CHAR frp_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1665 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1667 "product.txt\tproduct\tproduct.txt\t1000\t\t\t8192\t1\n";
1669 static const CHAR frp_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1670 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1671 "Feature\tFeature\n"
1672 "product\t\t\tproduct feature\t1\t2\tMSITESTDIR\t0\n";
1674 static const CHAR frp_feature_comp_dat
[] = "Feature_\tComponent_\n"
1676 "FeatureComponents\tFeature_\tComponent_\n"
1677 "product\tproduct\n";
1679 static const CHAR frp_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1680 "s72\tS38\ts72\ti2\tS255\tS72\n"
1681 "Component\tComponent\n"
1682 "product\t{44725EE0-EEA8-40BD-8162-A48224A2FEA1}\tMSITESTDIR\t0\t\tproduct.txt\n";
1684 static const CHAR frp_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
1685 "s72\ti2\tS64\tS0\tS255\n"
1686 "CustomAction\tAction\n"
1687 "TestProp\t19\t\t\tPROP set\n";
1689 static const CHAR frp_upgrade_dat
[] = "UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
1690 "s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
1691 "Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
1692 "{4C0EAA15-0264-4E5A-8758-609EF142B92D}\t1.1.1\t2.2.2\t\t768\t\tPROP\n";
1694 static const CHAR frp_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1696 "InstallExecuteSequence\tAction\n"
1697 "FindRelatedProducts\t\t50\n"
1698 "TestProp\tPROP AND NOT REMOVE\t51\n"
1699 "LaunchConditions\t\t100\n"
1700 "CostInitialize\t\t800\n"
1702 "CostFinalize\t\t1000\n"
1703 "InstallValidate\t\t1400\n"
1704 "InstallInitialize\t\t1500\n"
1705 "ProcessComponents\t\t1600\n"
1706 "RemoveFiles\t\t1700\n"
1707 "InstallFiles\t\t2000\n"
1708 "RegisterProduct\t\t5000\n"
1709 "PublishFeatures\t\t5100\n"
1710 "PublishProduct\t\t5200\n"
1711 "InstallFinalize\t\t6000\n";
1713 static const CHAR riv_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1714 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1716 "inifile.txt\tinifile\tinifile.txt\t1000\t\t\t8192\t1\n";
1718 static const CHAR riv_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1719 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1720 "Feature\tFeature\n"
1721 "inifile\t\t\tinifile feature\t1\t2\tMSITESTDIR\t0\n";
1723 static const CHAR riv_feature_comp_dat
[] = "Feature_\tComponent_\n"
1725 "FeatureComponents\tFeature_\tComponent_\n"
1726 "inifile\tinifile\n";
1728 static const CHAR riv_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1729 "s72\tS38\ts72\ti2\tS255\tS72\n"
1730 "Component\tComponent\n"
1731 "inifile\t{A0F15705-4F57-4437-88C4-6C8B37ACC6DE}\tMSITESTDIR\t0\t\tinifile.txt\n";
1733 static const CHAR riv_ini_file_dat
[] = "IniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
1734 "s72\tl255\tS72\tl96\tl128\tl255\ti2\ts72\n"
1735 "IniFile\tIniFile\n"
1736 "inifile1\ttest.ini\tMSITESTDIR\tsection1\tkey1\tvalue1\t0\tinifile\n";
1738 static const CHAR riv_remove_ini_file_dat
[] = "RemoveIniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
1739 "s72\tl255\tS72\tl96\tl128\tL255\ti2\ts72\n"
1740 "RemoveIniFile\tRemoveIniFile\n"
1741 "inifile1\ttest.ini\tMSITESTDIR\tsectionA\tkeyA\tvalueA\t2\tinifile\n";
1743 static const CHAR riv_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1745 "InstallExecuteSequence\tAction\n"
1746 "LaunchConditions\t\t100\n"
1747 "CostInitialize\t\t800\n"
1749 "CostFinalize\t\t1000\n"
1750 "InstallValidate\t\t1400\n"
1751 "InstallInitialize\t\t1500\n"
1752 "ProcessComponents\t\t1600\n"
1753 "RemoveFiles\t\t1700\n"
1754 "InstallFiles\t\t2000\n"
1755 "RemoveIniValues\t\t3000\n"
1756 "RegisterProduct\t\t5000\n"
1757 "PublishFeatures\t\t5100\n"
1758 "PublishProduct\t\t5200\n"
1759 "InstallFinalize\t\t6000\n";
1761 static const CHAR res_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1762 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1764 "envvar.txt\tenvvar\tenvvar.txt\t1000\t\t\t8192\t1\n";
1766 static const CHAR res_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1767 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1768 "Feature\tFeature\n"
1769 "envvar\t\t\tenvvar feature\t1\t2\tMSITESTDIR\t0\n";
1771 static const CHAR res_feature_comp_dat
[] = "Feature_\tComponent_\n"
1773 "FeatureComponents\tFeature_\tComponent_\n"
1776 static const CHAR res_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1777 "s72\tS38\ts72\ti2\tS255\tS72\n"
1778 "Component\tComponent\n"
1779 "envvar\t{45EE9AF4-E5D1-445F-8BB7-B22D4EEBD29E}\tMSITESTDIR\t0\t\tenvvar.txt\n";
1781 static const CHAR res_environment_dat
[] = "Environment\tName\tValue\tComponent_\n"
1782 "s72\tl255\tL255\ts72\n"
1783 "Environment\tEnvironment\n"
1784 "var1\t=-MSITESTVAR1\t1\tenvvar\n"
1785 "var2\t=+-MSITESTVAR2\t1\tenvvar\n"
1786 "var3\t=MSITESTVAR3\t1\tenvvar\n"
1787 "var4\t=-MSITESTVAR4\t\tenvvar\n"
1788 "var5\t=MSITESTVAR5\t\tenvvar\n";
1790 static const CHAR res_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1792 "InstallExecuteSequence\tAction\n"
1793 "LaunchConditions\t\t100\n"
1794 "CostInitialize\t\t800\n"
1796 "CostFinalize\t\t1000\n"
1797 "InstallValidate\t\t1400\n"
1798 "InstallInitialize\t\t1500\n"
1799 "ProcessComponents\t\t1600\n"
1800 "RemoveFiles\t\t1700\n"
1801 "InstallFiles\t\t2000\n"
1802 "RemoveEnvironmentStrings\t\t3000\n"
1803 "RegisterProduct\t\t5000\n"
1804 "PublishFeatures\t\t5100\n"
1805 "PublishProduct\t\t5200\n"
1806 "InstallFinalize\t\t6000\n";
1808 static const CHAR rci_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1809 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1811 "class.txt\tclass\tclass.txt\t1000\t\t\t8192\t1\n";
1813 static const CHAR rci_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1814 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1815 "Feature\tFeature\n"
1816 "class\t\t\tclass feature\t1\t2\tMSITESTDIR\t0\n";
1818 static const CHAR rci_feature_comp_dat
[] = "Feature_\tComponent_\n"
1820 "FeatureComponents\tFeature_\tComponent_\n"
1823 static const CHAR rci_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1824 "s72\tS38\ts72\ti2\tS255\tS72\n"
1825 "Component\tComponent\n"
1826 "class\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tclass.txt\n";
1828 static const CHAR rci_appid_dat
[] = "AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
1829 "s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
1831 "{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n";
1833 static const CHAR rci_class_dat
[] = "CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
1834 "s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
1835 "Class\tCLSID\tContext\tComponent_\n"
1836 "{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tclass\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tclass\t\n";
1838 static const CHAR rci_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1840 "InstallExecuteSequence\tAction\n"
1841 "LaunchConditions\t\t100\n"
1842 "CostInitialize\t\t800\n"
1844 "CostFinalize\t\t1000\n"
1845 "InstallValidate\t\t1400\n"
1846 "InstallInitialize\t\t1500\n"
1847 "ProcessComponents\t\t1600\n"
1848 "RemoveFiles\t\t1700\n"
1849 "InstallFiles\t\t2000\n"
1850 "UnregisterClassInfo\t\t3000\n"
1851 "RegisterClassInfo\t\t4000\n"
1852 "RegisterProduct\t\t5000\n"
1853 "PublishFeatures\t\t5100\n"
1854 "PublishProduct\t\t5200\n"
1855 "InstallFinalize\t\t6000\n";
1857 static const CHAR rei_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1858 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1860 "extension.txt\textension\textension.txt\t1000\t\t\t8192\t1\n";
1862 static const CHAR rei_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1863 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1864 "Feature\tFeature\n"
1865 "extension\t\t\textension feature\t1\t2\tMSITESTDIR\t0\n";
1867 static const CHAR rei_feature_comp_dat
[] = "Feature_\tComponent_\n"
1869 "FeatureComponents\tFeature_\tComponent_\n"
1870 "extension\textension\n";
1872 static const CHAR rei_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1873 "s72\tS38\ts72\ti2\tS255\tS72\n"
1874 "Component\tComponent\n"
1875 "extension\t{9A3060D4-60BA-4A82-AB55-9FB148AD013C}\tMSITESTDIR\t0\t\textension.txt\n";
1877 static const CHAR rei_extension_dat
[] = "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1878 "s255\ts72\tS255\tS64\ts38\n"
1879 "Extension\tExtension\tComponent_\n"
1880 "extension\textension\tProg.Id.1\t\textension\n";
1882 static const CHAR rei_verb_dat
[] = "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1883 "s255\ts32\tI2\tL255\tL255\n"
1884 "Verb\tExtension_\tVerb\n"
1885 "extension\tOpen\t1\t&Open\t/argument\n";
1887 static const CHAR rei_progid_dat
[] = "ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
1888 "s255\tS255\tS38\tL255\tS72\tI2\n"
1890 "Prog.Id.1\t\t\tdescription\t\t\n";
1892 static const CHAR rei_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1894 "InstallExecuteSequence\tAction\n"
1895 "LaunchConditions\t\t100\n"
1896 "CostInitialize\t\t800\n"
1898 "CostFinalize\t\t1000\n"
1899 "InstallValidate\t\t1400\n"
1900 "InstallInitialize\t\t1500\n"
1901 "ProcessComponents\t\t1600\n"
1902 "RemoveFiles\t\t1700\n"
1903 "InstallFiles\t\t2000\n"
1904 "UnregisterExtensionInfo\t\t3000\n"
1905 "RegisterExtensionInfo\t\t4000\n"
1906 "RegisterProduct\t\t5000\n"
1907 "PublishFeatures\t\t5100\n"
1908 "PublishProduct\t\t5200\n"
1909 "InstallFinalize\t\t6000\n";
1911 static const CHAR rmi_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1912 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1914 "mime.txt\tmime\tmime.txt\t1000\t\t\t8192\t1\n";
1916 static const CHAR rmi_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1917 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1918 "Feature\tFeature\n"
1919 "mime\t\t\tmime feature\t1\t2\tMSITESTDIR\t0\n";
1921 static const CHAR rmi_feature_comp_dat
[] = "Feature_\tComponent_\n"
1923 "FeatureComponents\tFeature_\tComponent_\n"
1926 static const CHAR rmi_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1927 "s72\tS38\ts72\ti2\tS255\tS72\n"
1928 "Component\tComponent\n"
1929 "mime\t{A1D630CE-13A7-4882-AFDD-148E2BBAFC6D}\tMSITESTDIR\t0\t\tmime.txt\n";
1931 static const CHAR rmi_extension_dat
[] = "Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
1932 "s255\ts72\tS255\tS64\ts38\n"
1933 "Extension\tExtension\tComponent_\n"
1934 "mime\tmime\t\tmime/type\tmime\n";
1936 static const CHAR rmi_verb_dat
[] = "Extension_\tVerb\tSequence\tCommand\tArgument\n"
1937 "s255\ts32\tI2\tL255\tL255\n"
1938 "Verb\tExtension_\tVerb\n"
1939 "mime\tOpen\t1\t&Open\t/argument\n";
1941 static const CHAR rmi_mime_dat
[] = "ContentType\tExtension_\tCLSID\n"
1943 "MIME\tContentType\n"
1944 "mime/type\tmime\t\n";
1946 static const CHAR rmi_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
1948 "InstallExecuteSequence\tAction\n"
1949 "LaunchConditions\t\t100\n"
1950 "CostInitialize\t\t800\n"
1952 "CostFinalize\t\t1000\n"
1953 "InstallValidate\t\t1400\n"
1954 "InstallInitialize\t\t1500\n"
1955 "ProcessComponents\t\t1600\n"
1956 "RemoveFiles\t\t1700\n"
1957 "InstallFiles\t\t2000\n"
1958 "UnregisterExtensionInfo\t\t3000\n"
1959 "UnregisterMIMEInfo\t\t3500\n"
1960 "RegisterExtensionInfo\t\t4000\n"
1961 "RegisterMIMEInfo\t\t4500\n"
1962 "RegisterProduct\t\t5000\n"
1963 "PublishFeatures\t\t5100\n"
1964 "PublishProduct\t\t5200\n"
1965 "InstallFinalize\t\t6000\n";
1967 static const CHAR sd_file_dat
[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
1968 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
1970 "sourcedir.txt\tsourcedir\tsourcedir.txt\t1000\t\t\t8192\t1\n";
1972 static const CHAR sd_feature_dat
[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
1973 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
1974 "Feature\tFeature\n"
1975 "sourcedir\t\t\tsourcedir feature\t1\t2\tMSITESTDIR\t0\n";
1977 static const CHAR sd_feature_comp_dat
[] = "Feature_\tComponent_\n"
1979 "FeatureComponents\tFeature_\tComponent_\n"
1980 "sourcedir\tsourcedir\n";
1982 static const CHAR sd_component_dat
[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
1983 "s72\tS38\ts72\ti2\tS255\tS72\n"
1984 "Component\tComponent\n"
1985 "sourcedir\t{DD422F92-3ED8-49B5-A0B7-F266F98357DF}\tMSITESTDIR\t0\t\tsourcedir.txt\n";
1987 static const CHAR sd_install_ui_seq_dat
[] = "Action\tCondition\tSequence\n"
1989 "InstallUISequence\tAction\n"
1990 "TestSourceDirProp1\tnot SourceDir and not SOURCEDIR and not Installed\t99\n"
1991 "AppSearch\t\t100\n"
1992 "TestSourceDirProp2\tnot SourceDir and not SOURCEDIR and not Installed\t101\n"
1993 "LaunchConditions\tnot Installed \t110\n"
1994 "TestSourceDirProp3\tnot SourceDir and not SOURCEDIR and not Installed\t111\n"
1995 "FindRelatedProducts\t\t120\n"
1996 "TestSourceDirProp4\tnot SourceDir and not SOURCEDIR and not Installed\t121\n"
1997 "CCPSearch\t\t130\n"
1998 "TestSourceDirProp5\tnot SourceDir and not SOURCEDIR and not Installed\t131\n"
1999 "RMCCPSearch\t\t140\n"
2000 "TestSourceDirProp6\tnot SourceDir and not SOURCEDIR and not Installed\t141\n"
2001 "ValidateProductID\t\t150\n"
2002 "TestSourceDirProp7\tnot SourceDir and not SOURCEDIR and not Installed\t151\n"
2003 "CostInitialize\t\t800\n"
2004 "TestSourceDirProp8\tnot SourceDir and not SOURCEDIR and not Installed\t801\n"
2006 "TestSourceDirProp9\tnot SourceDir and not SOURCEDIR and not Installed\t901\n"
2007 "IsolateComponents\t\t1000\n"
2008 "TestSourceDirProp10\tnot SourceDir and not SOURCEDIR and not Installed\t1001\n"
2009 "CostFinalize\t\t1100\n"
2010 "TestSourceDirProp11\tnot SourceDir and not SOURCEDIR and not Installed\t1101\n"
2011 "MigrateFeatureStates\t\t1200\n"
2012 "TestSourceDirProp12\tnot SourceDir and not SOURCEDIR and not Installed\t1201\n"
2013 "ExecuteAction\t\t1300\n"
2014 "TestSourceDirProp13\tnot SourceDir and not SOURCEDIR and not Installed\t1301\n";
2016 static const CHAR sd_install_exec_seq_dat
[] = "Action\tCondition\tSequence\n"
2018 "InstallExecuteSequence\tAction\n"
2019 "TestSourceDirProp14\tSourceDir and SOURCEDIR and not Installed\t99\n"
2020 "LaunchConditions\t\t100\n"
2021 "TestSourceDirProp15\tSourceDir and SOURCEDIR and not Installed\t101\n"
2022 "ValidateProductID\t\t700\n"
2023 "TestSourceDirProp16\tSourceDir and SOURCEDIR and not Installed\t701\n"
2024 "CostInitialize\t\t800\n"
2025 "TestSourceDirProp17\tSourceDir and SOURCEDIR and not Installed\t801\n"
2026 "ResolveSource\tResolveSource and not Installed\t850\n"
2027 "TestSourceDirProp18\tResolveSource and not SourceDir and not SOURCEDIR and not Installed\t851\n"
2028 "TestSourceDirProp19\tnot ResolveSource and SourceDir and SOURCEDIR and not Installed\t852\n"
2030 "TestSourceDirProp20\tSourceDir and SOURCEDIR and not Installed\t901\n"
2031 "IsolateComponents\t\t1000\n"
2032 "TestSourceDirProp21\tSourceDir and SOURCEDIR and not Installed\t1001\n"
2033 "CostFinalize\t\t1100\n"
2034 "TestSourceDirProp22\tSourceDir and SOURCEDIR and not Installed\t1101\n"
2035 "MigrateFeatureStates\t\t1200\n"
2036 "TestSourceDirProp23\tSourceDir and SOURCEDIR and not Installed\t1201\n"
2037 "InstallValidate\t\t1400\n"
2038 "TestSourceDirProp24\tSourceDir and SOURCEDIR and not Installed\t1401\n"
2039 "InstallInitialize\t\t1500\n"
2040 "TestSourceDirProp25\tSourceDir and SOURCEDIR and not Installed\t1501\n"
2041 "ProcessComponents\t\t1600\n"
2042 "TestSourceDirProp26\tnot SourceDir and not SOURCEDIR and not Installed\t1601\n"
2043 "UnpublishFeatures\t\t1800\n"
2044 "TestSourceDirProp27\tnot SourceDir and not SOURCEDIR and not Installed\t1801\n"
2045 "RemoveFiles\t\t3500\n"
2046 "TestSourceDirProp28\tnot SourceDir and not SOURCEDIR and not Installed\t3501\n"
2047 "InstallFiles\t\t4000\n"
2048 "TestSourceDirProp29\tnot SourceDir and not SOURCEDIR and not Installed\t4001\n"
2049 "RegisterUser\t\t6000\n"
2050 "TestSourceDirProp30\tnot SourceDir and not SOURCEDIR and not Installed\t6001\n"
2051 "RegisterProduct\t\t6100\n"
2052 "TestSourceDirProp31\tnot SourceDir and not SOURCEDIR and not Installed\t6101\n"
2053 "PublishFeatures\t\t6300\n"
2054 "TestSourceDirProp32\tnot SourceDir and not SOURCEDIR and not Installed\t6301\n"
2055 "PublishProduct\t\t6400\n"
2056 "TestSourceDirProp33\tnot SourceDir and not SOURCEDIR and not Installed\t6401\n"
2057 "InstallExecute\t\t6500\n"
2058 "TestSourceDirProp34\tnot SourceDir and not SOURCEDIR and not Installed\t6501\n"
2059 "InstallFinalize\t\t6600\n"
2060 "TestSourceDirProp35\tnot SourceDir and not SOURCEDIR and not Installed\t6601\n";
2062 static const CHAR sd_custom_action_dat
[] = "Action\tType\tSource\tTarget\tISComments\n"
2063 "s72\ti2\tS64\tS0\tS255\n"
2064 "CustomAction\tAction\n"
2065 "TestSourceDirProp1\t19\t\tTest 1 failed\t\n"
2066 "TestSourceDirProp2\t19\t\tTest 2 failed\t\n"
2067 "TestSourceDirProp3\t19\t\tTest 3 failed\t\n"
2068 "TestSourceDirProp4\t19\t\tTest 4 failed\t\n"
2069 "TestSourceDirProp5\t19\t\tTest 5 failed\t\n"
2070 "TestSourceDirProp6\t19\t\tTest 6 failed\t\n"
2071 "TestSourceDirProp7\t19\t\tTest 7 failed\t\n"
2072 "TestSourceDirProp8\t19\t\tTest 8 failed\t\n"
2073 "TestSourceDirProp9\t19\t\tTest 9 failed\t\n"
2074 "TestSourceDirProp10\t19\t\tTest 10 failed\t\n"
2075 "TestSourceDirProp11\t19\t\tTest 11 failed\t\n"
2076 "TestSourceDirProp12\t19\t\tTest 12 failed\t\n"
2077 "TestSourceDirProp13\t19\t\tTest 13 failed\t\n"
2078 "TestSourceDirProp14\t19\t\tTest 14 failed\t\n"
2079 "TestSourceDirProp15\t19\t\tTest 15 failed\t\n"
2080 "TestSourceDirProp16\t19\t\tTest 16 failed\t\n"
2081 "TestSourceDirProp17\t19\t\tTest 17 failed\t\n"
2082 "TestSourceDirProp18\t19\t\tTest 18 failed\t\n"
2083 "TestSourceDirProp19\t19\t\tTest 19 failed\t\n"
2084 "TestSourceDirProp20\t19\t\tTest 20 failed\t\n"
2085 "TestSourceDirProp21\t19\t\tTest 21 failed\t\n"
2086 "TestSourceDirProp22\t19\t\tTest 22 failed\t\n"
2087 "TestSourceDirProp23\t19\t\tTest 23 failed\t\n"
2088 "TestSourceDirProp24\t19\t\tTest 24 failed\t\n"
2089 "TestSourceDirProp25\t19\t\tTest 25 failed\t\n"
2090 "TestSourceDirProp26\t19\t\tTest 26 failed\t\n"
2091 "TestSourceDirProp27\t19\t\tTest 27 failed\t\n"
2092 "TestSourceDirProp28\t19\t\tTest 28 failed\t\n"
2093 "TestSourceDirProp29\t19\t\tTest 29 failed\t\n"
2094 "TestSourceDirProp30\t19\t\tTest 30 failed\t\n"
2095 "TestSourceDirProp31\t19\t\tTest 31 failed\t\n"
2096 "TestSourceDirProp32\t19\t\tTest 32 failed\t\n"
2097 "TestSourceDirProp33\t19\t\tTest 33 failed\t\n"
2098 "TestSourceDirProp34\t19\t\tTest 34 failed\t\n"
2099 "TestSourceDirProp35\t19\t\tTest 35 failed\t\n";
2101 typedef struct _msi_table
2103 const CHAR
*filename
;
2108 #define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)}
2110 static const msi_table tables
[] =
2112 ADD_TABLE(component
),
2113 ADD_TABLE(directory
),
2115 ADD_TABLE(feature_comp
),
2117 ADD_TABLE(install_exec_seq
),
2119 ADD_TABLE(property
),
2120 ADD_TABLE(registry
),
2121 ADD_TABLE(service_install
),
2122 ADD_TABLE(service_control
)
2125 static const msi_table sc_tables
[] =
2127 ADD_TABLE(component
),
2128 ADD_TABLE(directory
),
2130 ADD_TABLE(feature_comp
),
2132 ADD_TABLE(install_exec_seq
),
2134 ADD_TABLE(property
),
2138 static const msi_table ps_tables
[] =
2140 ADD_TABLE(component
),
2141 ADD_TABLE(directory
),
2143 ADD_TABLE(feature_comp
),
2145 ADD_TABLE(install_exec_seq
),
2147 ADD_TABLE(property
),
2148 ADD_TABLE(condition
)
2151 static const msi_table env_tables
[] =
2153 ADD_TABLE(component
),
2154 ADD_TABLE(directory
),
2156 ADD_TABLE(feature_comp
),
2158 ADD_TABLE(install_exec_seq
),
2160 ADD_TABLE(property
),
2161 ADD_TABLE(environment
)
2164 static const msi_table up_tables
[] =
2166 ADD_TABLE(component
),
2167 ADD_TABLE(directory
),
2169 ADD_TABLE(feature_comp
),
2171 ADD_TABLE(install_exec_seq
),
2173 ADD_TABLE(up_property
),
2174 ADD_TABLE(registry
),
2175 ADD_TABLE(service_install
),
2176 ADD_TABLE(service_control
)
2179 static const msi_table up2_tables
[] =
2181 ADD_TABLE(component
),
2182 ADD_TABLE(directory
),
2184 ADD_TABLE(feature_comp
),
2186 ADD_TABLE(install_exec_seq
),
2188 ADD_TABLE(up2_property
),
2189 ADD_TABLE(registry
),
2190 ADD_TABLE(service_install
),
2191 ADD_TABLE(service_control
)
2194 static const msi_table up3_tables
[] =
2196 ADD_TABLE(component
),
2197 ADD_TABLE(directory
),
2199 ADD_TABLE(feature_comp
),
2201 ADD_TABLE(install_exec_seq
),
2203 ADD_TABLE(up3_property
),
2204 ADD_TABLE(registry
),
2205 ADD_TABLE(service_install
),
2206 ADD_TABLE(service_control
)
2209 static const msi_table up4_tables
[] =
2211 ADD_TABLE(component
),
2212 ADD_TABLE(directory
),
2214 ADD_TABLE(feature_comp
),
2216 ADD_TABLE(pp_install_exec_seq
),
2218 ADD_TABLE(property
),
2219 ADD_TABLE(registry
),
2220 ADD_TABLE(service_install
),
2221 ADD_TABLE(service_control
)
2224 static const msi_table up5_tables
[] =
2226 ADD_TABLE(component
),
2227 ADD_TABLE(directory
),
2229 ADD_TABLE(feature_comp
),
2231 ADD_TABLE(pp_install_exec_seq
),
2233 ADD_TABLE(up_property
),
2234 ADD_TABLE(registry
),
2235 ADD_TABLE(service_install
),
2236 ADD_TABLE(service_control
)
2239 static const msi_table up6_tables
[] =
2241 ADD_TABLE(component
),
2242 ADD_TABLE(directory
),
2244 ADD_TABLE(feature_comp
),
2246 ADD_TABLE(pp_install_exec_seq
),
2248 ADD_TABLE(up2_property
),
2249 ADD_TABLE(registry
),
2250 ADD_TABLE(service_install
),
2251 ADD_TABLE(service_control
)
2254 static const msi_table up7_tables
[] =
2256 ADD_TABLE(component
),
2257 ADD_TABLE(directory
),
2259 ADD_TABLE(feature_comp
),
2261 ADD_TABLE(pp_install_exec_seq
),
2263 ADD_TABLE(up3_property
),
2264 ADD_TABLE(registry
),
2265 ADD_TABLE(service_install
),
2266 ADD_TABLE(service_control
)
2269 static const msi_table cc_tables
[] =
2271 ADD_TABLE(cc_component
),
2272 ADD_TABLE(directory
),
2273 ADD_TABLE(cc_feature
),
2274 ADD_TABLE(cc_feature_comp
),
2276 ADD_TABLE(install_exec_seq
),
2277 ADD_TABLE(cc_media
),
2278 ADD_TABLE(property
),
2281 static const msi_table cc2_tables
[] =
2283 ADD_TABLE(cc2_component
),
2284 ADD_TABLE(directory
),
2285 ADD_TABLE(cc_feature
),
2286 ADD_TABLE(cc_feature_comp
),
2287 ADD_TABLE(cc2_file
),
2288 ADD_TABLE(install_exec_seq
),
2289 ADD_TABLE(cc_media
),
2290 ADD_TABLE(property
),
2293 static const msi_table co_tables
[] =
2295 ADD_TABLE(cc_component
),
2296 ADD_TABLE(directory
),
2297 ADD_TABLE(cc_feature
),
2298 ADD_TABLE(cc_feature_comp
),
2300 ADD_TABLE(install_exec_seq
),
2301 ADD_TABLE(co_media
),
2302 ADD_TABLE(property
),
2305 static const msi_table co2_tables
[] =
2307 ADD_TABLE(cc_component
),
2308 ADD_TABLE(directory
),
2309 ADD_TABLE(cc_feature
),
2310 ADD_TABLE(cc_feature_comp
),
2312 ADD_TABLE(install_exec_seq
),
2313 ADD_TABLE(co2_media
),
2314 ADD_TABLE(property
),
2317 static const msi_table mm_tables
[] =
2319 ADD_TABLE(cc_component
),
2320 ADD_TABLE(directory
),
2321 ADD_TABLE(cc_feature
),
2322 ADD_TABLE(cc_feature_comp
),
2324 ADD_TABLE(install_exec_seq
),
2325 ADD_TABLE(mm_media
),
2326 ADD_TABLE(property
),
2329 static const msi_table ss_tables
[] =
2331 ADD_TABLE(cc_component
),
2332 ADD_TABLE(directory
),
2333 ADD_TABLE(cc_feature
),
2334 ADD_TABLE(cc_feature_comp
),
2336 ADD_TABLE(install_exec_seq
),
2337 ADD_TABLE(ss_media
),
2338 ADD_TABLE(property
),
2341 static const msi_table ui_tables
[] =
2343 ADD_TABLE(ui_component
),
2344 ADD_TABLE(directory
),
2345 ADD_TABLE(cc_feature
),
2346 ADD_TABLE(cc_feature_comp
),
2348 ADD_TABLE(install_exec_seq
),
2349 ADD_TABLE(ui_install_ui_seq
),
2350 ADD_TABLE(ui_custom_action
),
2351 ADD_TABLE(cc_media
),
2352 ADD_TABLE(property
),
2355 static const msi_table rof_tables
[] =
2357 ADD_TABLE(rof_component
),
2358 ADD_TABLE(directory
),
2359 ADD_TABLE(rof_feature
),
2360 ADD_TABLE(rof_feature_comp
),
2361 ADD_TABLE(rof_file
),
2362 ADD_TABLE(install_exec_seq
),
2363 ADD_TABLE(rof_media
),
2364 ADD_TABLE(property
),
2367 static const msi_table rofc_tables
[] =
2369 ADD_TABLE(rof_component
),
2370 ADD_TABLE(directory
),
2371 ADD_TABLE(rof_feature
),
2372 ADD_TABLE(rof_feature_comp
),
2373 ADD_TABLE(rofc_file
),
2374 ADD_TABLE(install_exec_seq
),
2375 ADD_TABLE(rofc_media
),
2376 ADD_TABLE(property
),
2379 static const msi_table sdp_tables
[] =
2381 ADD_TABLE(rof_component
),
2382 ADD_TABLE(directory
),
2383 ADD_TABLE(rof_feature
),
2384 ADD_TABLE(rof_feature_comp
),
2385 ADD_TABLE(rof_file
),
2386 ADD_TABLE(sdp_install_exec_seq
),
2387 ADD_TABLE(sdp_custom_action
),
2388 ADD_TABLE(rof_media
),
2389 ADD_TABLE(property
),
2392 static const msi_table cie_tables
[] =
2394 ADD_TABLE(cie_component
),
2395 ADD_TABLE(directory
),
2396 ADD_TABLE(cc_feature
),
2397 ADD_TABLE(cie_feature_comp
),
2398 ADD_TABLE(cie_file
),
2399 ADD_TABLE(install_exec_seq
),
2400 ADD_TABLE(cie_media
),
2401 ADD_TABLE(property
),
2404 static const msi_table ci_tables
[] =
2406 ADD_TABLE(ci_component
),
2407 ADD_TABLE(directory
),
2408 ADD_TABLE(rof_feature
),
2409 ADD_TABLE(rof_feature_comp
),
2410 ADD_TABLE(rof_file
),
2411 ADD_TABLE(ci_install_exec_seq
),
2412 ADD_TABLE(rof_media
),
2413 ADD_TABLE(property
),
2414 ADD_TABLE(ci_custom_action
),
2417 static const msi_table ci2_tables
[] =
2419 ADD_TABLE(ci2_component
),
2420 ADD_TABLE(directory
),
2421 ADD_TABLE(rof_feature
),
2422 ADD_TABLE(ci2_feature_comp
),
2423 ADD_TABLE(ci2_file
),
2424 ADD_TABLE(install_exec_seq
),
2425 ADD_TABLE(rof_media
),
2426 ADD_TABLE(property
),
2429 static const msi_table spf_tables
[] =
2431 ADD_TABLE(ci_component
),
2432 ADD_TABLE(directory
),
2433 ADD_TABLE(rof_feature
),
2434 ADD_TABLE(rof_feature_comp
),
2435 ADD_TABLE(rof_file
),
2436 ADD_TABLE(spf_install_exec_seq
),
2437 ADD_TABLE(rof_media
),
2438 ADD_TABLE(property
),
2439 ADD_TABLE(spf_custom_action
),
2440 ADD_TABLE(spf_install_ui_seq
),
2443 static const msi_table pp_tables
[] =
2445 ADD_TABLE(ci_component
),
2446 ADD_TABLE(directory
),
2447 ADD_TABLE(rof_feature
),
2448 ADD_TABLE(rof_feature_comp
),
2449 ADD_TABLE(rof_file
),
2450 ADD_TABLE(pp_install_exec_seq
),
2451 ADD_TABLE(rof_media
),
2452 ADD_TABLE(property
),
2455 static const msi_table ppc_tables
[] =
2457 ADD_TABLE(ppc_component
),
2458 ADD_TABLE(directory
),
2459 ADD_TABLE(rof_feature
),
2460 ADD_TABLE(ppc_feature_comp
),
2461 ADD_TABLE(ppc_file
),
2462 ADD_TABLE(pp_install_exec_seq
),
2463 ADD_TABLE(ppc_media
),
2464 ADD_TABLE(property
),
2467 static const msi_table lus0_tables
[] =
2469 ADD_TABLE(ci_component
),
2470 ADD_TABLE(directory
),
2471 ADD_TABLE(rof_feature
),
2472 ADD_TABLE(rof_feature_comp
),
2473 ADD_TABLE(rof_file
),
2474 ADD_TABLE(pp_install_exec_seq
),
2475 ADD_TABLE(rof_media
),
2476 ADD_TABLE(property
),
2479 static const msi_table lus1_tables
[] =
2481 ADD_TABLE(ci_component
),
2482 ADD_TABLE(directory
),
2483 ADD_TABLE(rof_feature
),
2484 ADD_TABLE(rof_feature_comp
),
2485 ADD_TABLE(rof_file
),
2486 ADD_TABLE(pp_install_exec_seq
),
2487 ADD_TABLE(rofc_media
),
2488 ADD_TABLE(property
),
2491 static const msi_table lus2_tables
[] =
2493 ADD_TABLE(ci_component
),
2494 ADD_TABLE(directory
),
2495 ADD_TABLE(rof_feature
),
2496 ADD_TABLE(rof_feature_comp
),
2497 ADD_TABLE(rof_file
),
2498 ADD_TABLE(pp_install_exec_seq
),
2499 ADD_TABLE(lus2_media
),
2500 ADD_TABLE(property
),
2503 static const msi_table tp_tables
[] =
2505 ADD_TABLE(tp_component
),
2506 ADD_TABLE(directory
),
2507 ADD_TABLE(rof_feature
),
2508 ADD_TABLE(ci2_feature_comp
),
2509 ADD_TABLE(ci2_file
),
2510 ADD_TABLE(install_exec_seq
),
2511 ADD_TABLE(rof_media
),
2512 ADD_TABLE(property
),
2515 static const msi_table cwd_tables
[] =
2517 ADD_TABLE(cwd_component
),
2518 ADD_TABLE(directory
),
2519 ADD_TABLE(rof_feature
),
2520 ADD_TABLE(ci2_feature_comp
),
2521 ADD_TABLE(ci2_file
),
2522 ADD_TABLE(install_exec_seq
),
2523 ADD_TABLE(rof_media
),
2524 ADD_TABLE(property
),
2527 static const msi_table adm_tables
[] =
2529 ADD_TABLE(adm_component
),
2530 ADD_TABLE(directory
),
2531 ADD_TABLE(rof_feature
),
2532 ADD_TABLE(ci2_feature_comp
),
2533 ADD_TABLE(ci2_file
),
2534 ADD_TABLE(install_exec_seq
),
2535 ADD_TABLE(rof_media
),
2536 ADD_TABLE(property
),
2537 ADD_TABLE(adm_custom_action
),
2538 ADD_TABLE(adm_admin_exec_seq
),
2541 static const msi_table amp_tables
[] =
2543 ADD_TABLE(amp_component
),
2544 ADD_TABLE(directory
),
2545 ADD_TABLE(rof_feature
),
2546 ADD_TABLE(ci2_feature_comp
),
2547 ADD_TABLE(ci2_file
),
2548 ADD_TABLE(install_exec_seq
),
2549 ADD_TABLE(rof_media
),
2550 ADD_TABLE(property
),
2553 static const msi_table rem_tables
[] =
2555 ADD_TABLE(rem_component
),
2556 ADD_TABLE(directory
),
2557 ADD_TABLE(rof_feature
),
2558 ADD_TABLE(rem_feature_comp
),
2559 ADD_TABLE(rem_file
),
2560 ADD_TABLE(rem_install_exec_seq
),
2561 ADD_TABLE(rof_media
),
2562 ADD_TABLE(property
),
2563 ADD_TABLE(rem_remove_files
),
2566 static const msi_table mov_tables
[] =
2568 ADD_TABLE(cwd_component
),
2569 ADD_TABLE(directory
),
2570 ADD_TABLE(rof_feature
),
2571 ADD_TABLE(ci2_feature_comp
),
2572 ADD_TABLE(ci2_file
),
2573 ADD_TABLE(install_exec_seq
),
2574 ADD_TABLE(rof_media
),
2575 ADD_TABLE(property
),
2576 ADD_TABLE(mov_move_file
),
2579 static const msi_table mc_tables
[] =
2581 ADD_TABLE(mc_component
),
2582 ADD_TABLE(directory
),
2583 ADD_TABLE(cc_feature
),
2584 ADD_TABLE(cie_feature_comp
),
2586 ADD_TABLE(install_exec_seq
),
2587 ADD_TABLE(mc_media
),
2588 ADD_TABLE(property
),
2589 ADD_TABLE(mc_file_hash
),
2592 static const msi_table df_tables
[] =
2594 ADD_TABLE(rof_component
),
2595 ADD_TABLE(df_directory
),
2596 ADD_TABLE(rof_feature
),
2597 ADD_TABLE(rof_feature_comp
),
2598 ADD_TABLE(rof_file
),
2599 ADD_TABLE(install_exec_seq
),
2600 ADD_TABLE(rof_media
),
2601 ADD_TABLE(property
),
2602 ADD_TABLE(df_duplicate_file
),
2605 static const msi_table wrv_tables
[] =
2607 ADD_TABLE(wrv_component
),
2608 ADD_TABLE(directory
),
2609 ADD_TABLE(rof_feature
),
2610 ADD_TABLE(ci2_feature_comp
),
2611 ADD_TABLE(ci2_file
),
2612 ADD_TABLE(install_exec_seq
),
2613 ADD_TABLE(rof_media
),
2614 ADD_TABLE(property
),
2615 ADD_TABLE(wrv_registry
),
2618 static const msi_table sf_tables
[] =
2620 ADD_TABLE(wrv_component
),
2621 ADD_TABLE(directory
),
2622 ADD_TABLE(rof_feature
),
2623 ADD_TABLE(ci2_feature_comp
),
2624 ADD_TABLE(ci2_file
),
2625 ADD_TABLE(install_exec_seq
),
2626 ADD_TABLE(rof_media
),
2627 ADD_TABLE(property
),
2630 static const msi_table ca51_tables
[] =
2632 ADD_TABLE(ca51_component
),
2633 ADD_TABLE(directory
),
2634 ADD_TABLE(rof_feature
),
2635 ADD_TABLE(ci2_feature_comp
),
2636 ADD_TABLE(ci2_file
),
2637 ADD_TABLE(ca51_install_exec_seq
),
2638 ADD_TABLE(rof_media
),
2639 ADD_TABLE(property
),
2640 ADD_TABLE(ca51_custom_action
),
2643 static const msi_table is_tables
[] =
2645 ADD_TABLE(is_component
),
2646 ADD_TABLE(directory
),
2647 ADD_TABLE(is_feature
),
2648 ADD_TABLE(is_feature_comp
),
2650 ADD_TABLE(install_exec_seq
),
2651 ADD_TABLE(is_media
),
2652 ADD_TABLE(property
),
2655 static const msi_table sp_tables
[] =
2657 ADD_TABLE(sp_component
),
2658 ADD_TABLE(sp_directory
),
2659 ADD_TABLE(rof_feature
),
2660 ADD_TABLE(ci2_feature_comp
),
2661 ADD_TABLE(ci2_file
),
2662 ADD_TABLE(install_exec_seq
),
2663 ADD_TABLE(rof_media
),
2664 ADD_TABLE(property
),
2667 static const msi_table mcp_tables
[] =
2669 ADD_TABLE(mcp_component
),
2670 ADD_TABLE(directory
),
2671 ADD_TABLE(mcp_feature
),
2672 ADD_TABLE(mcp_feature_comp
),
2673 ADD_TABLE(rem_file
),
2674 ADD_TABLE(rem_install_exec_seq
),
2675 ADD_TABLE(rof_media
),
2676 ADD_TABLE(property
),
2679 static const msi_table mcomp_tables
[] =
2681 ADD_TABLE(mcp_component
),
2682 ADD_TABLE(directory
),
2683 ADD_TABLE(mcp_feature
),
2684 ADD_TABLE(mcp_feature_comp
),
2685 ADD_TABLE(mcomp_file
),
2686 ADD_TABLE(rem_install_exec_seq
),
2687 ADD_TABLE(rof_media
),
2688 ADD_TABLE(property
),
2691 static const msi_table ai_tables
[] =
2693 ADD_TABLE(component
),
2694 ADD_TABLE(directory
),
2696 ADD_TABLE(feature_comp
),
2698 ADD_TABLE(install_exec_seq
),
2703 static const msi_table pc_tables
[] =
2705 ADD_TABLE(ca51_component
),
2706 ADD_TABLE(directory
),
2707 ADD_TABLE(rof_feature
),
2708 ADD_TABLE(ci2_feature_comp
),
2709 ADD_TABLE(ci2_file
),
2710 ADD_TABLE(install_exec_seq
),
2711 ADD_TABLE(rof_media
),
2715 static const msi_table ip_tables
[] =
2717 ADD_TABLE(component
),
2718 ADD_TABLE(directory
),
2720 ADD_TABLE(feature_comp
),
2722 ADD_TABLE(ip_install_exec_seq
),
2723 ADD_TABLE(ip_custom_action
),
2728 static const msi_table aup_tables
[] =
2730 ADD_TABLE(component
),
2731 ADD_TABLE(directory
),
2733 ADD_TABLE(feature_comp
),
2735 ADD_TABLE(aup_install_exec_seq
),
2736 ADD_TABLE(aup_custom_action
),
2741 static const msi_table aup2_tables
[] =
2743 ADD_TABLE(component
),
2744 ADD_TABLE(directory
),
2746 ADD_TABLE(feature_comp
),
2748 ADD_TABLE(aup2_install_exec_seq
),
2749 ADD_TABLE(aup_custom_action
),
2751 ADD_TABLE(aup_property
)
2754 static const msi_table aup3_tables
[] =
2756 ADD_TABLE(component
),
2757 ADD_TABLE(directory
),
2759 ADD_TABLE(feature_comp
),
2761 ADD_TABLE(aup2_install_exec_seq
),
2762 ADD_TABLE(aup_custom_action
),
2764 ADD_TABLE(aup2_property
)
2767 static const msi_table aup4_tables
[] =
2769 ADD_TABLE(component
),
2770 ADD_TABLE(directory
),
2772 ADD_TABLE(feature_comp
),
2774 ADD_TABLE(aup3_install_exec_seq
),
2775 ADD_TABLE(aup_custom_action
),
2777 ADD_TABLE(aup2_property
)
2780 static const msi_table fiu_tables
[] =
2782 ADD_TABLE(rof_component
),
2783 ADD_TABLE(directory
),
2784 ADD_TABLE(rof_feature
),
2785 ADD_TABLE(rof_feature_comp
),
2786 ADD_TABLE(rof_file
),
2787 ADD_TABLE(pp_install_exec_seq
),
2788 ADD_TABLE(rof_media
),
2789 ADD_TABLE(property
),
2792 static const msi_table fiuc_tables
[] =
2794 ADD_TABLE(rof_component
),
2795 ADD_TABLE(directory
),
2796 ADD_TABLE(rof_feature
),
2797 ADD_TABLE(rof_feature_comp
),
2798 ADD_TABLE(rofc_file
),
2799 ADD_TABLE(pp_install_exec_seq
),
2800 ADD_TABLE(rofc_media
),
2801 ADD_TABLE(property
),
2804 static const msi_table cf_tables
[] =
2806 ADD_TABLE(component
),
2807 ADD_TABLE(directory
),
2809 ADD_TABLE(feature_comp
),
2811 ADD_TABLE(cf_create_folders
),
2812 ADD_TABLE(cf_install_exec_seq
),
2813 ADD_TABLE(cf_custom_action
),
2818 static const msi_table rf_tables
[] =
2820 ADD_TABLE(component
),
2821 ADD_TABLE(directory
),
2823 ADD_TABLE(feature_comp
),
2825 ADD_TABLE(cf_create_folders
),
2826 ADD_TABLE(rf_install_exec_seq
),
2827 ADD_TABLE(cf_custom_action
),
2832 static const msi_table sss_tables
[] =
2834 ADD_TABLE(component
),
2835 ADD_TABLE(directory
),
2837 ADD_TABLE(feature_comp
),
2839 ADD_TABLE(sss_install_exec_seq
),
2840 ADD_TABLE(sss_service_control
),
2845 static const msi_table sds_tables
[] =
2847 ADD_TABLE(component
),
2848 ADD_TABLE(directory
),
2850 ADD_TABLE(feature_comp
),
2852 ADD_TABLE(sds_install_exec_seq
),
2853 ADD_TABLE(service_control
),
2854 ADD_TABLE(service_install
),
2859 static const msi_table sr_tables
[] =
2861 ADD_TABLE(component
),
2862 ADD_TABLE(directory
),
2864 ADD_TABLE(feature_comp
),
2866 ADD_TABLE(sr_selfreg
),
2867 ADD_TABLE(sr_install_exec_seq
),
2872 static const msi_table font_tables
[] =
2874 ADD_TABLE(font_component
),
2875 ADD_TABLE(directory
),
2876 ADD_TABLE(font_feature
),
2877 ADD_TABLE(font_feature_comp
),
2878 ADD_TABLE(font_file
),
2880 ADD_TABLE(font_install_exec_seq
),
2881 ADD_TABLE(font_media
),
2885 static const msi_table vp_tables
[] =
2887 ADD_TABLE(component
),
2888 ADD_TABLE(directory
),
2890 ADD_TABLE(feature_comp
),
2892 ADD_TABLE(vp_custom_action
),
2893 ADD_TABLE(vp_install_exec_seq
),
2895 ADD_TABLE(vp_property
)
2898 static const msi_table odbc_tables
[] =
2900 ADD_TABLE(odbc_component
),
2901 ADD_TABLE(directory
),
2902 ADD_TABLE(odbc_feature
),
2903 ADD_TABLE(odbc_feature_comp
),
2904 ADD_TABLE(odbc_file
),
2905 ADD_TABLE(odbc_driver
),
2906 ADD_TABLE(odbc_translator
),
2907 ADD_TABLE(odbc_datasource
),
2908 ADD_TABLE(odbc_install_exec_seq
),
2909 ADD_TABLE(odbc_media
),
2913 static const msi_table tl_tables
[] =
2915 ADD_TABLE(tl_component
),
2916 ADD_TABLE(directory
),
2917 ADD_TABLE(tl_feature
),
2918 ADD_TABLE(tl_feature_comp
),
2920 ADD_TABLE(tl_typelib
),
2921 ADD_TABLE(tl_install_exec_seq
),
2926 static const msi_table crs_tables
[] =
2928 ADD_TABLE(crs_component
),
2929 ADD_TABLE(directory
),
2930 ADD_TABLE(crs_feature
),
2931 ADD_TABLE(crs_feature_comp
),
2932 ADD_TABLE(crs_file
),
2933 ADD_TABLE(crs_shortcut
),
2934 ADD_TABLE(crs_install_exec_seq
),
2939 static const msi_table pub_tables
[] =
2941 ADD_TABLE(directory
),
2942 ADD_TABLE(pub_component
),
2943 ADD_TABLE(pub_feature
),
2944 ADD_TABLE(pub_feature_comp
),
2945 ADD_TABLE(pub_file
),
2946 ADD_TABLE(pub_publish_component
),
2947 ADD_TABLE(pub_install_exec_seq
),
2952 static const msi_table rd_tables
[] =
2954 ADD_TABLE(directory
),
2955 ADD_TABLE(rd_component
),
2956 ADD_TABLE(rd_feature
),
2957 ADD_TABLE(rd_feature_comp
),
2959 ADD_TABLE(rd_duplicate_file
),
2960 ADD_TABLE(rd_install_exec_seq
),
2965 static const msi_table rrv_tables
[] =
2967 ADD_TABLE(directory
),
2968 ADD_TABLE(rrv_component
),
2969 ADD_TABLE(rrv_feature
),
2970 ADD_TABLE(rrv_feature_comp
),
2971 ADD_TABLE(rrv_file
),
2972 ADD_TABLE(rrv_registry
),
2973 ADD_TABLE(rrv_remove_registry
),
2974 ADD_TABLE(rrv_install_exec_seq
),
2979 static const msi_table frp_tables
[] =
2981 ADD_TABLE(directory
),
2982 ADD_TABLE(frp_component
),
2983 ADD_TABLE(frp_feature
),
2984 ADD_TABLE(frp_feature_comp
),
2985 ADD_TABLE(frp_file
),
2986 ADD_TABLE(frp_upgrade
),
2987 ADD_TABLE(frp_custom_action
),
2988 ADD_TABLE(frp_install_exec_seq
),
2993 static const msi_table riv_tables
[] =
2995 ADD_TABLE(directory
),
2996 ADD_TABLE(riv_component
),
2997 ADD_TABLE(riv_feature
),
2998 ADD_TABLE(riv_feature_comp
),
2999 ADD_TABLE(riv_file
),
3000 ADD_TABLE(riv_ini_file
),
3001 ADD_TABLE(riv_remove_ini_file
),
3002 ADD_TABLE(riv_install_exec_seq
),
3007 static const msi_table res_tables
[] =
3009 ADD_TABLE(directory
),
3010 ADD_TABLE(res_component
),
3011 ADD_TABLE(res_feature
),
3012 ADD_TABLE(res_feature_comp
),
3013 ADD_TABLE(res_file
),
3014 ADD_TABLE(res_environment
),
3015 ADD_TABLE(res_install_exec_seq
),
3020 static const msi_table rci_tables
[] =
3022 ADD_TABLE(directory
),
3023 ADD_TABLE(rci_component
),
3024 ADD_TABLE(rci_feature
),
3025 ADD_TABLE(rci_feature_comp
),
3026 ADD_TABLE(rci_file
),
3027 ADD_TABLE(rci_appid
),
3028 ADD_TABLE(rci_class
),
3029 ADD_TABLE(rci_install_exec_seq
),
3034 static const msi_table rei_tables
[] =
3036 ADD_TABLE(directory
),
3037 ADD_TABLE(rei_component
),
3038 ADD_TABLE(rei_feature
),
3039 ADD_TABLE(rei_feature_comp
),
3040 ADD_TABLE(rei_file
),
3041 ADD_TABLE(rei_extension
),
3042 ADD_TABLE(rei_verb
),
3043 ADD_TABLE(rei_progid
),
3044 ADD_TABLE(rei_install_exec_seq
),
3049 static const msi_table rmi_tables
[] =
3051 ADD_TABLE(directory
),
3052 ADD_TABLE(rmi_component
),
3053 ADD_TABLE(rmi_feature
),
3054 ADD_TABLE(rmi_feature_comp
),
3055 ADD_TABLE(rmi_file
),
3056 ADD_TABLE(rmi_extension
),
3057 ADD_TABLE(rmi_verb
),
3058 ADD_TABLE(rmi_mime
),
3059 ADD_TABLE(rmi_install_exec_seq
),
3064 static const msi_table sd_tables
[] =
3066 ADD_TABLE(directory
),
3067 ADD_TABLE(sd_component
),
3068 ADD_TABLE(sd_feature
),
3069 ADD_TABLE(sd_feature_comp
),
3071 ADD_TABLE(sd_install_exec_seq
),
3072 ADD_TABLE(sd_install_ui_seq
),
3073 ADD_TABLE(sd_custom_action
),
3078 static const msi_table fo_tables
[] =
3080 ADD_TABLE(directory
),
3082 ADD_TABLE(fo_component
),
3083 ADD_TABLE(fo_feature
),
3084 ADD_TABLE(fo_condition
),
3085 ADD_TABLE(fo_feature_comp
),
3086 ADD_TABLE(fo_custom_action
),
3087 ADD_TABLE(fo_install_exec_seq
),
3092 static const msi_table icon_base_tables
[] =
3094 ADD_TABLE(ci_component
),
3095 ADD_TABLE(directory
),
3096 ADD_TABLE(rof_feature
),
3097 ADD_TABLE(rof_feature_comp
),
3098 ADD_TABLE(rof_file
),
3099 ADD_TABLE(pp_install_exec_seq
),
3100 ADD_TABLE(rof_media
),
3101 ADD_TABLE(icon_property
),
3104 /* cabinet definitions */
3106 /* make the max size large so there is only one cab file */
3107 #define MEDIA_SIZE 0x7FFFFFFF
3108 #define FOLDER_THRESHOLD 900000
3110 /* the FCI callbacks */
3112 static void * CDECL
mem_alloc(ULONG cb
)
3114 return HeapAlloc(GetProcessHeap(), 0, cb
);
3117 static void CDECL
mem_free(void *memory
)
3119 HeapFree(GetProcessHeap(), 0, memory
);
3122 static BOOL CDECL
get_next_cabinet(PCCAB pccab
, ULONG cbPrevCab
, void *pv
)
3124 sprintf(pccab
->szCab
, pv
, pccab
->iCab
);
3128 static LONG CDECL
progress(UINT typeStatus
, ULONG cb1
, ULONG cb2
, void *pv
)
3133 static int CDECL
file_placed(PCCAB pccab
, char *pszFile
, LONG cbFile
,
3134 BOOL fContinuation
, void *pv
)
3139 static INT_PTR CDECL
fci_open(char *pszFile
, int oflag
, int pmode
, int *err
, void *pv
)
3143 DWORD dwShareMode
= 0;
3144 DWORD dwCreateDisposition
= OPEN_EXISTING
;
3146 dwAccess
= GENERIC_READ
| GENERIC_WRITE
;
3147 /* FILE_SHARE_DELETE is not supported by Windows Me/98/95 */
3148 dwShareMode
= FILE_SHARE_READ
| FILE_SHARE_WRITE
;
3150 if (GetFileAttributesA(pszFile
) != INVALID_FILE_ATTRIBUTES
)
3151 dwCreateDisposition
= OPEN_EXISTING
;
3153 dwCreateDisposition
= CREATE_NEW
;
3155 handle
= CreateFileA(pszFile
, dwAccess
, dwShareMode
, NULL
,
3156 dwCreateDisposition
, 0, NULL
);
3158 ok(handle
!= INVALID_HANDLE_VALUE
, "Failed to CreateFile %s\n", pszFile
);
3160 return (INT_PTR
)handle
;
3163 static UINT CDECL
fci_read(INT_PTR hf
, void *memory
, UINT cb
, int *err
, void *pv
)
3165 HANDLE handle
= (HANDLE
)hf
;
3169 res
= ReadFile(handle
, memory
, cb
, &dwRead
, NULL
);
3170 ok(res
, "Failed to ReadFile\n");
3175 static UINT CDECL
fci_write(INT_PTR hf
, void *memory
, UINT cb
, int *err
, void *pv
)
3177 HANDLE handle
= (HANDLE
)hf
;
3181 res
= WriteFile(handle
, memory
, cb
, &dwWritten
, NULL
);
3182 ok(res
, "Failed to WriteFile\n");
3187 static int CDECL
fci_close(INT_PTR hf
, int *err
, void *pv
)
3189 HANDLE handle
= (HANDLE
)hf
;
3190 ok(CloseHandle(handle
), "Failed to CloseHandle\n");
3195 static LONG CDECL
fci_seek(INT_PTR hf
, LONG dist
, int seektype
, int *err
, void *pv
)
3197 HANDLE handle
= (HANDLE
)hf
;
3200 ret
= SetFilePointer(handle
, dist
, NULL
, seektype
);
3201 ok(ret
!= INVALID_SET_FILE_POINTER
, "Failed to SetFilePointer\n");
3206 static int CDECL
fci_delete(char *pszFile
, int *err
, void *pv
)
3208 BOOL ret
= DeleteFileA(pszFile
);
3209 ok(ret
, "Failed to DeleteFile %s\n", pszFile
);
3214 static void init_functionpointers(void)
3216 HMODULE hmsi
= GetModuleHandleA("msi.dll");
3217 HMODULE hadvapi32
= GetModuleHandleA("advapi32.dll");
3218 HMODULE hkernel32
= GetModuleHandleA("kernel32.dll");
3220 #define GET_PROC(mod, func) \
3221 p ## func = (void*)GetProcAddress(mod, #func); \
3223 trace("GetProcAddress(%s) failed\n", #func);
3225 GET_PROC(hmsi
, MsiQueryComponentStateA
);
3226 GET_PROC(hmsi
, MsiSetExternalUIRecord
);
3227 GET_PROC(hmsi
, MsiSourceListEnumSourcesA
);
3228 GET_PROC(hmsi
, MsiSourceListGetInfoA
);
3230 GET_PROC(hadvapi32
, ConvertSidToStringSidA
);
3231 GET_PROC(hadvapi32
, GetTokenInformation
);
3232 GET_PROC(hadvapi32
, OpenProcessToken
);
3233 GET_PROC(hadvapi32
, RegDeleteKeyExA
)
3234 GET_PROC(hkernel32
, IsWow64Process
)
3236 hsrclient
= LoadLibraryA("srclient.dll");
3237 GET_PROC(hsrclient
, SRRemoveRestorePoint
);
3238 GET_PROC(hsrclient
, SRSetRestorePointA
);
3243 static BOOL
is_process_limited(void)
3247 if (!pOpenProcessToken
|| !pGetTokenInformation
) return FALSE
;
3249 if (pOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY
, &token
))
3252 TOKEN_ELEVATION_TYPE type
= TokenElevationTypeDefault
;
3255 ret
= pGetTokenInformation(token
, TokenElevationType
, &type
, sizeof(type
), &size
);
3257 return (ret
&& type
== TokenElevationTypeLimited
);
3262 static BOOL
check_win9x(void)
3266 scm
= OpenSCManager(NULL
, NULL
, GENERIC_ALL
);
3267 if (!scm
&& (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED
))
3270 CloseServiceHandle(scm
);
3275 static LPSTR
get_user_sid(LPSTR
*usersid
)
3282 if (!pConvertSidToStringSidA
)
3284 win_skip("ConvertSidToStringSidA is not available\n");
3289 OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY
, &token
);
3291 GetTokenInformation(token
, TokenUser
, buf
, size
, &size
);
3292 user
= (PTOKEN_USER
)buf
;
3293 pConvertSidToStringSidA(user
->User
.Sid
, usersid
);
3294 ok(*usersid
!= NULL
, "pConvertSidToStringSidA failed lre=%d\n", GetLastError());
3299 static BOOL
check_record(MSIHANDLE rec
, UINT field
, LPCSTR val
)
3306 r
= MsiRecordGetString(rec
, field
, buffer
, &sz
);
3307 return (r
== ERROR_SUCCESS
) && !strcmp(val
, buffer
);
3310 static BOOL CDECL
get_temp_file(char *pszTempName
, int cbTempName
, void *pv
)
3314 tempname
= HeapAlloc(GetProcessHeap(), 0, MAX_PATH
);
3315 GetTempFileNameA(".", "xx", 0, tempname
);
3317 if (tempname
&& (strlen(tempname
) < (unsigned)cbTempName
))
3319 lstrcpyA(pszTempName
, tempname
);
3320 HeapFree(GetProcessHeap(), 0, tempname
);
3324 HeapFree(GetProcessHeap(), 0, tempname
);
3329 static INT_PTR CDECL
get_open_info(char *pszName
, USHORT
*pdate
, USHORT
*ptime
,
3330 USHORT
*pattribs
, int *err
, void *pv
)
3332 BY_HANDLE_FILE_INFORMATION finfo
;
3338 handle
= CreateFile(pszName
, GENERIC_READ
, FILE_SHARE_READ
, NULL
,
3339 OPEN_EXISTING
, FILE_ATTRIBUTE_NORMAL
| FILE_FLAG_SEQUENTIAL_SCAN
, NULL
);
3341 ok(handle
!= INVALID_HANDLE_VALUE
, "Failed to CreateFile %s\n", pszName
);
3343 res
= GetFileInformationByHandle(handle
, &finfo
);
3344 ok(res
, "Expected GetFileInformationByHandle to succeed\n");
3346 FileTimeToLocalFileTime(&finfo
.ftLastWriteTime
, &filetime
);
3347 FileTimeToDosDateTime(&filetime
, pdate
, ptime
);
3349 attrs
= GetFileAttributes(pszName
);
3350 ok(attrs
!= INVALID_FILE_ATTRIBUTES
, "Failed to GetFileAttributes\n");
3352 return (INT_PTR
)handle
;
3355 static BOOL
add_file(HFCI hfci
, const char *file
, TCOMP compress
)
3357 char path
[MAX_PATH
];
3358 char filename
[MAX_PATH
];
3360 lstrcpyA(path
, CURR_DIR
);
3361 lstrcatA(path
, "\\");
3362 lstrcatA(path
, file
);
3364 lstrcpyA(filename
, file
);
3366 return FCIAddFile(hfci
, path
, filename
, FALSE
, get_next_cabinet
,
3367 progress
, get_open_info
, compress
);
3370 static void set_cab_parameters(PCCAB pCabParams
, const CHAR
*name
, DWORD max_size
)
3372 ZeroMemory(pCabParams
, sizeof(CCAB
));
3374 pCabParams
->cb
= max_size
;
3375 pCabParams
->cbFolderThresh
= FOLDER_THRESHOLD
;
3376 pCabParams
->setID
= 0xbeef;
3377 pCabParams
->iCab
= 1;
3378 lstrcpyA(pCabParams
->szCabPath
, CURR_DIR
);
3379 lstrcatA(pCabParams
->szCabPath
, "\\");
3380 lstrcpyA(pCabParams
->szCab
, name
);
3383 static void create_cab_file(const CHAR
*name
, DWORD max_size
, const CHAR
*files
)
3391 set_cab_parameters(&cabParams
, name
, max_size
);
3393 hfci
= FCICreate(&erf
, file_placed
, mem_alloc
, mem_free
, fci_open
,
3394 fci_read
, fci_write
, fci_close
, fci_seek
, fci_delete
,
3395 get_temp_file
, &cabParams
, NULL
);
3397 ok(hfci
!= NULL
, "Failed to create an FCI context\n");
3402 res
= add_file(hfci
, ptr
, tcompTYPE_MSZIP
);
3403 ok(res
, "Failed to add file: %s\n", ptr
);
3404 ptr
+= lstrlen(ptr
) + 1;
3407 res
= FCIFlushCabinet(hfci
, FALSE
, get_next_cabinet
, progress
);
3408 ok(res
, "Failed to flush the cabinet\n");
3410 res
= FCIDestroy(hfci
);
3411 ok(res
, "Failed to destroy the cabinet\n");
3414 static BOOL
get_user_dirs(void)
3419 if(RegOpenKey(HKEY_CURRENT_USER
,
3420 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
3425 if(RegQueryValueExA(hkey
, "AppData", 0, &type
, (LPBYTE
)APP_DATA_DIR
, &size
)){
3434 static BOOL
get_system_dirs(void)
3439 if (RegOpenKey(HKEY_LOCAL_MACHINE
,
3440 "Software\\Microsoft\\Windows\\CurrentVersion", &hkey
))
3444 if (RegQueryValueExA(hkey
, "ProgramFilesDir (x86)", 0, &type
, (LPBYTE
)PROG_FILES_DIR
, &size
) &&
3445 RegQueryValueExA(hkey
, "ProgramFilesDir", 0, &type
, (LPBYTE
)PROG_FILES_DIR
, &size
)) {
3451 if (RegQueryValueExA(hkey
, "CommonFilesDir", 0, &type
, (LPBYTE
)COMMON_FILES_DIR
, &size
)) {
3458 if(GetWindowsDirectoryA(WINDOWS_DIR
, MAX_PATH
) != ERROR_SUCCESS
)
3464 static void create_file_data(LPCSTR name
, LPCSTR data
, DWORD size
)
3469 file
= CreateFileA(name
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
, 0, NULL
);
3470 if (file
== INVALID_HANDLE_VALUE
)
3473 WriteFile(file
, data
, strlen(data
), &written
, NULL
);
3477 SetFilePointer(file
, size
, NULL
, FILE_BEGIN
);
3484 #define create_file(name, size) create_file_data(name, name, size)
3486 static void create_test_files(void)
3488 CreateDirectoryA("msitest", NULL
);
3489 create_file("msitest\\one.txt", 100);
3490 CreateDirectoryA("msitest\\first", NULL
);
3491 create_file("msitest\\first\\two.txt", 100);
3492 CreateDirectoryA("msitest\\second", NULL
);
3493 create_file("msitest\\second\\three.txt", 100);
3495 create_file("four.txt", 100);
3496 create_file("five.txt", 100);
3497 create_cab_file("msitest.cab", MEDIA_SIZE
, "four.txt\0five.txt\0");
3499 create_file("msitest\\filename", 100);
3500 create_file("msitest\\service.exe", 100);
3502 DeleteFileA("four.txt");
3503 DeleteFileA("five.txt");
3506 static BOOL
delete_pf(const CHAR
*rel_path
, BOOL is_file
)
3508 CHAR path
[MAX_PATH
];
3510 lstrcpyA(path
, PROG_FILES_DIR
);
3511 lstrcatA(path
, "\\");
3512 lstrcatA(path
, rel_path
);
3515 return DeleteFileA(path
);
3517 return RemoveDirectoryA(path
);
3520 static BOOL
delete_cf(const CHAR
*rel_path
, BOOL is_file
)
3522 CHAR path
[MAX_PATH
];
3524 lstrcpyA(path
, COMMON_FILES_DIR
);
3525 lstrcatA(path
, "\\");
3526 lstrcatA(path
, rel_path
);
3529 return DeleteFileA(path
);
3531 return RemoveDirectoryA(path
);
3534 static void delete_test_files(void)
3536 DeleteFileA("msitest.msi");
3537 DeleteFileA("msitest.cab");
3538 DeleteFileA("msitest\\second\\three.txt");
3539 DeleteFileA("msitest\\first\\two.txt");
3540 DeleteFileA("msitest\\one.txt");
3541 DeleteFileA("msitest\\service.exe");
3542 DeleteFileA("msitest\\filename");
3543 RemoveDirectoryA("msitest\\second");
3544 RemoveDirectoryA("msitest\\first");
3545 RemoveDirectoryA("msitest");
3548 static void write_file(const CHAR
*filename
, const char *data
, int data_size
)
3552 HANDLE hf
= CreateFile(filename
, GENERIC_WRITE
, 0, NULL
,
3553 CREATE_ALWAYS
, FILE_ATTRIBUTE_NORMAL
, NULL
);
3555 WriteFile(hf
, data
, data_size
, &size
, NULL
);
3559 static void write_msi_summary_info(MSIHANDLE db
, INT wordcount
)
3564 r
= MsiGetSummaryInformationA(db
, NULL
, 5, &summary
);
3565 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3567 r
= MsiSummaryInfoSetPropertyA(summary
, PID_TEMPLATE
, VT_LPSTR
, 0, NULL
, ";1033");
3568 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3570 r
= MsiSummaryInfoSetPropertyA(summary
, PID_REVNUMBER
, VT_LPSTR
, 0, NULL
,
3571 "{004757CA-5092-49c2-AD20-28E1CE0DF5F2}");
3572 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3574 r
= MsiSummaryInfoSetPropertyA(summary
, PID_PAGECOUNT
, VT_I4
, 100, NULL
, NULL
);
3575 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3577 r
= MsiSummaryInfoSetPropertyA(summary
, PID_WORDCOUNT
, VT_I4
, wordcount
, NULL
, NULL
);
3578 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3580 r
= MsiSummaryInfoSetPropertyA(summary
, PID_TITLE
, VT_LPSTR
, 0, NULL
, "MSITEST");
3581 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3583 /* write the summary changes back to the stream */
3584 r
= MsiSummaryInfoPersist(summary
);
3585 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3587 MsiCloseHandle(summary
);
3590 #define create_database(name, tables, num_tables) \
3591 create_database_wordcount(name, tables, num_tables, 0);
3593 static void create_database_wordcount(const CHAR
*name
, const msi_table
*tables
,
3594 int num_tables
, INT wordcount
)
3600 r
= MsiOpenDatabaseA(name
, MSIDBOPEN_CREATE
, &db
);
3601 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3603 /* import the tables into the database */
3604 for (j
= 0; j
< num_tables
; j
++)
3606 const msi_table
*table
= &tables
[j
];
3608 write_file(table
->filename
, table
->data
, (table
->size
- 1) * sizeof(char));
3610 r
= MsiDatabaseImportA(db
, CURR_DIR
, table
->filename
);
3611 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3613 DeleteFileA(table
->filename
);
3616 write_msi_summary_info(db
, wordcount
);
3618 r
= MsiDatabaseCommit(db
);
3619 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3624 static void check_service_is_installed(void)
3626 SC_HANDLE scm
, service
;
3629 scm
= OpenSCManager(NULL
, NULL
, SC_MANAGER_ALL_ACCESS
);
3630 ok(scm
!= NULL
, "Failed to open the SC Manager\n");
3632 service
= OpenService(scm
, "TestService", SC_MANAGER_ALL_ACCESS
);
3633 ok(service
!= NULL
, "Failed to open TestService\n");
3635 res
= DeleteService(service
);
3636 ok(res
, "Failed to delete TestService\n");
3638 CloseServiceHandle(service
);
3639 CloseServiceHandle(scm
);
3642 static BOOL
notify_system_change(DWORD event_type
, STATEMGRSTATUS
*status
)
3644 RESTOREPOINTINFOA spec
;
3646 spec
.dwEventType
= event_type
;
3647 spec
.dwRestorePtType
= APPLICATION_INSTALL
;
3648 spec
.llSequenceNumber
= status
->llSequenceNumber
;
3649 lstrcpyA(spec
.szDescription
, "msitest restore point");
3651 return pSRSetRestorePointA(&spec
, status
);
3654 static void remove_restore_point(DWORD seq_number
)
3658 res
= pSRRemoveRestorePoint(seq_number
);
3659 if (res
!= ERROR_SUCCESS
)
3660 trace("Failed to remove the restore point : %08x\n", res
);
3663 static LONG
delete_key( HKEY key
, LPCSTR subkey
, REGSAM access
)
3665 if (pRegDeleteKeyExA
)
3666 return pRegDeleteKeyExA( key
, subkey
, access
, 0 );
3667 return RegDeleteKeyA( key
, subkey
);
3670 static void test_MsiInstallProduct(void)
3673 CHAR path
[MAX_PATH
];
3676 DWORD num
, size
, type
;
3677 REGSAM access
= KEY_ALL_ACCESS
;
3682 win_skip("Services are not implemented on Win9x and WinMe\n");
3685 if (is_process_limited())
3687 skip("process is limited\n");
3691 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
3692 access
|= KEY_WOW64_64KEY
;
3694 /* szPackagePath is NULL */
3695 r
= MsiInstallProductA(NULL
, "INSTALL=ALL");
3696 ok(r
== ERROR_INVALID_PARAMETER
,
3697 "Expected ERROR_INVALID_PARAMETER, got %d\n", r
);
3699 /* both szPackagePath and szCommandLine are NULL */
3700 r
= MsiInstallProductA(NULL
, NULL
);
3701 ok(r
== ERROR_INVALID_PARAMETER
,
3702 "Expected ERROR_INVALID_PARAMETER, got %d\n", r
);
3704 /* szPackagePath is empty */
3705 r
= MsiInstallProductA("", "INSTALL=ALL");
3706 ok(r
== ERROR_PATH_NOT_FOUND
,
3707 "Expected ERROR_PATH_NOT_FOUND, got %d\n", r
);
3709 create_test_files();
3710 create_database(msifile
, tables
, sizeof(tables
) / sizeof(msi_table
));
3712 /* install, don't publish */
3713 r
= MsiInstallProductA(msifile
, NULL
);
3714 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
3716 skip("Not enough rights to perform tests\n");
3719 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3721 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3722 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3723 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3724 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3725 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3726 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3727 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3728 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3729 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3730 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3731 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3732 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3734 res
= RegOpenKeyEx(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", 0, access
, &hkey
);
3735 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3739 res
= RegQueryValueExA(hkey
, "Name", NULL
, &type
, (LPBYTE
)path
, &size
);
3740 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3741 ok(!lstrcmpA(path
, "imaname"), "Expected imaname, got %s\n", path
);
3745 res
= RegQueryValueExA(hkey
, "blah", NULL
, &type
, (LPBYTE
)path
, &size
);
3746 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
3750 res
= RegQueryValueExA(hkey
, "number", NULL
, &type
, (LPBYTE
)&num
, &size
);
3751 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3752 ok(num
== 314, "Expected 314, got %d\n", num
);
3756 res
= RegQueryValueExA(hkey
, "OrderTestName", NULL
, &type
, (LPBYTE
)path
, &size
);
3757 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3758 ok(!lstrcmpA(path
, "OrderTestValue"), "Expected OrderTestValue, got %s\n", path
);
3760 check_service_is_installed();
3762 delete_key(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", access
);
3764 /* not published, reinstall */
3765 r
= MsiInstallProductA(msifile
, NULL
);
3766 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3768 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3769 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3770 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3771 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3772 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3773 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3774 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3775 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3776 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3777 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3778 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3779 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3781 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3782 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3783 RegDeleteKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest");
3785 create_database(msifile
, up_tables
, sizeof(up_tables
) / sizeof(msi_table
));
3787 /* not published, RemovePreviousVersions set */
3788 r
= MsiInstallProductA(msifile
, NULL
);
3789 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3791 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3792 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3793 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3794 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3795 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3796 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3797 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3798 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3799 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3800 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3801 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3802 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3804 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3805 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3806 RegDeleteKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest");
3808 create_database(msifile
, up2_tables
, sizeof(up2_tables
) / sizeof(msi_table
));
3810 /* not published, version number bumped */
3811 r
= MsiInstallProductA(msifile
, NULL
);
3812 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3814 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3815 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3816 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3817 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3818 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3819 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3820 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3821 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3822 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3823 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3824 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3825 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3827 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3828 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3829 RegDeleteKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest");
3831 create_database(msifile
, up3_tables
, sizeof(up3_tables
) / sizeof(msi_table
));
3833 /* not published, RemovePreviousVersions set and version number bumped */
3834 r
= MsiInstallProductA(msifile
, NULL
);
3835 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3837 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3838 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3839 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3840 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3841 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3842 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3843 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3844 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3845 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3846 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3847 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3848 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3850 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3851 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
3852 RegDeleteKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest");
3854 create_database(msifile
, up4_tables
, sizeof(up4_tables
) / sizeof(msi_table
));
3856 /* install, publish product */
3857 r
= MsiInstallProductA(msifile
, "PUBLISH_PRODUCT=1");
3858 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3860 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3861 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3862 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3863 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3864 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3865 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3866 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3867 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3868 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3869 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3870 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3871 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3873 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3874 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
3876 create_database(msifile
, up4_tables
, sizeof(up4_tables
) / sizeof(msi_table
));
3878 /* published, reinstall */
3879 r
= MsiInstallProductA(msifile
, NULL
);
3880 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3882 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3883 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3884 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3885 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3886 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3887 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3888 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3889 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3890 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3891 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3892 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3893 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3895 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3896 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
3898 create_database(msifile
, up5_tables
, sizeof(up5_tables
) / sizeof(msi_table
));
3900 /* published product, RemovePreviousVersions set */
3901 r
= MsiInstallProductA(msifile
, NULL
);
3902 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3904 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3905 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3906 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3907 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3908 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3909 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3910 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3911 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3912 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3913 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3914 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3915 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3917 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3918 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
3920 create_database(msifile
, up6_tables
, sizeof(up6_tables
) / sizeof(msi_table
));
3922 /* published product, version number bumped */
3923 r
= MsiInstallProductA(msifile
, NULL
);
3924 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3926 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3927 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3928 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3929 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3930 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3931 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3932 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3933 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3934 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3935 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3936 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3937 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3939 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3940 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
3942 create_database(msifile
, up7_tables
, sizeof(up7_tables
) / sizeof(msi_table
));
3944 /* published product, RemovePreviousVersions set and version number bumped */
3945 r
= MsiInstallProductA(msifile
, NULL
);
3946 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3948 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
3949 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
3950 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
3951 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
3952 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
3953 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
3954 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
3955 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
3956 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
3957 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
3958 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
3959 ok(delete_pf("msitest", FALSE
), "File not installed\n");
3961 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest", &hkey
);
3962 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
3964 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
3965 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3968 delete_test_files();
3969 DeleteFileA(msifile
);
3972 static void test_MsiSetComponentState(void)
3974 INSTALLSTATE installed
, action
;
3976 char path
[MAX_PATH
];
3979 create_database(msifile
, tables
, sizeof(tables
) / sizeof(msi_table
));
3983 lstrcpy(path
, CURR_DIR
);
3984 lstrcat(path
, "\\");
3985 lstrcat(path
, msifile
);
3987 r
= MsiOpenPackage(path
, &package
);
3988 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
3990 skip("Not enough rights to perform tests\n");
3993 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3995 r
= MsiDoAction(package
, "CostInitialize");
3996 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
3998 r
= MsiDoAction(package
, "FileCost");
3999 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4001 r
= MsiDoAction(package
, "CostFinalize");
4002 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4004 r
= MsiGetComponentState(package
, "dangler", &installed
, &action
);
4005 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4006 ok(installed
== INSTALLSTATE_ABSENT
, "Expected INSTALLSTATE_ABSENT, got %d\n", installed
);
4007 ok(action
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action
);
4009 r
= MsiSetComponentState(package
, "dangler", INSTALLSTATE_SOURCE
);
4010 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4012 MsiCloseHandle(package
);
4016 DeleteFileA(msifile
);
4019 static void test_packagecoltypes(void)
4021 MSIHANDLE hdb
, view
, rec
;
4022 char path
[MAX_PATH
];
4026 create_database(msifile
, tables
, sizeof(tables
) / sizeof(msi_table
));
4030 lstrcpy(path
, CURR_DIR
);
4031 lstrcat(path
, "\\");
4032 lstrcat(path
, msifile
);
4034 r
= MsiOpenDatabase(path
, MSIDBOPEN_READONLY
, &hdb
);
4035 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4037 query
= "SELECT * FROM `Media`";
4038 r
= MsiDatabaseOpenView( hdb
, query
, &view
);
4039 ok(r
== ERROR_SUCCESS
, "MsiDatabaseOpenView failed\n");
4041 r
= MsiViewGetColumnInfo( view
, MSICOLINFO_NAMES
, &rec
);
4042 count
= MsiRecordGetFieldCount( rec
);
4043 ok(r
== ERROR_SUCCESS
, "MsiViewGetColumnInfo failed\n");
4044 ok(count
== 6, "Expected 6, got %d\n", count
);
4045 ok(check_record(rec
, 1, "DiskId"), "wrong column label\n");
4046 ok(check_record(rec
, 2, "LastSequence"), "wrong column label\n");
4047 ok(check_record(rec
, 3, "DiskPrompt"), "wrong column label\n");
4048 ok(check_record(rec
, 4, "Cabinet"), "wrong column label\n");
4049 ok(check_record(rec
, 5, "VolumeLabel"), "wrong column label\n");
4050 ok(check_record(rec
, 6, "Source"), "wrong column label\n");
4051 MsiCloseHandle(rec
);
4053 r
= MsiViewGetColumnInfo( view
, MSICOLINFO_TYPES
, &rec
);
4054 count
= MsiRecordGetFieldCount( rec
);
4055 ok(r
== ERROR_SUCCESS
, "MsiViewGetColumnInfo failed\n");
4056 ok(count
== 6, "Expected 6, got %d\n", count
);
4057 ok(check_record(rec
, 1, "i2"), "wrong column label\n");
4058 ok(check_record(rec
, 2, "i4"), "wrong column label\n");
4059 ok(check_record(rec
, 3, "L64"), "wrong column label\n");
4060 ok(check_record(rec
, 4, "S255"), "wrong column label\n");
4061 ok(check_record(rec
, 5, "S32"), "wrong column label\n");
4062 ok(check_record(rec
, 6, "S72"), "wrong column label\n");
4064 MsiCloseHandle(rec
);
4065 MsiCloseHandle(view
);
4066 MsiCloseHandle(hdb
);
4069 DeleteFile(msifile
);
4072 static void create_cc_test_files(void)
4077 static CHAR cab_context
[] = "test%d.cab";
4080 create_file("maximus", 500);
4081 create_file("augustus", 50000);
4082 create_file("tiberius", 500);
4083 create_file("caesar", 500);
4085 set_cab_parameters(&cabParams
, "test1.cab", 40000);
4087 hfci
= FCICreate(&erf
, file_placed
, mem_alloc
, mem_free
, fci_open
,
4088 fci_read
, fci_write
, fci_close
, fci_seek
, fci_delete
,
4089 get_temp_file
, &cabParams
, cab_context
);
4090 ok(hfci
!= NULL
, "Failed to create an FCI context\n");
4092 res
= add_file(hfci
, "maximus", tcompTYPE_NONE
);
4093 ok(res
, "Failed to add file maximus\n");
4095 res
= add_file(hfci
, "augustus", tcompTYPE_NONE
);
4096 ok(res
, "Failed to add file augustus\n");
4098 res
= add_file(hfci
, "tiberius", tcompTYPE_NONE
);
4099 ok(res
, "Failed to add file tiberius\n");
4101 res
= FCIFlushCabinet(hfci
, FALSE
, get_next_cabinet
, progress
);
4102 ok(res
, "Failed to flush the cabinet\n");
4104 res
= FCIDestroy(hfci
);
4105 ok(res
, "Failed to destroy the cabinet\n");
4107 create_cab_file("test3.cab", MEDIA_SIZE
, "caesar\0");
4109 DeleteFile("maximus");
4110 DeleteFile("augustus");
4111 DeleteFile("tiberius");
4112 DeleteFile("caesar");
4115 static void delete_cab_files(void)
4117 SHFILEOPSTRUCT shfl
;
4118 CHAR path
[MAX_PATH
+10];
4120 lstrcpyA(path
, CURR_DIR
);
4121 lstrcatA(path
, "\\*.cab");
4122 path
[strlen(path
) + 1] = '\0';
4125 shfl
.wFunc
= FO_DELETE
;
4128 shfl
.fFlags
= FOF_FILESONLY
| FOF_NOCONFIRMATION
| FOF_NORECURSION
| FOF_SILENT
;
4130 SHFileOperation(&shfl
);
4133 static void test_continuouscabs(void)
4137 if (is_process_limited())
4139 skip("process is limited\n");
4143 create_cc_test_files();
4144 create_database(msifile
, cc_tables
, sizeof(cc_tables
) / sizeof(msi_table
));
4146 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4148 r
= MsiInstallProductA(msifile
, NULL
);
4149 if (r
== ERROR_SUCCESS
) /* win9x has a problem with this */
4151 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4152 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
4153 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
4154 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4155 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4159 DeleteFile(msifile
);
4161 create_cc_test_files();
4162 create_database(msifile
, cc2_tables
, sizeof(cc2_tables
) / sizeof(msi_table
));
4164 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4166 r
= MsiInstallProductA(msifile
, NULL
);
4167 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4169 skip("Not enough rights to perform tests\n");
4172 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4173 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4174 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
4175 ok(delete_pf("msitest\\tiberius", TRUE
), "File not installed\n");
4176 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
4177 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4181 DeleteFile(msifile
);
4184 static void test_caborder(void)
4188 create_file("imperator", 100);
4189 create_file("maximus", 500);
4190 create_file("augustus", 50000);
4191 create_file("caesar", 500);
4193 create_database(msifile
, cc_tables
, sizeof(cc_tables
) / sizeof(msi_table
));
4195 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4197 create_cab_file("test1.cab", MEDIA_SIZE
, "maximus\0");
4198 create_cab_file("test2.cab", MEDIA_SIZE
, "augustus\0");
4199 create_cab_file("test3.cab", MEDIA_SIZE
, "caesar\0");
4201 r
= MsiInstallProductA(msifile
, NULL
);
4202 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4204 skip("Not enough rights to perform tests\n");
4207 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
4208 ok(!delete_pf("msitest\\augustus", TRUE
), "File is installed\n");
4209 ok(!delete_pf("msitest\\caesar", TRUE
), "File is installed\n");
4212 ok(!delete_pf("msitest\\maximus", TRUE
), "File is installed\n");
4213 ok(!delete_pf("msitest", FALSE
), "File is installed\n");
4218 create_cab_file("test1.cab", MEDIA_SIZE
, "imperator\0");
4219 create_cab_file("test2.cab", MEDIA_SIZE
, "maximus\0augustus\0");
4220 create_cab_file("test3.cab", MEDIA_SIZE
, "caesar\0");
4222 r
= MsiInstallProductA(msifile
, NULL
);
4223 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
4224 ok(!delete_pf("msitest\\maximus", TRUE
), "File is installed\n");
4225 ok(!delete_pf("msitest\\augustus", TRUE
), "File is installed\n");
4226 ok(!delete_pf("msitest\\caesar", TRUE
), "File is installed\n");
4227 ok(!delete_pf("msitest", FALSE
), "File is installed\n");
4230 DeleteFile(msifile
);
4232 create_cc_test_files();
4233 create_database(msifile
, co_tables
, sizeof(co_tables
) / sizeof(msi_table
));
4235 r
= MsiInstallProductA(msifile
, NULL
);
4236 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
4237 ok(!delete_pf("msitest\\caesar", TRUE
), "File is installed\n");
4238 ok(!delete_pf("msitest", FALSE
), "File is installed\n");
4241 ok(!delete_pf("msitest\\augustus", TRUE
), "File is installed\n");
4242 ok(!delete_pf("msitest\\maximus", TRUE
), "File is installed\n");
4246 DeleteFile(msifile
);
4248 create_cc_test_files();
4249 create_database(msifile
, co2_tables
, sizeof(co2_tables
) / sizeof(msi_table
));
4251 r
= MsiInstallProductA(msifile
, NULL
);
4252 ok(!delete_pf("msitest\\caesar", TRUE
), "File is installed\n");
4253 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
4256 ok(!delete_pf("msitest\\augustus", TRUE
), "File is installed\n");
4257 ok(!delete_pf("msitest\\maximus", TRUE
), "File is installed\n");
4258 ok(!delete_pf("msitest", FALSE
), "File is installed\n");
4263 DeleteFile("imperator");
4264 DeleteFile("maximus");
4265 DeleteFile("augustus");
4266 DeleteFile("caesar");
4267 DeleteFile(msifile
);
4270 static void test_mixedmedia(void)
4274 if (is_process_limited())
4276 skip("process is limited\n");
4280 CreateDirectoryA("msitest", NULL
);
4281 create_file("msitest\\maximus", 500);
4282 create_file("msitest\\augustus", 500);
4283 create_file("caesar", 500);
4285 create_database(msifile
, mm_tables
, sizeof(mm_tables
) / sizeof(msi_table
));
4287 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4289 create_cab_file("test1.cab", MEDIA_SIZE
, "caesar\0");
4291 r
= MsiInstallProductA(msifile
, NULL
);
4292 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4294 skip("Not enough rights to perform tests\n");
4297 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4298 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
4299 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
4300 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4301 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4304 /* Delete the files in the temp (current) folder */
4305 DeleteFile("msitest\\maximus");
4306 DeleteFile("msitest\\augustus");
4307 RemoveDirectory("msitest");
4308 DeleteFile("caesar");
4309 DeleteFile("test1.cab");
4310 DeleteFile(msifile
);
4313 static void test_samesequence(void)
4317 create_cc_test_files();
4318 create_database(msifile
, ss_tables
, sizeof(ss_tables
) / sizeof(msi_table
));
4320 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4322 r
= MsiInstallProductA(msifile
, NULL
);
4323 if (r
== ERROR_SUCCESS
) /* win9x has a problem with this */
4325 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4326 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
4327 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
4328 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4329 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4333 DeleteFile(msifile
);
4336 static void test_uiLevelFlags(void)
4340 create_cc_test_files();
4341 create_database(msifile
, ui_tables
, sizeof(ui_tables
) / sizeof(msi_table
));
4343 MsiSetInternalUI(INSTALLUILEVEL_NONE
| INSTALLUILEVEL_SOURCERESONLY
, NULL
);
4345 r
= MsiInstallProductA(msifile
, NULL
);
4346 if (r
== ERROR_SUCCESS
) /* win9x has a problem with this */
4348 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4349 ok(!delete_pf("msitest\\maximus", TRUE
), "UI install occurred, but execute-only was requested.\n");
4350 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
4351 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
4352 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4356 DeleteFile(msifile
);
4359 static BOOL
file_matches(LPSTR path
)
4365 file
= CreateFile(path
, GENERIC_READ
, FILE_SHARE_READ
| FILE_SHARE_WRITE
,
4366 NULL
, OPEN_EXISTING
, 0, NULL
);
4368 ZeroMemory(buf
, MAX_PATH
);
4369 ReadFile(file
, buf
, 15, &size
, NULL
);
4372 return !lstrcmp(buf
, "msitest\\maximus");
4375 static void test_readonlyfile(void)
4380 CHAR path
[MAX_PATH
];
4382 if (is_process_limited())
4384 skip("process is limited\n");
4388 CreateDirectoryA("msitest", NULL
);
4389 create_file("msitest\\maximus", 500);
4390 create_database(msifile
, rof_tables
, sizeof(rof_tables
) / sizeof(msi_table
));
4392 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4394 lstrcpy(path
, PROG_FILES_DIR
);
4395 lstrcat(path
, "\\msitest");
4396 CreateDirectory(path
, NULL
);
4398 lstrcat(path
, "\\maximus");
4399 file
= CreateFile(path
, GENERIC_READ
, FILE_SHARE_READ
| FILE_SHARE_WRITE
,
4400 NULL
, CREATE_NEW
, FILE_ATTRIBUTE_READONLY
, NULL
);
4402 WriteFile(file
, "readonlyfile", strlen("readonlyfile"), &size
, NULL
);
4405 r
= MsiInstallProductA(msifile
, NULL
);
4406 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4408 skip("Not enough rights to perform tests\n");
4411 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4412 ok(file_matches(path
), "Expected file to be overwritten\n");
4413 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4414 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4417 /* Delete the files in the temp (current) folder */
4418 DeleteFile("msitest\\maximus");
4419 RemoveDirectory("msitest");
4420 DeleteFile(msifile
);
4423 static void test_readonlyfile_cab(void)
4428 CHAR path
[MAX_PATH
];
4431 if (is_process_limited())
4433 skip("process is limited\n");
4437 CreateDirectoryA("msitest", NULL
);
4438 create_file("maximus", 500);
4439 create_cab_file("test1.cab", MEDIA_SIZE
, "maximus\0");
4440 DeleteFile("maximus");
4442 create_database(msifile
, rofc_tables
, sizeof(rofc_tables
) / sizeof(msi_table
));
4444 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4446 lstrcpy(path
, PROG_FILES_DIR
);
4447 lstrcat(path
, "\\msitest");
4448 CreateDirectory(path
, NULL
);
4450 lstrcat(path
, "\\maximus");
4451 file
= CreateFile(path
, GENERIC_READ
, FILE_SHARE_READ
| FILE_SHARE_WRITE
,
4452 NULL
, CREATE_NEW
, FILE_ATTRIBUTE_READONLY
, NULL
);
4454 WriteFile(file
, "readonlyfile", strlen("readonlyfile"), &size
, NULL
);
4457 r
= MsiInstallProductA(msifile
, NULL
);
4458 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4460 skip("Not enough rights to perform tests\n");
4463 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4465 memset( buf
, 0, sizeof(buf
) );
4466 if ((file
= CreateFile(path
, GENERIC_READ
, FILE_SHARE_READ
| FILE_SHARE_WRITE
,
4467 NULL
, OPEN_EXISTING
, 0, NULL
)) != INVALID_HANDLE_VALUE
)
4469 ReadFile(file
, buf
, sizeof(buf
) - 1, &size
, NULL
);
4472 ok(!memcmp( buf
, "maximus", sizeof("maximus")-1 ), "Expected file to be overwritten, got '%s'\n", buf
);
4473 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4474 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4477 /* Delete the files in the temp (current) folder */
4479 DeleteFile("msitest\\maximus");
4480 RemoveDirectory("msitest");
4481 DeleteFile(msifile
);
4484 static BOOL
add_cabinet_storage(LPCSTR db
, LPCSTR cabinet
)
4486 WCHAR dbW
[MAX_PATH
], cabinetW
[MAX_PATH
];
4492 MultiByteToWideChar(CP_ACP
, 0, db
, -1, dbW
, MAX_PATH
);
4493 hr
= StgOpenStorage(dbW
, NULL
, STGM_DIRECT
|STGM_READWRITE
|STGM_SHARE_EXCLUSIVE
, NULL
, 0, &stg
);
4497 MultiByteToWideChar(CP_ACP
, 0, cabinet
, -1, cabinetW
, MAX_PATH
);
4498 hr
= IStorage_CreateStream(stg
, cabinetW
, STGM_WRITE
|STGM_SHARE_EXCLUSIVE
, 0, 0, &stm
);
4501 IStorage_Release(stg
);
4505 handle
= CreateFileW(cabinetW
, GENERIC_READ
, 0, NULL
, OPEN_EXISTING
, 0, NULL
);
4506 if (handle
!= INVALID_HANDLE_VALUE
)
4510 if (ReadFile(handle
, buffer
, sizeof(buffer
), &count
, NULL
))
4511 IStream_Write(stm
, buffer
, count
, &count
);
4512 CloseHandle(handle
);
4515 IStream_Release(stm
);
4516 IStorage_Release(stg
);
4521 static void test_lastusedsource(void)
4523 static char prodcode
[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
4526 char value
[MAX_PATH
], path
[MAX_PATH
];
4529 if (!pMsiSourceListGetInfoA
)
4531 win_skip("MsiSourceListGetInfoA is not available\n");
4535 CreateDirectoryA("msitest", NULL
);
4536 create_file("maximus", 500);
4537 create_cab_file("test1.cab", MEDIA_SIZE
, "maximus\0");
4538 DeleteFile("maximus");
4540 create_database("msifile0.msi", lus0_tables
, sizeof(lus0_tables
) / sizeof(msi_table
));
4541 create_database("msifile1.msi", lus1_tables
, sizeof(lus1_tables
) / sizeof(msi_table
));
4542 create_database("msifile2.msi", lus2_tables
, sizeof(lus2_tables
) / sizeof(msi_table
));
4544 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4546 /* no cabinet file */
4549 lstrcpyA(value
, "aaa");
4550 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4551 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4552 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r
);
4553 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
4555 r
= MsiInstallProductA("msifile0.msi", "PUBLISH_PRODUCT=1");
4556 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4558 skip("Not enough rights to perform tests\n");
4561 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4563 lstrcpyA(path
, CURR_DIR
);
4564 lstrcatA(path
, "\\");
4567 lstrcpyA(value
, "aaa");
4568 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4569 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4570 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4573 ok(!lstrcmpA(value
, path
), "Expected \"%s\", got \"%s\"\n", path
, value
);
4574 ok(size
== lstrlenA(path
), "Expected %d, got %d\n", lstrlenA(path
), size
);
4577 r
= MsiInstallProductA("msifile0.msi", "REMOVE=ALL");
4578 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4580 /* separate cabinet file */
4583 lstrcpyA(value
, "aaa");
4584 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4585 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4586 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r
);
4587 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
4589 r
= MsiInstallProductA("msifile1.msi", "PUBLISH_PRODUCT=1");
4590 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4592 lstrcpyA(path
, CURR_DIR
);
4593 lstrcatA(path
, "\\");
4596 lstrcpyA(value
, "aaa");
4597 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4598 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4599 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4602 ok(!lstrcmpA(value
, path
), "Expected \"%s\", got \"%s\"\n", path
, value
);
4603 ok(size
== lstrlenA(path
), "Expected %d, got %d\n", lstrlenA(path
), size
);
4606 r
= MsiInstallProductA("msifile1.msi", "REMOVE=ALL");
4607 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4610 lstrcpyA(value
, "aaa");
4611 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4612 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4613 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r
);
4614 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
4616 /* embedded cabinet stream */
4618 add_cabinet_storage("msifile2.msi", "test1.cab");
4620 r
= MsiInstallProductA("msifile2.msi", "PUBLISH_PRODUCT=1");
4621 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4624 lstrcpyA(value
, "aaa");
4625 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4626 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4627 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4630 ok(!lstrcmpA(value
, path
), "Expected \"%s\", got \"%s\"\n", path
, value
);
4631 ok(size
== lstrlenA(path
), "Expected %d, got %d\n", lstrlenA(path
), size
);
4634 r
= MsiInstallProductA("msifile2.msi", "REMOVE=ALL");
4635 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4638 lstrcpyA(value
, "aaa");
4639 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
4640 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
4641 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r
);
4642 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
4645 /* Delete the files in the temp (current) folder */
4647 DeleteFile("msitest\\maximus");
4648 RemoveDirectory("msitest");
4649 DeleteFile("msifile0.msi");
4650 DeleteFile("msifile1.msi");
4651 DeleteFile("msifile2.msi");
4654 static void test_setdirproperty(void)
4658 if (is_process_limited())
4660 skip("process is limited\n");
4664 CreateDirectoryA("msitest", NULL
);
4665 create_file("msitest\\maximus", 500);
4666 create_database(msifile
, sdp_tables
, sizeof(sdp_tables
) / sizeof(msi_table
));
4668 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4670 r
= MsiInstallProductA(msifile
, NULL
);
4671 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4673 skip("Not enough rights to perform tests\n");
4676 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4677 ok(delete_cf("msitest\\maximus", TRUE
), "File not installed\n");
4678 ok(delete_cf("msitest", FALSE
), "File not installed\n");
4681 /* Delete the files in the temp (current) folder */
4682 DeleteFile(msifile
);
4683 DeleteFile("msitest\\maximus");
4684 RemoveDirectory("msitest");
4687 static void test_cabisextracted(void)
4691 if (is_process_limited())
4693 skip("process is limited\n");
4697 CreateDirectoryA("msitest", NULL
);
4698 create_file("msitest\\gaius", 500);
4699 create_file("maximus", 500);
4700 create_file("augustus", 500);
4701 create_file("caesar", 500);
4703 create_cab_file("test1.cab", MEDIA_SIZE
, "maximus\0");
4704 create_cab_file("test2.cab", MEDIA_SIZE
, "augustus\0");
4705 create_cab_file("test3.cab", MEDIA_SIZE
, "caesar\0");
4707 create_database(msifile
, cie_tables
, sizeof(cie_tables
) / sizeof(msi_table
));
4709 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
4711 r
= MsiInstallProductA(msifile
, NULL
);
4712 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4714 skip("Not enough rights to perform tests\n");
4717 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4718 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4719 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
4720 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
4721 ok(delete_pf("msitest\\gaius", TRUE
), "File not installed\n");
4722 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4725 /* Delete the files in the temp (current) folder */
4727 DeleteFile(msifile
);
4728 DeleteFile("maximus");
4729 DeleteFile("augustus");
4730 DeleteFile("caesar");
4731 DeleteFile("msitest\\gaius");
4732 RemoveDirectory("msitest");
4735 static void test_concurrentinstall(void)
4738 CHAR path
[MAX_PATH
];
4740 if (is_process_limited())
4742 skip("process is limited\n");
4746 CreateDirectoryA("msitest", NULL
);
4747 CreateDirectoryA("msitest\\msitest", NULL
);
4748 create_file("msitest\\maximus", 500);
4749 create_file("msitest\\msitest\\augustus", 500);
4751 create_database(msifile
, ci_tables
, sizeof(ci_tables
) / sizeof(msi_table
));
4753 lstrcpyA(path
, CURR_DIR
);
4754 lstrcatA(path
, "\\msitest\\concurrent.msi");
4755 create_database(path
, ci2_tables
, sizeof(ci2_tables
) / sizeof(msi_table
));
4757 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
4759 r
= MsiInstallProductA(msifile
, NULL
);
4760 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4762 skip("Not enough rights to perform tests\n");
4766 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4767 if (!delete_pf("msitest\\augustus", TRUE
))
4768 trace("concurrent installs not supported\n");
4769 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4770 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4774 r
= MsiInstallProductA(msifile
, NULL
);
4775 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4776 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4777 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
4778 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4781 DeleteFile(msifile
);
4782 DeleteFile("msitest\\msitest\\augustus");
4783 DeleteFile("msitest\\maximus");
4784 RemoveDirectory("msitest\\msitest");
4785 RemoveDirectory("msitest");
4788 static void test_setpropertyfolder(void)
4791 CHAR path
[MAX_PATH
];
4794 if (is_process_limited())
4796 skip("process is limited\n");
4800 lstrcpyA(path
, PROG_FILES_DIR
);
4801 lstrcatA(path
, "\\msitest\\added");
4803 CreateDirectoryA("msitest", NULL
);
4804 create_file("msitest\\maximus", 500);
4806 create_database(msifile
, spf_tables
, sizeof(spf_tables
) / sizeof(msi_table
));
4808 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
4810 r
= MsiInstallProductA(msifile
, NULL
);
4811 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
4813 skip("Not enough rights to perform tests\n");
4816 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
4817 attr
= GetFileAttributesA(path
);
4818 if (attr
!= INVALID_FILE_ATTRIBUTES
&& (attr
& FILE_ATTRIBUTE_DIRECTORY
))
4820 ok(delete_pf("msitest\\added\\maximus", TRUE
), "File not installed\n");
4821 ok(delete_pf("msitest\\added", FALSE
), "File not installed\n");
4822 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4826 trace("changing folder property not supported\n");
4827 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
4828 ok(delete_pf("msitest", FALSE
), "File not installed\n");
4832 /* Delete the files in the temp (current) folder */
4833 DeleteFile(msifile
);
4834 DeleteFile("msitest\\maximus");
4835 RemoveDirectory("msitest");
4838 static BOOL
file_exists(LPCSTR file
)
4840 return GetFileAttributes(file
) != INVALID_FILE_ATTRIBUTES
;
4843 static BOOL
pf_exists(LPCSTR file
)
4845 CHAR path
[MAX_PATH
];
4847 lstrcpyA(path
, PROG_FILES_DIR
);
4848 lstrcatA(path
, "\\");
4849 lstrcatA(path
, file
);
4851 return file_exists(path
);
4854 static void delete_pfmsitest_files(void)
4856 SHFILEOPSTRUCT shfl
;
4857 CHAR path
[MAX_PATH
+11];
4859 lstrcpyA(path
, PROG_FILES_DIR
);
4860 lstrcatA(path
, "\\msitest\\*");
4861 path
[strlen(path
) + 1] = '\0';
4864 shfl
.wFunc
= FO_DELETE
;
4867 shfl
.fFlags
= FOF_FILESONLY
| FOF_NOCONFIRMATION
| FOF_NORECURSION
| FOF_SILENT
;
4869 SHFileOperation(&shfl
);
4871 lstrcpyA(path
, PROG_FILES_DIR
);
4872 lstrcatA(path
, "\\msitest");
4873 RemoveDirectoryA(path
);
4876 static void check_reg_str(HKEY prodkey
, LPCSTR name
, LPCSTR expected
, BOOL bcase
, DWORD line
)
4884 res
= RegQueryValueExA(prodkey
, name
, NULL
, &type
, (LPBYTE
)val
, &size
);
4886 if (res
!= ERROR_SUCCESS
||
4887 (type
!= REG_SZ
&& type
!= REG_EXPAND_SZ
&& type
!= REG_MULTI_SZ
))
4889 ok_(__FILE__
, line
)(FALSE
, "Key doesn't exist or wrong type\n");
4894 ok_(__FILE__
, line
)(lstrlenA(val
) == 0, "Expected empty string, got %s\n", val
);
4898 ok_(__FILE__
, line
)(!lstrcmpA(val
, expected
), "Expected %s, got %s\n", expected
, val
);
4900 ok_(__FILE__
, line
)(!lstrcmpiA(val
, expected
), "Expected %s, got %s\n", expected
, val
);
4904 static void check_reg_dword(HKEY prodkey
, LPCSTR name
, DWORD expected
, DWORD line
)
4906 DWORD val
, size
, type
;
4909 size
= sizeof(DWORD
);
4910 res
= RegQueryValueExA(prodkey
, name
, NULL
, &type
, (LPBYTE
)&val
, &size
);
4912 if (res
!= ERROR_SUCCESS
|| type
!= REG_DWORD
)
4914 ok_(__FILE__
, line
)(FALSE
, "Key doesn't exist or wrong type\n");
4918 ok_(__FILE__
, line
)(val
== expected
, "Expected %d, got %d\n", expected
, val
);
4921 static void check_reg_dword2(HKEY prodkey
, LPCSTR name
, DWORD expected1
, DWORD expected2
, DWORD line
)
4923 DWORD val
, size
, type
;
4926 size
= sizeof(DWORD
);
4927 res
= RegQueryValueExA(prodkey
, name
, NULL
, &type
, (LPBYTE
)&val
, &size
);
4929 if (res
!= ERROR_SUCCESS
|| type
!= REG_DWORD
)
4931 ok_(__FILE__
, line
)(FALSE
, "Key doesn't exist or wrong type\n");
4935 ok_(__FILE__
, line
)(val
== expected1
|| val
== expected2
, "Expected %d or %d, got %d\n", expected1
, expected2
, val
);
4938 static void check_reg_dword3(HKEY prodkey
, LPCSTR name
, DWORD expected1
, DWORD expected2
, DWORD expected3
, DWORD line
)
4940 DWORD val
, size
, type
;
4943 size
= sizeof(DWORD
);
4944 res
= RegQueryValueExA(prodkey
, name
, NULL
, &type
, (LPBYTE
)&val
, &size
);
4946 if (res
!= ERROR_SUCCESS
|| type
!= REG_DWORD
)
4948 ok_(__FILE__
, line
)(FALSE
, "Key doesn't exist or wrong type\n");
4952 ok_(__FILE__
, line
)(val
== expected1
|| val
== expected2
|| val
== expected3
,
4953 "Expected %d, %d or %d, got %d\n", expected1
, expected2
, expected3
, val
);
4956 #define CHECK_REG_STR(prodkey, name, expected) \
4957 check_reg_str(prodkey, name, expected, TRUE, __LINE__);
4959 #define CHECK_DEL_REG_STR(prodkey, name, expected) \
4960 check_reg_str(prodkey, name, expected, TRUE, __LINE__); \
4961 RegDeleteValueA(prodkey, name);
4963 #define CHECK_REG_ISTR(prodkey, name, expected) \
4964 check_reg_str(prodkey, name, expected, FALSE, __LINE__);
4966 #define CHECK_DEL_REG_ISTR(prodkey, name, expected) \
4967 check_reg_str(prodkey, name, expected, FALSE, __LINE__); \
4968 RegDeleteValueA(prodkey, name);
4970 #define CHECK_REG_DWORD(prodkey, name, expected) \
4971 check_reg_dword(prodkey, name, expected, __LINE__);
4973 #define CHECK_DEL_REG_DWORD(prodkey, name, expected) \
4974 check_reg_dword(prodkey, name, expected, __LINE__); \
4975 RegDeleteValueA(prodkey, name);
4977 #define CHECK_REG_DWORD2(prodkey, name, expected1, expected2) \
4978 check_reg_dword2(prodkey, name, expected1, expected2, __LINE__);
4980 #define CHECK_DEL_REG_DWORD2(prodkey, name, expected1, expected2) \
4981 check_reg_dword2(prodkey, name, expected1, expected2, __LINE__); \
4982 RegDeleteValueA(prodkey, name);
4984 #define CHECK_REG_DWORD3(prodkey, name, expected1, expected2, expected3) \
4985 check_reg_dword3(prodkey, name, expected1, expected2, expected3, __LINE__);
4987 #define CHECK_DEL_REG_DWORD3(prodkey, name, expected1, expected2, expected3) \
4988 check_reg_dword3(prodkey, name, expected1, expected2, expected3, __LINE__); \
4989 RegDeleteValueA(prodkey, name);
4991 static void get_date_str(LPSTR date
)
4995 static const char date_fmt
[] = "%d%02d%02d";
4996 GetLocalTime(&systime
);
4997 sprintf(date
, date_fmt
, systime
.wYear
, systime
.wMonth
, systime
.wDay
);
5000 static void test_publish_registerproduct(void)
5007 char date
[MAX_PATH
];
5008 char temp
[MAX_PATH
];
5009 char keypath
[MAX_PATH
];
5010 REGSAM access
= KEY_ALL_ACCESS
;
5013 static const CHAR uninstall
[] = "Software\\Microsoft\\Windows\\CurrentVersion"
5014 "\\Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
5015 static const CHAR userdata
[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
5016 "\\UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5017 static const CHAR ugkey
[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
5018 "\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
5019 static const CHAR userugkey
[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
5020 "\\51AAE0C44620A5E4788506E91F249BD2";
5022 if (is_process_limited())
5024 skip("process is limited\n");
5028 if (!get_user_sid(&usersid
))
5032 GetTempPath(MAX_PATH
, temp
);
5034 CreateDirectoryA("msitest", NULL
);
5035 create_file("msitest\\maximus", 500);
5037 create_database(msifile
, pp_tables
, sizeof(pp_tables
) / sizeof(msi_table
));
5039 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5040 access
|= KEY_WOW64_64KEY
;
5042 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
5044 /* RegisterProduct */
5045 r
= MsiInstallProductA(msifile
, "REGISTER_PRODUCT=1");
5046 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
5048 skip("Not enough rights to perform tests\n");
5051 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5052 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5053 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5055 res
= RegOpenKeyA(HKEY_CURRENT_USER
, userugkey
, &hkey
);
5056 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5058 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, uninstall
, 0, access
, &hkey
);
5059 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5061 CHECK_DEL_REG_STR(hkey
, "DisplayName", "MSITEST");
5062 CHECK_DEL_REG_STR(hkey
, "DisplayVersion", "1.1.1");
5063 CHECK_DEL_REG_STR(hkey
, "InstallDate", date
);
5064 CHECK_DEL_REG_STR(hkey
, "InstallSource", temp
);
5065 CHECK_DEL_REG_ISTR(hkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5066 CHECK_DEL_REG_STR(hkey
, "Publisher", "Wine");
5067 CHECK_DEL_REG_STR(hkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5068 CHECK_DEL_REG_STR(hkey
, "AuthorizedCDFPrefix", NULL
);
5069 CHECK_DEL_REG_STR(hkey
, "Comments", NULL
);
5070 CHECK_DEL_REG_STR(hkey
, "Contact", NULL
);
5071 CHECK_DEL_REG_STR(hkey
, "HelpLink", NULL
);
5072 CHECK_DEL_REG_STR(hkey
, "HelpTelephone", NULL
);
5073 CHECK_DEL_REG_STR(hkey
, "InstallLocation", NULL
);
5074 CHECK_DEL_REG_STR(hkey
, "Readme", NULL
);
5075 CHECK_DEL_REG_STR(hkey
, "Size", NULL
);
5076 CHECK_DEL_REG_STR(hkey
, "URLInfoAbout", NULL
);
5077 CHECK_DEL_REG_STR(hkey
, "URLUpdateInfo", NULL
);
5078 CHECK_DEL_REG_DWORD(hkey
, "Language", 1033);
5079 CHECK_DEL_REG_DWORD(hkey
, "Version", 0x1010001);
5080 CHECK_DEL_REG_DWORD(hkey
, "VersionMajor", 1);
5081 CHECK_DEL_REG_DWORD(hkey
, "VersionMinor", 1);
5082 CHECK_DEL_REG_DWORD(hkey
, "WindowsInstaller", 1);
5085 CHECK_DEL_REG_DWORD3(hkey
, "EstimatedSize", 12, -12, 4);
5088 delete_key(hkey
, "", access
);
5091 sprintf(keypath
, userdata
, usersid
);
5092 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &hkey
);
5093 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5095 res
= RegOpenKeyExA(hkey
, "InstallProperties", 0, access
, &props
);
5096 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5098 RegDeleteValueA(props
, "LocalPackage"); /* LocalPackage is nondeterministic */
5099 CHECK_DEL_REG_STR(props
, "DisplayName", "MSITEST");
5100 CHECK_DEL_REG_STR(props
, "DisplayVersion", "1.1.1");
5101 CHECK_DEL_REG_STR(props
, "InstallDate", date
);
5102 CHECK_DEL_REG_STR(props
, "InstallSource", temp
);
5103 CHECK_DEL_REG_ISTR(props
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5104 CHECK_DEL_REG_STR(props
, "Publisher", "Wine");
5105 CHECK_DEL_REG_STR(props
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5106 CHECK_DEL_REG_STR(props
, "AuthorizedCDFPrefix", NULL
);
5107 CHECK_DEL_REG_STR(props
, "Comments", NULL
);
5108 CHECK_DEL_REG_STR(props
, "Contact", NULL
);
5109 CHECK_DEL_REG_STR(props
, "HelpLink", NULL
);
5110 CHECK_DEL_REG_STR(props
, "HelpTelephone", NULL
);
5111 CHECK_DEL_REG_STR(props
, "InstallLocation", NULL
);
5112 CHECK_DEL_REG_STR(props
, "Readme", NULL
);
5113 CHECK_DEL_REG_STR(props
, "Size", NULL
);
5114 CHECK_DEL_REG_STR(props
, "URLInfoAbout", NULL
);
5115 CHECK_DEL_REG_STR(props
, "URLUpdateInfo", NULL
);
5116 CHECK_DEL_REG_DWORD(props
, "Language", 1033);
5117 CHECK_DEL_REG_DWORD(props
, "Version", 0x1010001);
5118 CHECK_DEL_REG_DWORD(props
, "VersionMajor", 1);
5119 CHECK_DEL_REG_DWORD(props
, "VersionMinor", 1);
5120 CHECK_DEL_REG_DWORD(props
, "WindowsInstaller", 1);
5123 CHECK_DEL_REG_DWORD3(props
, "EstimatedSize", 12, -12, 4);
5126 delete_key(props
, "", access
);
5129 res
= RegOpenKeyExA(hkey
, "Usage", 0, access
, &usage
);
5132 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5135 delete_key(usage
, "", access
);
5137 delete_key(hkey
, "", access
);
5140 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, ugkey
, 0, access
, &hkey
);
5141 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5143 CHECK_DEL_REG_STR(hkey
, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL
);
5145 delete_key(hkey
, "", access
);
5148 /* RegisterProduct, machine */
5149 r
= MsiInstallProductA(msifile
, "REGISTER_PRODUCT=1 ALLUSERS=1");
5150 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5151 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5152 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5154 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, userugkey
, 0, access
, &hkey
);
5155 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5157 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, uninstall
, 0, access
, &hkey
);
5158 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5160 CHECK_DEL_REG_STR(hkey
, "DisplayName", "MSITEST");
5161 CHECK_DEL_REG_STR(hkey
, "DisplayVersion", "1.1.1");
5162 CHECK_DEL_REG_STR(hkey
, "InstallDate", date
);
5163 CHECK_DEL_REG_STR(hkey
, "InstallSource", temp
);
5164 CHECK_DEL_REG_ISTR(hkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5165 CHECK_DEL_REG_STR(hkey
, "Publisher", "Wine");
5166 CHECK_DEL_REG_STR(hkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5167 CHECK_DEL_REG_STR(hkey
, "AuthorizedCDFPrefix", NULL
);
5168 CHECK_DEL_REG_STR(hkey
, "Comments", NULL
);
5169 CHECK_DEL_REG_STR(hkey
, "Contact", NULL
);
5170 CHECK_DEL_REG_STR(hkey
, "HelpLink", NULL
);
5171 CHECK_DEL_REG_STR(hkey
, "HelpTelephone", NULL
);
5172 CHECK_DEL_REG_STR(hkey
, "InstallLocation", NULL
);
5173 CHECK_DEL_REG_STR(hkey
, "Readme", NULL
);
5174 CHECK_DEL_REG_STR(hkey
, "Size", NULL
);
5175 CHECK_DEL_REG_STR(hkey
, "URLInfoAbout", NULL
);
5176 CHECK_DEL_REG_STR(hkey
, "URLUpdateInfo", NULL
);
5177 CHECK_DEL_REG_DWORD(hkey
, "Language", 1033);
5178 CHECK_DEL_REG_DWORD(hkey
, "Version", 0x1010001);
5179 CHECK_DEL_REG_DWORD(hkey
, "VersionMajor", 1);
5180 CHECK_DEL_REG_DWORD(hkey
, "VersionMinor", 1);
5181 CHECK_DEL_REG_DWORD(hkey
, "WindowsInstaller", 1);
5184 CHECK_DEL_REG_DWORD3(hkey
, "EstimatedSize", 12, -12, 4);
5187 delete_key(hkey
, "", access
);
5190 sprintf(keypath
, userdata
, "S-1-5-18");
5191 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &hkey
);
5192 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5194 res
= RegOpenKeyExA(hkey
, "InstallProperties", 0, access
, &props
);
5195 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5197 RegDeleteValueA(props
, "LocalPackage"); /* LocalPackage is nondeterministic */
5198 CHECK_DEL_REG_STR(props
, "DisplayName", "MSITEST");
5199 CHECK_DEL_REG_STR(props
, "DisplayVersion", "1.1.1");
5200 CHECK_DEL_REG_STR(props
, "InstallDate", date
);
5201 CHECK_DEL_REG_STR(props
, "InstallSource", temp
);
5202 CHECK_DEL_REG_ISTR(props
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5203 CHECK_DEL_REG_STR(props
, "Publisher", "Wine");
5204 CHECK_DEL_REG_STR(props
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5205 CHECK_DEL_REG_STR(props
, "AuthorizedCDFPrefix", NULL
);
5206 CHECK_DEL_REG_STR(props
, "Comments", NULL
);
5207 CHECK_DEL_REG_STR(props
, "Contact", NULL
);
5208 CHECK_DEL_REG_STR(props
, "HelpLink", NULL
);
5209 CHECK_DEL_REG_STR(props
, "HelpTelephone", NULL
);
5210 CHECK_DEL_REG_STR(props
, "InstallLocation", NULL
);
5211 CHECK_DEL_REG_STR(props
, "Readme", NULL
);
5212 CHECK_DEL_REG_STR(props
, "Size", NULL
);
5213 CHECK_DEL_REG_STR(props
, "URLInfoAbout", NULL
);
5214 CHECK_DEL_REG_STR(props
, "URLUpdateInfo", NULL
);
5215 CHECK_DEL_REG_DWORD(props
, "Language", 1033);
5216 CHECK_DEL_REG_DWORD(props
, "Version", 0x1010001);
5217 CHECK_DEL_REG_DWORD(props
, "VersionMajor", 1);
5218 CHECK_DEL_REG_DWORD(props
, "VersionMinor", 1);
5219 CHECK_DEL_REG_DWORD(props
, "WindowsInstaller", 1);
5222 CHECK_DEL_REG_DWORD3(props
, "EstimatedSize", 12, -12, 4);
5225 delete_key(props
, "", access
);
5228 res
= RegOpenKeyExA(hkey
, "Usage", 0, access
, &usage
);
5231 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5234 delete_key(usage
, "", access
);
5236 delete_key(hkey
, "", access
);
5239 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, ugkey
, 0, access
, &hkey
);
5240 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5242 CHECK_DEL_REG_STR(hkey
, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL
);
5244 delete_key(hkey
, "", access
);
5248 DeleteFile(msifile
);
5249 DeleteFile("msitest\\maximus");
5250 RemoveDirectory("msitest");
5251 HeapFree(GetProcessHeap(), 0, usersid
);
5254 static void test_publish_publishproduct(void)
5259 HKEY sourcelist
, net
, props
;
5260 HKEY hkey
, patches
, media
;
5261 CHAR keypath
[MAX_PATH
];
5262 CHAR temp
[MAX_PATH
];
5263 CHAR path
[MAX_PATH
];
5264 BOOL wow64
, old_installer
= FALSE
;
5265 REGSAM access
= KEY_ALL_ACCESS
;
5267 static const CHAR prodpath
[] = "Software\\Microsoft\\Windows\\CurrentVersion"
5268 "\\Installer\\UserData\\%s\\Products"
5269 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5270 static const CHAR cuprodpath
[] = "Software\\Microsoft\\Installer\\Products"
5271 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5272 static const CHAR cuupgrades
[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
5273 "\\51AAE0C44620A5E4788506E91F249BD2";
5274 static const CHAR badprod
[] = "Software\\Microsoft\\Windows\\CurrentVersion"
5275 "\\Installer\\Products"
5276 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5277 static const CHAR machprod
[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5278 static const CHAR machup
[] = "Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
5280 if (is_process_limited())
5282 skip("process is limited\n");
5286 if (!get_user_sid(&usersid
))
5289 GetTempPath(MAX_PATH
, temp
);
5291 CreateDirectoryA("msitest", NULL
);
5292 create_file("msitest\\maximus", 500);
5294 create_database(msifile
, pp_tables
, sizeof(pp_tables
) / sizeof(msi_table
));
5296 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5297 access
|= KEY_WOW64_64KEY
;
5299 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
5301 /* PublishProduct, current user */
5302 r
= MsiInstallProductA(msifile
, "PUBLISH_PRODUCT=1");
5303 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
5305 skip("Not enough rights to perform tests\n");
5308 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5309 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5310 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5312 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, badprod
, 0, access
, &hkey
);
5313 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5315 sprintf(keypath
, prodpath
, usersid
);
5316 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &hkey
);
5317 if (res
== ERROR_FILE_NOT_FOUND
)
5319 res
= RegOpenKeyA(HKEY_CURRENT_USER
, cuprodpath
, &hkey
);
5320 if (res
== ERROR_SUCCESS
)
5322 win_skip("Windows Installer < 3.0 detected\n");
5324 old_installer
= TRUE
;
5329 win_skip("Install failed, no need to continue\n");
5333 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5335 res
= RegOpenKeyExA(hkey
, "InstallProperties", 0, access
, &props
);
5336 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5338 res
= RegOpenKeyExA(hkey
, "Patches", 0, access
, &patches
);
5341 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5342 CHECK_DEL_REG_STR(patches
, "AllPatches", NULL
);
5345 delete_key(patches
, "", access
);
5346 RegCloseKey(patches
);
5347 delete_key(hkey
, "", access
);
5351 res
= RegOpenKeyA(HKEY_CURRENT_USER
, cuprodpath
, &hkey
);
5352 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5354 CHECK_DEL_REG_STR(hkey
, "ProductName", "MSITEST");
5355 CHECK_DEL_REG_STR(hkey
, "PackageCode", "AC75740029052c94DA02821EECD05F2F");
5356 CHECK_DEL_REG_DWORD(hkey
, "Language", 1033);
5357 CHECK_DEL_REG_DWORD(hkey
, "Version", 0x1010001);
5359 CHECK_DEL_REG_DWORD(hkey
, "AuthorizedLUAApp", 0);
5360 CHECK_DEL_REG_DWORD(hkey
, "Assignment", 0);
5361 CHECK_DEL_REG_DWORD(hkey
, "AdvertiseFlags", 0x184);
5362 CHECK_DEL_REG_DWORD(hkey
, "InstanceType", 0);
5363 CHECK_DEL_REG_STR(hkey
, "Clients", ":");
5365 res
= RegOpenKeyA(hkey
, "SourceList", &sourcelist
);
5366 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5368 lstrcpyA(path
, "n;1;");
5369 lstrcatA(path
, temp
);
5370 CHECK_DEL_REG_STR(sourcelist
, "LastUsedSource", path
);
5371 CHECK_DEL_REG_STR(sourcelist
, "PackageName", "msitest.msi");
5373 res
= RegOpenKeyA(sourcelist
, "Net", &net
);
5374 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5376 CHECK_DEL_REG_STR(net
, "1", temp
);
5378 RegDeleteKeyA(net
, "");
5381 res
= RegOpenKeyA(sourcelist
, "Media", &media
);
5382 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5384 CHECK_DEL_REG_STR(media
, "1", "DISK1;");
5386 RegDeleteKeyA(media
, "");
5388 RegDeleteKeyA(sourcelist
, "");
5389 RegCloseKey(sourcelist
);
5390 RegDeleteKeyA(hkey
, "");
5393 res
= RegOpenKeyA(HKEY_CURRENT_USER
, cuupgrades
, &hkey
);
5394 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5396 CHECK_DEL_REG_STR(hkey
, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL
);
5398 RegDeleteKeyA(hkey
, "");
5401 /* PublishProduct, machine */
5402 r
= MsiInstallProductA(msifile
, "PUBLISH_PRODUCT=1 ALLUSERS=1");
5405 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5406 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5407 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5409 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, badprod
, 0, access
, &hkey
);
5410 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5412 sprintf(keypath
, prodpath
, "S-1-5-18");
5413 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &hkey
);
5414 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5416 res
= RegOpenKeyExA(hkey
, "InstallProperties", 0, access
, &props
);
5417 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5419 res
= RegOpenKeyExA(hkey
, "Patches", 0, access
, &patches
);
5422 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5423 CHECK_DEL_REG_STR(patches
, "AllPatches", NULL
);
5426 delete_key(patches
, "", access
);
5427 RegCloseKey(patches
);
5428 delete_key(hkey
, "", access
);
5432 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, machprod
, &hkey
);
5433 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5435 CHECK_DEL_REG_STR(hkey
, "ProductName", "MSITEST");
5436 CHECK_DEL_REG_STR(hkey
, "PackageCode", "AC75740029052c94DA02821EECD05F2F");
5437 CHECK_DEL_REG_DWORD(hkey
, "Language", 1033);
5438 CHECK_DEL_REG_DWORD(hkey
, "Version", 0x1010001);
5440 CHECK_DEL_REG_DWORD(hkey
, "AuthorizedLUAApp", 0);
5441 todo_wine
CHECK_DEL_REG_DWORD(hkey
, "Assignment", 1);
5442 CHECK_DEL_REG_DWORD(hkey
, "AdvertiseFlags", 0x184);
5443 CHECK_DEL_REG_DWORD(hkey
, "InstanceType", 0);
5444 CHECK_DEL_REG_STR(hkey
, "Clients", ":");
5446 res
= RegOpenKeyA(hkey
, "SourceList", &sourcelist
);
5447 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5449 lstrcpyA(path
, "n;1;");
5450 lstrcatA(path
, temp
);
5451 CHECK_DEL_REG_STR(sourcelist
, "LastUsedSource", path
);
5452 CHECK_DEL_REG_STR(sourcelist
, "PackageName", "msitest.msi");
5454 res
= RegOpenKeyA(sourcelist
, "Net", &net
);
5455 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5457 CHECK_DEL_REG_STR(net
, "1", temp
);
5459 RegDeleteKeyA(net
, "");
5462 res
= RegOpenKeyA(sourcelist
, "Media", &media
);
5463 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5465 CHECK_DEL_REG_STR(media
, "1", "DISK1;");
5467 RegDeleteKeyA(media
, "");
5469 RegDeleteKeyA(sourcelist
, "");
5470 RegCloseKey(sourcelist
);
5471 RegDeleteKeyA(hkey
, "");
5474 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, machup
, &hkey
);
5475 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5477 CHECK_DEL_REG_STR(hkey
, "84A88FD7F6998CE40A22FB59F6B9C2BB", NULL
);
5479 RegDeleteKeyA(hkey
, "");
5483 DeleteFile(msifile
);
5484 DeleteFile("msitest\\maximus");
5485 RemoveDirectory("msitest");
5486 HeapFree(GetProcessHeap(), 0, usersid
);
5489 static void test_publish_publishfeatures(void)
5495 CHAR keypath
[MAX_PATH
];
5496 REGSAM access
= KEY_ALL_ACCESS
;
5499 static const CHAR cupath
[] = "Software\\Microsoft\\Installer\\Features"
5500 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5501 static const CHAR udpath
[] = "Software\\Microsoft\\Windows\\CurrentVersion"
5502 "\\Installer\\UserData\\%s\\Products"
5503 "\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features";
5504 static const CHAR featkey
[] = "Software\\Microsoft\\Windows\\CurrentVersion"
5505 "\\Installer\\Features";
5506 static const CHAR classfeat
[] = "Software\\Classes\\Installer\\Features"
5507 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
5509 if (is_process_limited())
5511 skip("process is limited\n");
5515 if (!get_user_sid(&usersid
))
5518 CreateDirectoryA("msitest", NULL
);
5519 create_file("msitest\\maximus", 500);
5521 create_database(msifile
, pp_tables
, sizeof(pp_tables
) / sizeof(msi_table
));
5523 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5524 access
|= KEY_WOW64_64KEY
;
5526 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
5528 /* PublishFeatures, current user */
5529 r
= MsiInstallProductA(msifile
, "PUBLISH_FEATURES=1");
5530 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
5532 skip("Not enough rights to perform tests\n");
5535 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5536 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5537 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5539 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, featkey
, 0, access
, &hkey
);
5540 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5542 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, classfeat
, 0, access
, &hkey
);
5543 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5545 res
= RegOpenKeyA(HKEY_CURRENT_USER
, cupath
, &hkey
);
5546 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5548 CHECK_REG_STR(hkey
, "feature", "");
5549 CHECK_REG_STR(hkey
, "montecristo", "");
5551 RegDeleteValueA(hkey
, "feature");
5552 RegDeleteValueA(hkey
, "montecristo");
5553 RegDeleteKeyA(hkey
, "");
5556 sprintf(keypath
, udpath
, usersid
);
5557 res
= RegOpenKeyA(HKEY_LOCAL_MACHINE
, keypath
, &hkey
);
5558 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5560 CHECK_REG_STR(hkey
, "feature", "VGtfp^p+,?82@JU1j_KE");
5561 CHECK_REG_STR(hkey
, "montecristo", "VGtfp^p+,?82@JU1j_KE");
5563 RegDeleteValueA(hkey
, "feature");
5564 RegDeleteValueA(hkey
, "montecristo");
5565 RegDeleteKeyA(hkey
, "");
5568 /* PublishFeatures, machine */
5569 r
= MsiInstallProductA(msifile
, "PUBLISH_FEATURES=1 ALLUSERS=1");
5570 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5571 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5572 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5574 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, featkey
, 0, access
, &hkey
);
5575 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5577 res
= RegOpenKeyA(HKEY_CURRENT_USER
, cupath
, &hkey
);
5578 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5580 res
= RegOpenKeyA(HKEY_LOCAL_MACHINE
, classfeat
, &hkey
);
5581 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5583 CHECK_REG_STR(hkey
, "feature", "");
5584 CHECK_REG_STR(hkey
, "montecristo", "");
5586 RegDeleteValueA(hkey
, "feature");
5587 RegDeleteValueA(hkey
, "montecristo");
5588 RegDeleteKeyA(hkey
, "");
5591 sprintf(keypath
, udpath
, "S-1-5-18");
5592 res
= RegOpenKeyA(HKEY_LOCAL_MACHINE
, keypath
, &hkey
);
5593 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5595 CHECK_REG_STR(hkey
, "feature", "VGtfp^p+,?82@JU1j_KE");
5596 CHECK_REG_STR(hkey
, "montecristo", "VGtfp^p+,?82@JU1j_KE");
5598 RegDeleteValueA(hkey
, "feature");
5599 RegDeleteValueA(hkey
, "montecristo");
5600 RegDeleteKeyA(hkey
, "");
5604 DeleteFile(msifile
);
5605 DeleteFile("msitest\\maximus");
5606 RemoveDirectory("msitest");
5607 HeapFree(GetProcessHeap(), 0, usersid
);
5610 static LPSTR
reg_get_val_str(HKEY hkey
, LPCSTR name
)
5616 r
= RegQueryValueExA(hkey
, name
, NULL
, NULL
, NULL
, &len
);
5617 if (r
!= ERROR_SUCCESS
)
5620 len
+= sizeof (WCHAR
);
5621 val
= HeapAlloc(GetProcessHeap(), 0, len
);
5622 if (!val
) return NULL
;
5624 RegQueryValueExA(hkey
, name
, NULL
, NULL
, (LPBYTE
)val
, &len
);
5628 static void get_owner_company(LPSTR
*owner
, LPSTR
*company
)
5632 REGSAM access
= KEY_ALL_ACCESS
;
5635 *owner
= *company
= NULL
;
5637 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5638 access
|= KEY_WOW64_64KEY
;
5640 res
= RegOpenKeyA(HKEY_CURRENT_USER
,
5641 "Software\\Microsoft\\MS Setup (ACME)\\User Info", &hkey
);
5642 if (res
== ERROR_SUCCESS
)
5644 *owner
= reg_get_val_str(hkey
, "DefName");
5645 *company
= reg_get_val_str(hkey
, "DefCompany");
5649 if (!*owner
|| !*company
)
5651 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
,
5652 "Software\\Microsoft\\Windows\\CurrentVersion", 0, access
, &hkey
);
5653 if (res
== ERROR_SUCCESS
)
5655 *owner
= reg_get_val_str(hkey
, "RegisteredOwner");
5656 *company
= reg_get_val_str(hkey
, "RegisteredOrganization");
5661 if (!*owner
|| !*company
)
5663 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
,
5664 "Software\\Microsoft\\Windows NT\\CurrentVersion", 0, access
, &hkey
);
5665 if (res
== ERROR_SUCCESS
)
5667 *owner
= reg_get_val_str(hkey
, "RegisteredOwner");
5668 *company
= reg_get_val_str(hkey
, "RegisteredOrganization");
5674 static void test_publish_registeruser(void)
5680 LPSTR owner
, company
;
5681 CHAR keypath
[MAX_PATH
];
5682 REGSAM access
= KEY_ALL_ACCESS
;
5685 static const CHAR keyfmt
[] =
5686 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
5687 "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties";
5689 if (is_process_limited())
5691 skip("process is limited\n");
5695 if (!get_user_sid(&usersid
))
5698 get_owner_company(&owner
, &company
);
5700 CreateDirectoryA("msitest", NULL
);
5701 create_file("msitest\\maximus", 500);
5703 create_database(msifile
, pp_tables
, sizeof(pp_tables
) / sizeof(msi_table
));
5705 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5706 access
|= KEY_WOW64_64KEY
;
5708 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
5710 /* RegisterUser, per-user */
5711 r
= MsiInstallProductA(msifile
, "REGISTER_USER=1");
5712 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
5714 skip("Not enough rights to perform tests\n");
5717 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5718 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5719 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5721 sprintf(keypath
, keyfmt
, usersid
);
5722 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &props
);
5723 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5725 CHECK_REG_STR(props
, "ProductID", "none");
5726 CHECK_REG_STR(props
, "RegCompany", company
);
5727 CHECK_REG_STR(props
, "RegOwner", owner
);
5729 RegDeleteValueA(props
, "ProductID");
5730 RegDeleteValueA(props
, "RegCompany");
5731 RegDeleteValueA(props
, "RegOwner");
5732 delete_key(props
, "", access
);
5735 /* RegisterUser, machine */
5736 r
= MsiInstallProductA(msifile
, "REGISTER_USER=1 ALLUSERS=1");
5737 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5738 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5739 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5741 sprintf(keypath
, keyfmt
, "S-1-5-18");
5742 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &props
);
5743 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5745 CHECK_REG_STR(props
, "ProductID", "none");
5746 CHECK_REG_STR(props
, "RegCompany", company
);
5747 CHECK_REG_STR(props
, "RegOwner", owner
);
5749 RegDeleteValueA(props
, "ProductID");
5750 RegDeleteValueA(props
, "RegCompany");
5751 RegDeleteValueA(props
, "RegOwner");
5752 delete_key(props
, "", access
);
5756 HeapFree(GetProcessHeap(), 0, company
);
5757 HeapFree(GetProcessHeap(), 0, owner
);
5759 DeleteFile(msifile
);
5760 DeleteFile("msitest\\maximus");
5761 RemoveDirectory("msitest");
5765 static void test_publish_processcomponents(void)
5773 CHAR keypath
[MAX_PATH
];
5774 CHAR program_files_maximus
[MAX_PATH
];
5775 REGSAM access
= KEY_ALL_ACCESS
;
5778 static const CHAR keyfmt
[] =
5779 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
5780 "UserData\\%s\\Components\\%s";
5781 static const CHAR compkey
[] =
5782 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Components";
5784 if (is_process_limited())
5786 skip("process is limited\n");
5790 if (!get_user_sid(&usersid
))
5793 CreateDirectoryA("msitest", NULL
);
5794 create_file("msitest\\maximus", 500);
5796 create_database(msifile
, ppc_tables
, sizeof(ppc_tables
) / sizeof(msi_table
));
5798 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5799 access
|= KEY_WOW64_64KEY
;
5801 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
5803 /* ProcessComponents, per-user */
5804 r
= MsiInstallProductA(msifile
, "PROCESS_COMPONENTS=1");
5805 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
5807 skip("Not enough rights to perform tests\n");
5810 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5811 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5812 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5814 sprintf(keypath
, keyfmt
, usersid
, "CBABC2FDCCB35E749A8944D8C1C098B5");
5815 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &comp
);
5816 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5819 res
= RegQueryValueExA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB",
5820 NULL
, NULL
, (LPBYTE
)val
, &size
);
5821 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5823 lstrcpyA(program_files_maximus
,PROG_FILES_DIR
);
5824 lstrcatA(program_files_maximus
,"\\msitest\\maximus");
5826 ok(!lstrcmpiA(val
, program_files_maximus
),
5827 "Expected \"%s\", got \"%s\"\n", program_files_maximus
, val
);
5829 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, compkey
, 0, access
, &hkey
);
5830 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5832 RegDeleteValueA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB");
5833 delete_key(comp
, "", access
);
5836 sprintf(keypath
, keyfmt
, usersid
, "241C3DA58FECD0945B9687D408766058");
5837 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &comp
);
5838 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5841 res
= RegQueryValueExA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB",
5842 NULL
, NULL
, (LPBYTE
)val
, &size
);
5843 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5844 ok(!lstrcmpA(val
, "01\\msitest\\augustus"),
5845 "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val
);
5847 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, compkey
, 0, access
, &hkey
);
5848 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5850 RegDeleteValueA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB");
5851 delete_key(comp
, "", access
);
5854 /* ProcessComponents, machine */
5855 r
= MsiInstallProductA(msifile
, "PROCESS_COMPONENTS=1 ALLUSERS=1");
5856 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5857 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
5858 ok(delete_pf("msitest", FALSE
), "File not installed\n");
5860 sprintf(keypath
, keyfmt
, "S-1-5-18", "CBABC2FDCCB35E749A8944D8C1C098B5");
5861 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &comp
);
5862 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5865 res
= RegQueryValueExA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB",
5866 NULL
, NULL
, (LPBYTE
)val
, &size
);
5867 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5868 ok(!lstrcmpiA(val
, program_files_maximus
),
5869 "Expected \"%s\", got \"%s\"\n", program_files_maximus
, val
);
5871 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, compkey
, 0, access
, &hkey
);
5872 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5874 RegDeleteValueA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB");
5875 delete_key(comp
, "", access
);
5878 sprintf(keypath
, keyfmt
, "S-1-5-18", "241C3DA58FECD0945B9687D408766058");
5879 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &comp
);
5880 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5883 res
= RegQueryValueExA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB",
5884 NULL
, NULL
, (LPBYTE
)val
, &size
);
5885 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5886 ok(!lstrcmpA(val
, "01\\msitest\\augustus"),
5887 "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val
);
5889 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, compkey
, 0, access
, &hkey
);
5890 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5892 RegDeleteValueA(comp
, "84A88FD7F6998CE40A22FB59F6B9C2BB");
5893 delete_key(comp
, "", access
);
5897 DeleteFile(msifile
);
5898 DeleteFile("msitest\\maximus");
5899 RemoveDirectory("msitest");
5903 static void test_publish(void)
5907 HKEY uninstall
, prodkey
;
5909 CHAR prodcode
[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
5910 char date
[MAX_PATH
], temp
[MAX_PATH
];
5911 REGSAM access
= KEY_ALL_ACCESS
;
5914 static const CHAR subkey
[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
5916 if (!pMsiQueryComponentStateA
)
5918 win_skip("MsiQueryComponentStateA is not available\n");
5921 if (is_process_limited())
5923 skip("process is limited\n");
5928 GetTempPath(MAX_PATH
, temp
);
5930 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
5931 access
|= KEY_WOW64_64KEY
;
5933 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, subkey
, 0, access
, &uninstall
);
5934 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
5936 CreateDirectoryA("msitest", NULL
);
5937 create_file("msitest\\maximus", 500);
5939 create_database(msifile
, pp_tables
, sizeof(pp_tables
) / sizeof(msi_table
));
5941 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
5943 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5944 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5946 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
5947 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5949 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
5950 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5952 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
5953 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
5954 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
5955 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5957 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
5958 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5960 /* nothing published */
5961 r
= MsiInstallProductA(msifile
, NULL
);
5962 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
5964 skip("Not enough rights to perform tests\n");
5967 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
5968 ok(pf_exists("msitest\\maximus"), "File not installed\n");
5969 ok(pf_exists("msitest"), "File not installed\n");
5971 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5972 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5974 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
5975 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5977 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
5978 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5980 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
5981 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
5982 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
5983 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
5985 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
5986 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
5988 /* PublishProduct and RegisterProduct */
5989 r
= MsiInstallProductA(msifile
, "REGISTER_PRODUCT=1 PUBLISH_PRODUCT=1");
5990 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
5991 ok(pf_exists("msitest\\maximus"), "File not installed\n");
5992 ok(pf_exists("msitest"), "File not installed\n");
5994 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
5995 ok(state
== INSTALLSTATE_DEFAULT
, "Expected INSTALLSTATE_DEFAULT, got %d\n", state
);
5997 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
5998 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6000 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6001 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6003 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6004 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6005 ok(r
== ERROR_UNKNOWN_COMPONENT
, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r
);
6006 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6008 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6009 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
6011 CHECK_REG_STR(prodkey
, "DisplayName", "MSITEST");
6012 CHECK_REG_STR(prodkey
, "DisplayVersion", "1.1.1");
6013 CHECK_REG_STR(prodkey
, "InstallDate", date
);
6014 CHECK_REG_STR(prodkey
, "InstallSource", temp
);
6015 CHECK_REG_ISTR(prodkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6016 CHECK_REG_STR(prodkey
, "Publisher", "Wine");
6017 CHECK_REG_STR(prodkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6018 CHECK_REG_STR(prodkey
, "AuthorizedCDFPrefix", NULL
);
6019 CHECK_REG_STR(prodkey
, "Comments", NULL
);
6020 CHECK_REG_STR(prodkey
, "Contact", NULL
);
6021 CHECK_REG_STR(prodkey
, "HelpLink", NULL
);
6022 CHECK_REG_STR(prodkey
, "HelpTelephone", NULL
);
6023 CHECK_REG_STR(prodkey
, "InstallLocation", NULL
);
6024 CHECK_REG_STR(prodkey
, "Readme", NULL
);
6025 CHECK_REG_STR(prodkey
, "Size", NULL
);
6026 CHECK_REG_STR(prodkey
, "URLInfoAbout", NULL
);
6027 CHECK_REG_STR(prodkey
, "URLUpdateInfo", NULL
);
6028 CHECK_REG_DWORD(prodkey
, "Language", 1033);
6029 CHECK_REG_DWORD(prodkey
, "Version", 0x1010001);
6030 CHECK_REG_DWORD(prodkey
, "VersionMajor", 1);
6031 CHECK_REG_DWORD(prodkey
, "VersionMinor", 1);
6032 CHECK_REG_DWORD(prodkey
, "WindowsInstaller", 1);
6035 CHECK_REG_DWORD2(prodkey
, "EstimatedSize", 12, -12);
6038 RegCloseKey(prodkey
);
6040 r
= MsiInstallProductA(msifile
, "FULL=1 REMOVE=ALL");
6041 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6042 ok(pf_exists("msitest\\maximus"), "File deleted\n");
6043 ok(pf_exists("msitest"), "File deleted\n");
6045 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6046 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6048 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6049 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6051 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6052 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6054 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6055 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6056 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6057 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6059 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6060 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
6062 /* complete install */
6063 r
= MsiInstallProductA(msifile
, "FULL=1");
6064 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6065 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6066 ok(pf_exists("msitest"), "File not installed\n");
6068 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6069 ok(state
== INSTALLSTATE_DEFAULT
, "Expected INSTALLSTATE_DEFAULT, got %d\n", state
);
6071 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6072 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6074 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6075 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6077 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6078 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6079 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6080 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6082 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6083 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
6085 CHECK_REG_STR(prodkey
, "DisplayName", "MSITEST");
6086 CHECK_REG_STR(prodkey
, "DisplayVersion", "1.1.1");
6087 CHECK_REG_STR(prodkey
, "InstallDate", date
);
6088 CHECK_REG_STR(prodkey
, "InstallSource", temp
);
6089 CHECK_REG_ISTR(prodkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6090 CHECK_REG_STR(prodkey
, "Publisher", "Wine");
6091 CHECK_REG_STR(prodkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6092 CHECK_REG_STR(prodkey
, "AuthorizedCDFPrefix", NULL
);
6093 CHECK_REG_STR(prodkey
, "Comments", NULL
);
6094 CHECK_REG_STR(prodkey
, "Contact", NULL
);
6095 CHECK_REG_STR(prodkey
, "HelpLink", NULL
);
6096 CHECK_REG_STR(prodkey
, "HelpTelephone", NULL
);
6097 CHECK_REG_STR(prodkey
, "InstallLocation", NULL
);
6098 CHECK_REG_STR(prodkey
, "Readme", NULL
);
6099 CHECK_REG_STR(prodkey
, "Size", NULL
);
6100 CHECK_REG_STR(prodkey
, "URLInfoAbout", NULL
);
6101 CHECK_REG_STR(prodkey
, "URLUpdateInfo", NULL
);
6102 CHECK_REG_DWORD(prodkey
, "Language", 1033);
6103 CHECK_REG_DWORD(prodkey
, "Version", 0x1010001);
6104 CHECK_REG_DWORD(prodkey
, "VersionMajor", 1);
6105 CHECK_REG_DWORD(prodkey
, "VersionMinor", 1);
6106 CHECK_REG_DWORD(prodkey
, "WindowsInstaller", 1);
6109 CHECK_REG_DWORD2(prodkey
, "EstimatedSize", 12, -12);
6112 RegCloseKey(prodkey
);
6114 /* no UnpublishFeatures */
6115 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
6116 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6117 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
6118 ok(!pf_exists("msitest"), "Directory not deleted\n");
6120 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6121 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6123 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6124 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6126 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6127 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6129 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6130 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6131 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6132 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6134 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6135 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
6137 /* complete install */
6138 r
= MsiInstallProductA(msifile
, "FULL=1");
6139 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6140 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6141 ok(pf_exists("msitest"), "File not installed\n");
6143 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6144 ok(state
== INSTALLSTATE_DEFAULT
, "Expected INSTALLSTATE_DEFAULT, got %d\n", state
);
6146 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6147 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6149 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6150 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6152 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6153 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6154 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6155 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6157 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6158 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
6160 CHECK_REG_STR(prodkey
, "DisplayName", "MSITEST");
6161 CHECK_REG_STR(prodkey
, "DisplayVersion", "1.1.1");
6162 CHECK_REG_STR(prodkey
, "InstallDate", date
);
6163 CHECK_REG_STR(prodkey
, "InstallSource", temp
);
6164 CHECK_REG_ISTR(prodkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6165 CHECK_REG_STR(prodkey
, "Publisher", "Wine");
6166 CHECK_REG_STR(prodkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6167 CHECK_REG_STR(prodkey
, "AuthorizedCDFPrefix", NULL
);
6168 CHECK_REG_STR(prodkey
, "Comments", NULL
);
6169 CHECK_REG_STR(prodkey
, "Contact", NULL
);
6170 CHECK_REG_STR(prodkey
, "HelpLink", NULL
);
6171 CHECK_REG_STR(prodkey
, "HelpTelephone", NULL
);
6172 CHECK_REG_STR(prodkey
, "InstallLocation", NULL
);
6173 CHECK_REG_STR(prodkey
, "Readme", NULL
);
6174 CHECK_REG_STR(prodkey
, "Size", NULL
);
6175 CHECK_REG_STR(prodkey
, "URLInfoAbout", NULL
);
6176 CHECK_REG_STR(prodkey
, "URLUpdateInfo", NULL
);
6177 CHECK_REG_DWORD(prodkey
, "Language", 1033);
6178 CHECK_REG_DWORD(prodkey
, "Version", 0x1010001);
6179 CHECK_REG_DWORD(prodkey
, "VersionMajor", 1);
6180 CHECK_REG_DWORD(prodkey
, "VersionMinor", 1);
6181 CHECK_REG_DWORD(prodkey
, "WindowsInstaller", 1);
6184 CHECK_REG_DWORD2(prodkey
, "EstimatedSize", 12, -12);
6187 RegCloseKey(prodkey
);
6189 /* UnpublishFeatures, only feature removed. Only works when entire product is removed */
6190 r
= MsiInstallProductA(msifile
, "UNPUBLISH_FEATURES=1 REMOVE=feature");
6191 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6192 ok(pf_exists("msitest\\maximus"), "File deleted\n");
6193 ok(pf_exists("msitest"), "Directory deleted\n");
6195 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6196 ok(state
== INSTALLSTATE_DEFAULT
, "Expected INSTALLSTATE_DEFAULT, got %d\n", state
);
6198 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6199 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6201 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6202 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6204 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6205 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6206 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6207 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6209 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6210 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
6212 CHECK_REG_STR(prodkey
, "DisplayName", "MSITEST");
6213 CHECK_REG_STR(prodkey
, "DisplayVersion", "1.1.1");
6214 CHECK_REG_STR(prodkey
, "InstallDate", date
);
6215 CHECK_REG_STR(prodkey
, "InstallSource", temp
);
6216 CHECK_REG_ISTR(prodkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6217 CHECK_REG_STR(prodkey
, "Publisher", "Wine");
6218 CHECK_REG_STR(prodkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6219 CHECK_REG_STR(prodkey
, "AuthorizedCDFPrefix", NULL
);
6220 CHECK_REG_STR(prodkey
, "Comments", NULL
);
6221 CHECK_REG_STR(prodkey
, "Contact", NULL
);
6222 CHECK_REG_STR(prodkey
, "HelpLink", NULL
);
6223 CHECK_REG_STR(prodkey
, "HelpTelephone", NULL
);
6224 CHECK_REG_STR(prodkey
, "InstallLocation", NULL
);
6225 CHECK_REG_STR(prodkey
, "Readme", NULL
);
6226 CHECK_REG_STR(prodkey
, "Size", NULL
);
6227 CHECK_REG_STR(prodkey
, "URLInfoAbout", NULL
);
6228 CHECK_REG_STR(prodkey
, "URLUpdateInfo", NULL
);
6229 CHECK_REG_DWORD(prodkey
, "Language", 1033);
6230 CHECK_REG_DWORD(prodkey
, "Version", 0x1010001);
6231 CHECK_REG_DWORD(prodkey
, "VersionMajor", 1);
6232 CHECK_REG_DWORD(prodkey
, "VersionMinor", 1);
6233 CHECK_REG_DWORD(prodkey
, "WindowsInstaller", 1);
6236 CHECK_REG_DWORD2(prodkey
, "EstimatedSize", 12, -12);
6239 RegCloseKey(prodkey
);
6241 /* complete install */
6242 r
= MsiInstallProductA(msifile
, "FULL=1");
6243 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6244 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6245 ok(pf_exists("msitest"), "File not installed\n");
6247 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6248 ok(state
== INSTALLSTATE_DEFAULT
, "Expected INSTALLSTATE_DEFAULT, got %d\n", state
);
6250 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6251 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6253 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6254 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6256 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6257 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6258 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6259 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6261 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6262 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
6264 CHECK_REG_STR(prodkey
, "DisplayName", "MSITEST");
6265 CHECK_REG_STR(prodkey
, "DisplayVersion", "1.1.1");
6266 CHECK_REG_STR(prodkey
, "InstallDate", date
);
6267 CHECK_REG_STR(prodkey
, "InstallSource", temp
);
6268 CHECK_REG_ISTR(prodkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6269 CHECK_REG_STR(prodkey
, "Publisher", "Wine");
6270 CHECK_REG_STR(prodkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6271 CHECK_REG_STR(prodkey
, "AuthorizedCDFPrefix", NULL
);
6272 CHECK_REG_STR(prodkey
, "Comments", NULL
);
6273 CHECK_REG_STR(prodkey
, "Contact", NULL
);
6274 CHECK_REG_STR(prodkey
, "HelpLink", NULL
);
6275 CHECK_REG_STR(prodkey
, "HelpTelephone", NULL
);
6276 CHECK_REG_STR(prodkey
, "InstallLocation", NULL
);
6277 CHECK_REG_STR(prodkey
, "Readme", NULL
);
6278 CHECK_REG_STR(prodkey
, "Size", NULL
);
6279 CHECK_REG_STR(prodkey
, "URLInfoAbout", NULL
);
6280 CHECK_REG_STR(prodkey
, "URLUpdateInfo", NULL
);
6281 CHECK_REG_DWORD(prodkey
, "Language", 1033);
6282 CHECK_REG_DWORD(prodkey
, "Version", 0x1010001);
6283 CHECK_REG_DWORD(prodkey
, "VersionMajor", 1);
6284 CHECK_REG_DWORD(prodkey
, "VersionMinor", 1);
6285 CHECK_REG_DWORD(prodkey
, "WindowsInstaller", 1);
6288 CHECK_REG_DWORD2(prodkey
, "EstimatedSize", 12, -20);
6291 RegCloseKey(prodkey
);
6293 /* UnpublishFeatures, both features removed */
6294 r
= MsiInstallProductA(msifile
, "UNPUBLISH_FEATURES=1 REMOVE=feature,montecristo");
6295 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6296 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
6297 ok(!pf_exists("msitest"), "Directory not deleted\n");
6299 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6300 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6302 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6303 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6305 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6306 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6308 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6309 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6310 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6311 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6313 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6314 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
6316 /* complete install */
6317 r
= MsiInstallProductA(msifile
, "FULL=1");
6318 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6319 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6320 ok(pf_exists("msitest"), "File not installed\n");
6322 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6323 ok(state
== INSTALLSTATE_DEFAULT
, "Expected INSTALLSTATE_DEFAULT, got %d\n", state
);
6325 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6326 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6328 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6329 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6331 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6332 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6333 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6334 ok(state
== INSTALLSTATE_LOCAL
, "Expected INSTALLSTATE_LOCAL, got %d\n", state
);
6336 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6337 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
6339 CHECK_REG_STR(prodkey
, "DisplayName", "MSITEST");
6340 CHECK_REG_STR(prodkey
, "DisplayVersion", "1.1.1");
6341 CHECK_REG_STR(prodkey
, "InstallDate", date
);
6342 CHECK_REG_STR(prodkey
, "InstallSource", temp
);
6343 CHECK_REG_ISTR(prodkey
, "ModifyPath", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6344 CHECK_REG_STR(prodkey
, "Publisher", "Wine");
6345 CHECK_REG_STR(prodkey
, "UninstallString", "MsiExec.exe /I{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6346 CHECK_REG_STR(prodkey
, "AuthorizedCDFPrefix", NULL
);
6347 CHECK_REG_STR(prodkey
, "Comments", NULL
);
6348 CHECK_REG_STR(prodkey
, "Contact", NULL
);
6349 CHECK_REG_STR(prodkey
, "HelpLink", NULL
);
6350 CHECK_REG_STR(prodkey
, "HelpTelephone", NULL
);
6351 CHECK_REG_STR(prodkey
, "InstallLocation", NULL
);
6352 CHECK_REG_STR(prodkey
, "Readme", NULL
);
6353 CHECK_REG_STR(prodkey
, "Size", NULL
);
6354 CHECK_REG_STR(prodkey
, "URLInfoAbout", NULL
);
6355 CHECK_REG_STR(prodkey
, "URLUpdateInfo", NULL
);
6356 CHECK_REG_DWORD(prodkey
, "Language", 1033);
6357 CHECK_REG_DWORD(prodkey
, "Version", 0x1010001);
6358 CHECK_REG_DWORD(prodkey
, "VersionMajor", 1);
6359 CHECK_REG_DWORD(prodkey
, "VersionMinor", 1);
6360 CHECK_REG_DWORD(prodkey
, "WindowsInstaller", 1);
6363 CHECK_REG_DWORD2(prodkey
, "EstimatedSize", 12, -12);
6366 RegCloseKey(prodkey
);
6368 /* complete uninstall */
6369 r
= MsiInstallProductA(msifile
, "FULL=1 REMOVE=ALL");
6370 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6371 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
6372 ok(!pf_exists("msitest"), "Directory not deleted\n");
6374 state
= MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
6375 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6377 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "feature");
6378 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6380 state
= MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo");
6381 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6383 r
= pMsiQueryComponentStateA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6384 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state
);
6385 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6386 ok(state
== INSTALLSTATE_UNKNOWN
, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state
);
6388 res
= RegOpenKeyExA(uninstall
, prodcode
, 0, access
, &prodkey
);
6389 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
6391 /* make sure 'Program Files\msitest' is removed */
6392 delete_pfmsitest_files();
6395 RegCloseKey(uninstall
);
6396 DeleteFile(msifile
);
6397 DeleteFile("msitest\\maximus");
6398 RemoveDirectory("msitest");
6401 static void test_publishsourcelist(void)
6405 CHAR value
[MAX_PATH
];
6406 CHAR path
[MAX_PATH
];
6407 CHAR prodcode
[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
6409 if (!pMsiSourceListEnumSourcesA
|| !pMsiSourceListGetInfoA
)
6411 win_skip("MsiSourceListEnumSourcesA and/or MsiSourceListGetInfoA are not available\n");
6414 if (is_process_limited())
6416 skip("process is limited\n");
6420 CreateDirectoryA("msitest", NULL
);
6421 create_file("msitest\\maximus", 500);
6423 create_database(msifile
, pp_tables
, sizeof(pp_tables
) / sizeof(msi_table
));
6425 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
6427 r
= MsiInstallProductA(msifile
, NULL
);
6428 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
6430 skip("Not enough rights to perform tests\n");
6433 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6434 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6435 ok(pf_exists("msitest"), "File not installed\n");
6437 /* nothing published */
6439 lstrcpyA(value
, "aaa");
6440 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6441 MSICODE_PRODUCT
, INSTALLPROPERTY_PACKAGENAME
, value
, &size
);
6442 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6443 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6444 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6447 lstrcpyA(value
, "aaa");
6448 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6449 MSICODE_PRODUCT
| MSISOURCETYPE_URL
, 0, value
, &size
);
6450 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6451 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6452 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6454 r
= MsiInstallProductA(msifile
, "REGISTER_PRODUCT=1");
6455 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6456 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6457 ok(pf_exists("msitest"), "File not installed\n");
6459 /* after RegisterProduct */
6461 lstrcpyA(value
, "aaa");
6462 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6463 MSICODE_PRODUCT
, INSTALLPROPERTY_PACKAGENAME
, value
, &size
);
6464 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6465 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6466 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6469 lstrcpyA(value
, "aaa");
6470 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6471 MSICODE_PRODUCT
| MSISOURCETYPE_URL
, 0, value
, &size
);
6472 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6473 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6474 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6476 r
= MsiInstallProductA(msifile
, "PROCESS_COMPONENTS=1");
6477 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6478 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6479 ok(pf_exists("msitest"), "File not installed\n");
6481 /* after ProcessComponents */
6483 lstrcpyA(value
, "aaa");
6484 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6485 MSICODE_PRODUCT
, INSTALLPROPERTY_PACKAGENAME
, value
, &size
);
6486 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6487 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6488 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6491 lstrcpyA(value
, "aaa");
6492 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6493 MSICODE_PRODUCT
| MSISOURCETYPE_URL
, 0, value
, &size
);
6494 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6495 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6496 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6498 r
= MsiInstallProductA(msifile
, "PUBLISH_FEATURES=1");
6499 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6500 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6501 ok(pf_exists("msitest"), "File not installed\n");
6503 /* after PublishFeatures */
6505 lstrcpyA(value
, "aaa");
6506 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6507 MSICODE_PRODUCT
, INSTALLPROPERTY_PACKAGENAME
, value
, &size
);
6508 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6509 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6510 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6513 lstrcpyA(value
, "aaa");
6514 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6515 MSICODE_PRODUCT
| MSISOURCETYPE_URL
, 0, value
, &size
);
6516 ok(r
== ERROR_UNKNOWN_PRODUCT
, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
6517 ok(size
== MAX_PATH
, "Expected %d, got %d\n", MAX_PATH
, size
);
6518 ok(!lstrcmpA(value
, "aaa"), "Expected \"aaa\", got \"%s\"\n", value
);
6520 r
= MsiInstallProductA(msifile
, "PUBLISH_PRODUCT=1");
6521 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6522 ok(pf_exists("msitest\\maximus"), "File not installed\n");
6523 ok(pf_exists("msitest"), "File not installed\n");
6525 /* after PublishProduct */
6527 lstrcpyA(value
, "aaa");
6528 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6529 MSICODE_PRODUCT
, INSTALLPROPERTY_PACKAGENAME
, value
, &size
);
6530 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6531 ok(!lstrcmpA(value
, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value
);
6532 ok(size
== 11, "Expected 11, got %d\n", size
);
6535 lstrcpyA(value
, "aaa");
6536 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6537 MSICODE_PRODUCT
, INSTALLPROPERTY_MEDIAPACKAGEPATH
, value
, &size
);
6538 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6539 ok(!lstrcmpA(value
, ""), "Expected \"\", got \"%s\"\n", value
);
6540 ok(size
== 0, "Expected 0, got %d\n", size
);
6543 lstrcpyA(value
, "aaa");
6544 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6545 MSICODE_PRODUCT
, INSTALLPROPERTY_DISKPROMPT
, value
, &size
);
6546 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6547 ok(!lstrcmpA(value
, ""), "Expected \"\", got \"%s\"\n", value
);
6548 ok(size
== 0, "Expected 0, got %d\n", size
);
6550 lstrcpyA(path
, CURR_DIR
);
6551 lstrcatA(path
, "\\");
6554 lstrcpyA(value
, "aaa");
6555 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6556 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDSOURCE
, value
, &size
);
6557 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6558 ok(!lstrcmpA(value
, path
), "Expected \"%s\", got \"%s\"\n", path
, value
);
6559 ok(size
== lstrlenA(path
), "Expected %d, got %d\n", lstrlenA(path
), size
);
6562 lstrcpyA(value
, "aaa");
6563 r
= pMsiSourceListGetInfoA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6564 MSICODE_PRODUCT
, INSTALLPROPERTY_LASTUSEDTYPE
, value
, &size
);
6565 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6566 ok(!lstrcmpA(value
, "n"), "Expected \"n\", got \"%s\"\n", value
);
6567 ok(size
== 1, "Expected 1, got %d\n", size
);
6570 lstrcpyA(value
, "aaa");
6571 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6572 MSICODE_PRODUCT
| MSISOURCETYPE_URL
, 0, value
, &size
);
6573 ok(r
== ERROR_NO_MORE_ITEMS
, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r
);
6574 ok(!lstrcmpA(value
, "aaa"), "Expected value to be unchanged, got %s\n", value
);
6575 ok(size
== MAX_PATH
, "Expected MAX_PATH, got %d\n", size
);
6578 lstrcpyA(value
, "aaa");
6579 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6580 MSICODE_PRODUCT
| MSISOURCETYPE_NETWORK
, 0, value
, &size
);
6581 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6582 ok(!lstrcmpA(value
, path
), "Expected \"%s\", got \"%s\"\n", path
, value
);
6583 ok(size
== lstrlenA(path
), "Expected %d, got %d\n", lstrlenA(path
), size
);
6586 lstrcpyA(value
, "aaa");
6587 r
= pMsiSourceListEnumSourcesA(prodcode
, NULL
, MSIINSTALLCONTEXT_USERUNMANAGED
,
6588 MSICODE_PRODUCT
| MSISOURCETYPE_NETWORK
, 1, value
, &size
);
6589 ok(r
== ERROR_NO_MORE_ITEMS
, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r
);
6590 ok(!lstrcmpA(value
, "aaa"), "Expected value to be unchanged, got %s\n", value
);
6591 ok(size
== MAX_PATH
, "Expected MAX_PATH, got %d\n", size
);
6593 /* complete uninstall */
6594 r
= MsiInstallProductA(msifile
, "FULL=1 REMOVE=ALL");
6595 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6596 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
6597 ok(!pf_exists("msitest"), "Directory not deleted\n");
6599 /* make sure 'Program Files\msitest' is removed */
6600 delete_pfmsitest_files();
6603 DeleteFile(msifile
);
6604 DeleteFile("msitest\\maximus");
6605 RemoveDirectory("msitest");
6608 static UINT
run_query(MSIHANDLE hdb
, MSIHANDLE hrec
, const char *query
)
6610 MSIHANDLE hview
= 0;
6613 r
= MsiDatabaseOpenView(hdb
, query
, &hview
);
6614 if(r
!= ERROR_SUCCESS
)
6617 r
= MsiViewExecute(hview
, hrec
);
6618 if(r
== ERROR_SUCCESS
)
6619 r
= MsiViewClose(hview
);
6620 MsiCloseHandle(hview
);
6624 static void set_transform_summary_info(void)
6627 MSIHANDLE suminfo
= 0;
6629 /* build summary info */
6630 r
= MsiGetSummaryInformation(0, mstfile
, 3, &suminfo
);
6631 ok(r
== ERROR_SUCCESS
, "Failed to open summaryinfo\n");
6633 r
= MsiSummaryInfoSetProperty(suminfo
, PID_TITLE
, VT_LPSTR
, 0, NULL
, "MSITEST");
6634 ok(r
== ERROR_SUCCESS
, "Failed to set summary info\n");
6636 r
= MsiSummaryInfoSetProperty(suminfo
, PID_REVNUMBER
, VT_LPSTR
, 0, NULL
,
6637 "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}1.1.1;"
6638 "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}1.1.1;"
6639 "{4C0EAA15-0264-4E5A-8758-609EF142B92D}");
6640 ok(r
== ERROR_SUCCESS
, "Failed to set summary info\n");
6642 r
= MsiSummaryInfoSetProperty(suminfo
, PID_PAGECOUNT
, VT_I4
, 100, NULL
, NULL
);
6643 ok(r
== ERROR_SUCCESS
, "Failed to set summary info\n");
6645 r
= MsiSummaryInfoPersist(suminfo
);
6646 ok(r
== ERROR_SUCCESS
, "Failed to make summary info persist\n");
6648 r
= MsiCloseHandle(suminfo
);
6649 ok(r
== ERROR_SUCCESS
, "Failed to close suminfo\n");
6652 static void generate_transform(void)
6654 MSIHANDLE hdb1
, hdb2
;
6658 /* start with two identical databases */
6659 CopyFile(msifile
, msifile2
, FALSE
);
6661 r
= MsiOpenDatabase(msifile2
, MSIDBOPEN_TRANSACT
, &hdb1
);
6662 ok(r
== ERROR_SUCCESS
, "Failed to create database\n");
6664 r
= MsiDatabaseCommit(hdb1
);
6665 ok(r
== ERROR_SUCCESS
, "Failed to commit database\n");
6667 r
= MsiOpenDatabase(msifile
, MSIDBOPEN_READONLY
, &hdb2
);
6668 ok(r
== ERROR_SUCCESS
, "Failed to create database\n");
6670 query
= "INSERT INTO `Property` ( `Property`, `Value` ) VALUES ( 'prop', 'val' )";
6671 r
= run_query(hdb1
, 0, query
);
6672 ok(r
== ERROR_SUCCESS
, "failed to add property\n");
6674 /* database needs to be committed */
6675 MsiDatabaseCommit(hdb1
);
6677 r
= MsiDatabaseGenerateTransform(hdb1
, hdb2
, mstfile
, 0, 0);
6678 ok(r
== ERROR_SUCCESS
, "return code %d, should be ERROR_SUCCESS\n", r
);
6680 #if 0 /* not implemented in wine yet */
6681 r
= MsiCreateTransformSummaryInfo(hdb2
, hdb2
, mstfile
, 0, 0);
6682 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
6685 MsiCloseHandle(hdb1
);
6686 MsiCloseHandle(hdb2
);
6689 /* data for generating a transform */
6691 /* tables transform names - encoded as they would be in an msi database file */
6692 static const WCHAR name1
[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 }; /* _StringData */
6693 static const WCHAR name2
[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 }; /* _StringPool */
6694 static const WCHAR name3
[] = { 0x4840, 0x4559, 0x44f2, 0x4568, 0x4737, 0 }; /* Property */
6696 /* data in each table */
6697 static const char data1
[] = /* _StringData */
6698 "propval"; /* all the strings squashed together */
6700 static const WCHAR data2
[] = { /* _StringPool */
6702 0, 0, /* string 0 '' */
6703 4, 1, /* string 1 'prop' */
6704 3, 1, /* string 2 'val' */
6707 static const WCHAR data3
[] = { /* Property */
6708 0x0201, 0x0001, 0x0002,
6711 static const struct {
6715 } table_transform_data
[] =
6717 { name1
, data1
, sizeof data1
- 1 },
6718 { name2
, data2
, sizeof data2
},
6719 { name3
, data3
, sizeof data3
},
6722 #define NUM_TRANSFORM_TABLES (sizeof table_transform_data/sizeof table_transform_data[0])
6724 static void generate_transform_manual(void)
6726 IStorage
*stg
= NULL
;
6731 const DWORD mode
= STGM_CREATE
|STGM_READWRITE
|STGM_DIRECT
|STGM_SHARE_EXCLUSIVE
;
6733 const CLSID CLSID_MsiTransform
= { 0xc1082,0,0,{0xc0,0,0,0,0,0,0,0x46}};
6735 MultiByteToWideChar(CP_ACP
, 0, mstfile
, -1, name
, 0x20);
6737 r
= StgCreateDocfile(name
, mode
, 0, &stg
);
6738 ok(r
== S_OK
, "failed to create storage\n");
6742 r
= IStorage_SetClass(stg
, &CLSID_MsiTransform
);
6743 ok(r
== S_OK
, "failed to set storage type\n");
6745 for (i
=0; i
<NUM_TRANSFORM_TABLES
; i
++)
6747 r
= IStorage_CreateStream(stg
, table_transform_data
[i
].name
,
6748 STGM_WRITE
| STGM_SHARE_EXCLUSIVE
, 0, 0, &stm
);
6751 ok(0, "failed to create stream %08x\n", r
);
6755 r
= IStream_Write(stm
, table_transform_data
[i
].data
,
6756 table_transform_data
[i
].size
, &count
);
6757 if (FAILED(r
) || count
!= table_transform_data
[i
].size
)
6758 ok(0, "failed to write stream\n");
6759 IStream_Release(stm
);
6762 IStorage_Release(stg
);
6764 set_transform_summary_info();
6767 static void test_transformprop(void)
6771 if (is_process_limited())
6773 skip("process is limited\n");
6777 CreateDirectoryA("msitest", NULL
);
6778 create_file("msitest\\augustus", 500);
6780 create_database(msifile
, tp_tables
, sizeof(tp_tables
) / sizeof(msi_table
));
6782 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
6784 r
= MsiInstallProductA(msifile
, NULL
);
6785 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
6787 skip("Not enough rights to perform tests\n");
6790 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6791 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
6792 ok(!delete_pf("msitest", FALSE
), "File installed\n");
6795 generate_transform();
6797 generate_transform_manual();
6799 r
= MsiInstallProductA(msifile
, "TRANSFORMS=winetest.mst");
6800 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6801 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
6802 ok(delete_pf("msitest", FALSE
), "File not installed\n");
6805 /* Delete the files in the temp (current) folder */
6806 DeleteFile(msifile
);
6807 DeleteFile(msifile2
);
6808 DeleteFile(mstfile
);
6809 DeleteFile("msitest\\augustus");
6810 RemoveDirectory("msitest");
6813 static void test_currentworkingdir(void)
6816 CHAR drive
[MAX_PATH
], path
[MAX_PATH
];
6819 if (is_process_limited())
6821 skip("process is limited\n");
6825 CreateDirectoryA("msitest", NULL
);
6826 create_file("msitest\\augustus", 500);
6828 create_database(msifile
, cwd_tables
, sizeof(cwd_tables
) / sizeof(msi_table
));
6830 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
6832 CreateDirectoryA("diffdir", NULL
);
6833 SetCurrentDirectoryA("diffdir");
6835 sprintf(path
, "..\\%s", msifile
);
6836 r
= MsiInstallProductA(path
, NULL
);
6839 ok(r
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r
);
6840 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
6841 ok(!delete_pf("msitest", FALSE
), "File installed\n");
6844 sprintf(path
, "%s\\%s", CURR_DIR
, msifile
);
6845 r
= MsiInstallProductA(path
, NULL
);
6846 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
6848 skip("Not enough rights to perform tests\n");
6851 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6852 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
6853 ok(delete_pf("msitest", FALSE
), "File not installed\n");
6855 lstrcpyA(drive
, CURR_DIR
);
6858 SetCurrentDirectoryA(drive
);
6860 lstrcpy(path
, CURR_DIR
);
6861 if (path
[lstrlenA(path
) - 1] != '\\')
6862 lstrcatA(path
, "\\");
6863 lstrcatA(path
, msifile
);
6864 ptr
= strchr(path
, ':');
6867 r
= MsiInstallProductA(ptr
, NULL
);
6868 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6869 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
6870 ok(delete_pf("msitest", FALSE
), "File not installed\n");
6873 SetCurrentDirectoryA(CURR_DIR
);
6874 DeleteFile(msifile
);
6875 DeleteFile("msitest\\augustus");
6876 RemoveDirectory("msitest");
6877 RemoveDirectory("diffdir");
6880 static void set_admin_summary_info(const CHAR
*name
)
6882 MSIHANDLE db
, summary
;
6885 r
= MsiOpenDatabaseA(name
, MSIDBOPEN_DIRECT
, &db
);
6886 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6888 r
= MsiGetSummaryInformationA(db
, NULL
, 1, &summary
);
6889 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6891 r
= MsiSummaryInfoSetPropertyA(summary
, PID_WORDCOUNT
, VT_I4
, 5, NULL
, NULL
);
6892 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6894 /* write the summary changes back to the stream */
6895 r
= MsiSummaryInfoPersist(summary
);
6896 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6898 MsiCloseHandle(summary
);
6900 r
= MsiDatabaseCommit(db
);
6901 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6906 static void test_admin(void)
6910 CreateDirectoryA("msitest", NULL
);
6911 create_file("msitest\\augustus", 500);
6913 create_database(msifile
, adm_tables
, sizeof(adm_tables
) / sizeof(msi_table
));
6914 set_admin_summary_info(msifile
);
6916 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
6918 r
= MsiInstallProductA(msifile
, NULL
);
6919 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
6921 skip("Not enough rights to perform tests\n");
6924 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6925 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
6926 ok(!delete_pf("msitest", FALSE
), "File installed\n");
6927 ok(!DeleteFile("c:\\msitest\\augustus"), "File installed\n");
6928 ok(!RemoveDirectory("c:\\msitest"), "File installed\n");
6930 r
= MsiInstallProductA(msifile
, "ACTION=ADMIN");
6931 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
6932 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
6933 ok(!delete_pf("msitest", FALSE
), "File installed\n");
6936 ok(DeleteFile("c:\\msitest\\augustus"), "File not installed\n");
6937 ok(RemoveDirectory("c:\\msitest"), "File not installed\n");
6941 DeleteFile(msifile
);
6942 DeleteFile("msitest\\augustus");
6943 RemoveDirectory("msitest");
6946 static void set_admin_property_stream(LPCSTR file
)
6950 WCHAR fileW
[MAX_PATH
];
6953 const DWORD mode
= STGM_DIRECT
| STGM_READWRITE
| STGM_SHARE_EXCLUSIVE
;
6955 /* AdminProperties */
6956 static const WCHAR stmname
[] = {0x41ca,0x4330,0x3e71,0x44b5,0x4233,0x45f5,0x422c,0x4836,0};
6957 static const WCHAR data
[] = {'M','Y','P','R','O','P','=','2','7','1','8',' ',
6958 'M','y','P','r','o','p','=','4','2',0};
6960 MultiByteToWideChar(CP_ACP
, 0, file
, -1, fileW
, MAX_PATH
);
6962 hr
= StgOpenStorage(fileW
, NULL
, mode
, NULL
, 0, &stg
);
6963 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
6967 hr
= IStorage_CreateStream(stg
, stmname
, STGM_WRITE
| STGM_SHARE_EXCLUSIVE
, 0, 0, &stm
);
6968 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
6970 hr
= IStream_Write(stm
, data
, sizeof(data
), &count
);
6971 ok(hr
== S_OK
, "Expected S_OK, got %d\n", hr
);
6973 IStream_Release(stm
);
6974 IStorage_Release(stg
);
6977 static void test_adminprops(void)
6981 if (is_process_limited())
6983 skip("process is limited\n");
6987 CreateDirectoryA("msitest", NULL
);
6988 create_file("msitest\\augustus", 500);
6990 create_database(msifile
, amp_tables
, sizeof(amp_tables
) / sizeof(msi_table
));
6991 set_admin_summary_info(msifile
);
6992 set_admin_property_stream(msifile
);
6994 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
6996 r
= MsiInstallProductA(msifile
, NULL
);
6997 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
6999 skip("Not enough rights to perform tests\n");
7002 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7003 ok(delete_pf("msitest\\augustus", TRUE
), "File installed\n");
7004 ok(delete_pf("msitest", FALSE
), "File installed\n");
7007 DeleteFile(msifile
);
7008 DeleteFile("msitest\\augustus");
7009 RemoveDirectory("msitest");
7012 static void create_pf_data(LPCSTR file
, LPCSTR data
, BOOL is_file
)
7014 CHAR path
[MAX_PATH
];
7016 lstrcpyA(path
, PROG_FILES_DIR
);
7017 lstrcatA(path
, "\\");
7018 lstrcatA(path
, file
);
7021 create_file_data(path
, data
, 500);
7023 CreateDirectoryA(path
, NULL
);
7026 #define create_pf(file, is_file) create_pf_data(file, file, is_file)
7028 static void test_removefiles(void)
7032 if (is_process_limited())
7034 skip("process is limited\n");
7038 CreateDirectoryA("msitest", NULL
);
7039 create_file("msitest\\hydrogen", 500);
7040 create_file("msitest\\helium", 500);
7041 create_file("msitest\\lithium", 500);
7043 create_database(msifile
, rem_tables
, sizeof(rem_tables
) / sizeof(msi_table
));
7045 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
7047 r
= MsiInstallProductA(msifile
, NULL
);
7048 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7050 skip("Not enough rights to perform tests\n");
7053 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7054 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
7055 ok(!pf_exists("msitest\\helium"), "File installed\n");
7056 ok(pf_exists("msitest\\lithium"), "File not installed\n");
7057 ok(pf_exists("msitest"), "File not installed\n");
7059 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
7060 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7061 ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
7062 ok(!pf_exists("msitest\\helium"), "File not deleted\n");
7063 ok(delete_pf("msitest\\lithium", TRUE
), "File deleted\n");
7064 ok(delete_pf("msitest", FALSE
), "File deleted\n");
7066 create_pf("msitest", FALSE
);
7067 create_pf("msitest\\hydrogen", TRUE
);
7068 create_pf("msitest\\helium", TRUE
);
7069 create_pf("msitest\\lithium", TRUE
);
7071 r
= MsiInstallProductA(msifile
, NULL
);
7072 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7073 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
7074 ok(pf_exists("msitest\\helium"), "File not installed\n");
7075 ok(pf_exists("msitest\\lithium"), "File not installed\n");
7076 ok(pf_exists("msitest"), "File not installed\n");
7078 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
7079 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7080 ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
7081 ok(delete_pf("msitest\\helium", TRUE
), "File deleted\n");
7082 ok(delete_pf("msitest\\lithium", TRUE
), "File deleted\n");
7083 ok(delete_pf("msitest", FALSE
), "File deleted\n");
7085 create_pf("msitest", FALSE
);
7086 create_pf("msitest\\furlong", TRUE
);
7087 create_pf("msitest\\firkin", TRUE
);
7088 create_pf("msitest\\fortnight", TRUE
);
7089 create_pf("msitest\\becquerel", TRUE
);
7090 create_pf("msitest\\dioptre", TRUE
);
7091 create_pf("msitest\\attoparsec", TRUE
);
7092 create_pf("msitest\\storeys", TRUE
);
7093 create_pf("msitest\\block", TRUE
);
7094 create_pf("msitest\\siriometer", TRUE
);
7095 create_pf("msitest\\cabout", FALSE
);
7096 create_pf("msitest\\cabout\\blocker", TRUE
);
7098 r
= MsiInstallProductA(msifile
, NULL
);
7099 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7100 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
7101 ok(!pf_exists("msitest\\helium"), "File installed\n");
7102 ok(pf_exists("msitest\\lithium"), "File not installed\n");
7103 ok(!pf_exists("msitest\\furlong"), "File not deleted\n");
7104 ok(!pf_exists("msitest\\firkin"), "File not deleted\n");
7105 ok(!pf_exists("msitest\\fortnight"), "File not deleted\n");
7106 ok(pf_exists("msitest\\becquerel"), "File not installed\n");
7107 ok(pf_exists("msitest\\dioptre"), "File not installed\n");
7108 ok(pf_exists("msitest\\attoparsec"), "File not installed\n");
7109 ok(!pf_exists("msitest\\storeys"), "File not deleted\n");
7110 ok(!pf_exists("msitest\\block"), "File not deleted\n");
7111 ok(!pf_exists("msitest\\siriometer"), "File not deleted\n");
7112 ok(pf_exists("msitest\\cabout"), "Directory removed\n");
7113 ok(pf_exists("msitest"), "File not installed\n");
7115 create_pf("msitest\\furlong", TRUE
);
7116 create_pf("msitest\\firkin", TRUE
);
7117 create_pf("msitest\\fortnight", TRUE
);
7118 create_pf("msitest\\storeys", TRUE
);
7119 create_pf("msitest\\block", TRUE
);
7120 create_pf("msitest\\siriometer", TRUE
);
7122 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
7123 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7124 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not deleted\n");
7125 ok(!delete_pf("msitest\\helium", TRUE
), "File not deleted\n");
7126 ok(delete_pf("msitest\\lithium", TRUE
), "File deleted\n");
7127 ok(delete_pf("msitest\\furlong", TRUE
), "File deleted\n");
7128 ok(delete_pf("msitest\\firkin", TRUE
), "File deleted\n");
7129 ok(delete_pf("msitest\\fortnight", TRUE
), "File deleted\n");
7130 ok(!delete_pf("msitest\\becquerel", TRUE
), "File not deleted\n");
7131 ok(!delete_pf("msitest\\dioptre", TRUE
), "File not deleted\n");
7132 ok(delete_pf("msitest\\attoparsec", TRUE
), "File deleted\n");
7133 ok(!delete_pf("msitest\\storeys", TRUE
), "File not deleted\n");
7134 ok(!delete_pf("msitest\\block", TRUE
), "File not deleted\n");
7135 ok(delete_pf("msitest\\siriometer", TRUE
), "File deleted\n");
7136 ok(pf_exists("msitest\\cabout"), "Directory deleted\n");
7137 ok(pf_exists("msitest"), "Directory deleted\n");
7139 r
= MsiInstallProductA(msifile
, NULL
);
7140 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7141 ok(delete_pf("msitest\\hydrogen", TRUE
), "File not installed\n");
7142 ok(!delete_pf("msitest\\helium", TRUE
), "File installed\n");
7143 ok(delete_pf("msitest\\lithium", TRUE
), "File not installed\n");
7144 ok(pf_exists("msitest\\cabout"), "Directory deleted\n");
7145 ok(pf_exists("msitest"), "Directory deleted\n");
7147 delete_pf("msitest\\cabout\\blocker", TRUE
);
7149 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
7150 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7151 ok(!delete_pf("msitest\\cabout", FALSE
), "Directory not deleted\n");
7152 ok(delete_pf("msitest", FALSE
), "Directory deleted\n");
7155 DeleteFile(msifile
);
7156 DeleteFile("msitest\\hydrogen");
7157 DeleteFile("msitest\\helium");
7158 DeleteFile("msitest\\lithium");
7159 RemoveDirectory("msitest");
7162 static void test_movefiles(void)
7165 char props
[MAX_PATH
];
7167 if (is_process_limited())
7169 skip("process is limited\n");
7173 CreateDirectoryA("msitest", NULL
);
7174 create_file("msitest\\augustus", 100);
7175 create_file("cameroon", 100);
7176 create_file("djibouti", 100);
7177 create_file("egypt", 100);
7178 create_file("finland", 100);
7179 create_file("gambai", 100);
7180 create_file("honduras", 100);
7181 create_file("msitest\\india", 100);
7182 create_file("japan", 100);
7183 create_file("kenya", 100);
7184 CreateDirectoryA("latvia", NULL
);
7185 create_file("nauru", 100);
7186 create_file("peru", 100);
7187 create_file("apple", 100);
7188 create_file("application", 100);
7189 create_file("ape", 100);
7190 create_file("foo", 100);
7191 create_file("fao", 100);
7192 create_file("fbod", 100);
7193 create_file("budding", 100);
7194 create_file("buddy", 100);
7195 create_file("bud", 100);
7196 create_file("bar", 100);
7197 create_file("bur", 100);
7198 create_file("bird", 100);
7200 create_database(msifile
, mov_tables
, sizeof(mov_tables
) / sizeof(msi_table
));
7202 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
7204 /* if the source or dest property is not a full path,
7205 * windows tries to access it as a network resource
7208 sprintf(props
, "SOURCEFULL=\"%s\\\" DESTFULL=\"%s\\msitest\" "
7209 "FILEPATHBAD=\"%s\\japan\" FILEPATHGOOD=\"%s\\kenya\"",
7210 CURR_DIR
, PROG_FILES_DIR
, CURR_DIR
, CURR_DIR
);
7212 r
= MsiInstallProductA(msifile
, props
);
7213 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7215 skip("Not enough rights to perform tests\n");
7218 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7219 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
7220 ok(!delete_pf("msitest\\dest", TRUE
), "File copied\n");
7221 ok(delete_pf("msitest\\canada", TRUE
), "File not copied\n");
7222 ok(delete_pf("msitest\\dominica", TRUE
), "File not moved\n");
7223 ok(!delete_pf("msitest\\elsalvador", TRUE
), "File moved\n");
7224 ok(!delete_pf("msitest\\france", TRUE
), "File moved\n");
7225 ok(!delete_pf("msitest\\georgia", TRUE
), "File moved\n");
7226 ok(delete_pf("msitest\\hungary", TRUE
), "File not moved\n");
7227 ok(!delete_pf("msitest\\indonesia", TRUE
), "File moved\n");
7228 ok(!delete_pf("msitest\\jordan", TRUE
), "File moved\n");
7229 ok(delete_pf("msitest\\kiribati", TRUE
), "File not moved\n");
7230 ok(!delete_pf("msitest\\lebanon", TRUE
), "File moved\n");
7231 ok(!delete_pf("msitest\\lebanon", FALSE
), "Directory moved\n");
7232 ok(delete_pf("msitest\\poland", TRUE
), "File not moved\n");
7233 /* either apple or application will be moved depending on directory order */
7234 if (!delete_pf("msitest\\apple", TRUE
))
7235 ok(delete_pf("msitest\\application", TRUE
), "File not moved\n");
7237 ok(!delete_pf("msitest\\application", TRUE
), "File should not exist\n");
7238 ok(delete_pf("msitest\\wildcard", TRUE
), "File not moved\n");
7239 ok(!delete_pf("msitest\\ape", TRUE
), "File moved\n");
7240 /* either fao or foo will be moved depending on directory order */
7241 if (delete_pf("msitest\\foo", TRUE
))
7242 ok(!delete_pf("msitest\\fao", TRUE
), "File should not exist\n");
7244 ok(delete_pf("msitest\\fao", TRUE
), "File not moved\n");
7245 ok(delete_pf("msitest\\single", TRUE
), "File not moved\n");
7246 ok(!delete_pf("msitest\\fbod", TRUE
), "File moved\n");
7247 ok(delete_pf("msitest\\budding", TRUE
), "File not moved\n");
7248 ok(delete_pf("msitest\\buddy", TRUE
), "File not moved\n");
7249 ok(!delete_pf("msitest\\bud", TRUE
), "File moved\n");
7250 ok(delete_pf("msitest\\bar", TRUE
), "File not moved\n");
7251 ok(delete_pf("msitest\\bur", TRUE
), "File not moved\n");
7252 ok(!delete_pf("msitest\\bird", TRUE
), "File moved\n");
7253 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7254 ok(DeleteFileA("cameroon"), "File moved\n");
7255 ok(!DeleteFileA("djibouti"), "File not moved\n");
7256 ok(DeleteFileA("egypt"), "File moved\n");
7257 ok(DeleteFileA("finland"), "File moved\n");
7258 ok(DeleteFileA("gambai"), "File moved\n");
7259 ok(!DeleteFileA("honduras"), "File not moved\n");
7260 ok(DeleteFileA("msitest\\india"), "File moved\n");
7261 ok(DeleteFileA("japan"), "File moved\n");
7262 ok(!DeleteFileA("kenya"), "File not moved\n");
7263 ok(RemoveDirectoryA("latvia"), "Directory moved\n");
7264 ok(!DeleteFileA("nauru"), "File not moved\n");
7265 ok(!DeleteFileA("peru"), "File not moved\n");
7266 ok(!DeleteFileA("apple"), "File not moved\n");
7267 ok(!DeleteFileA("application"), "File not moved\n");
7268 ok(DeleteFileA("ape"), "File moved\n");
7269 ok(!DeleteFileA("foo"), "File not moved\n");
7270 ok(!DeleteFileA("fao"), "File not moved\n");
7271 ok(DeleteFileA("fbod"), "File moved\n");
7272 ok(!DeleteFileA("budding"), "File not moved\n");
7273 ok(!DeleteFileA("buddy"), "File not moved\n");
7274 ok(DeleteFileA("bud"), "File moved\n");
7275 ok(!DeleteFileA("bar"), "File not moved\n");
7276 ok(!DeleteFileA("bur"), "File not moved\n");
7277 ok(DeleteFileA("bird"), "File moved\n");
7280 DeleteFile("cameroon");
7281 DeleteFile("djibouti");
7282 DeleteFile("egypt");
7283 DeleteFile("finland");
7284 DeleteFile("gambai");
7285 DeleteFile("honduras");
7286 DeleteFile("japan");
7287 DeleteFile("kenya");
7288 DeleteFile("nauru");
7290 DeleteFile("apple");
7291 DeleteFile("application");
7296 DeleteFile("budding");
7297 DeleteFile("buddy");
7302 DeleteFile("msitest\\india");
7303 DeleteFile("msitest\\augustus");
7304 RemoveDirectory("latvia");
7305 RemoveDirectory("msitest");
7306 DeleteFile(msifile
);
7309 static void test_missingcab(void)
7313 if (is_process_limited())
7315 skip("process is limited\n");
7319 CreateDirectoryA("msitest", NULL
);
7320 create_file("msitest\\augustus", 500);
7321 create_file("maximus", 500);
7323 create_database(msifile
, mc_tables
, sizeof(mc_tables
) / sizeof(msi_table
));
7325 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7327 create_cab_file("test1.cab", MEDIA_SIZE
, "maximus\0");
7329 create_pf("msitest", FALSE
);
7330 create_pf_data("msitest\\caesar", "abcdefgh", TRUE
);
7332 r
= MsiInstallProductA(msifile
, NULL
);
7333 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7335 skip("Not enough rights to perform tests\n");
7338 ok(r
== ERROR_SUCCESS
||
7339 broken(r
== ERROR_INSTALL_FAILURE
), /* win9x */
7340 "Expected ERROR_SUCCESS, got %u\n", r
);
7341 if (r
== ERROR_SUCCESS
)
7343 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
7344 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
7346 ok(delete_pf("msitest\\caesar", TRUE
), "File not installed\n");
7347 ok(!delete_pf("msitest\\gaius", TRUE
), "File installed\n");
7348 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7350 create_pf("msitest", FALSE
);
7351 create_pf_data("msitest\\caesar", "abcdefgh", TRUE
);
7352 create_pf("msitest\\gaius", TRUE
);
7354 r
= MsiInstallProductA(msifile
, "GAIUS=1");
7355 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
7358 ok(!delete_pf("msitest\\maximus", TRUE
), "File installed\n");
7359 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
7361 ok(delete_pf("msitest\\caesar", TRUE
), "File removed\n");
7362 ok(delete_pf("msitest\\gaius", TRUE
), "File removed\n");
7363 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7366 delete_pf("msitest\\caesar", TRUE
);
7367 delete_pf("msitest", FALSE
);
7368 DeleteFile("msitest\\augustus");
7369 RemoveDirectory("msitest");
7370 DeleteFile("maximus");
7371 DeleteFile("test1.cab");
7372 DeleteFile(msifile
);
7375 static void test_duplicatefiles(void)
7379 if (is_process_limited())
7381 skip("process is limited\n");
7385 CreateDirectoryA("msitest", NULL
);
7386 create_file("msitest\\maximus", 500);
7387 create_database(msifile
, df_tables
, sizeof(df_tables
) / sizeof(msi_table
));
7389 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7391 /* fails if the destination folder is not a valid property */
7393 r
= MsiInstallProductA(msifile
, NULL
);
7394 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7396 skip("Not enough rights to perform tests\n");
7399 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7400 ok(delete_pf("msitest\\maximus", TRUE
), "File not installed\n");
7401 ok(delete_pf("msitest\\augustus", TRUE
), "File not duplicated\n");
7402 ok(delete_pf("msitest\\this\\doesnot\\exist\\maximus", TRUE
), "File not duplicated\n");
7403 ok(delete_pf("msitest\\this\\doesnot\\exist", FALSE
), "File not duplicated\n");
7404 ok(delete_pf("msitest\\this\\doesnot", FALSE
), "File not duplicated\n");
7405 ok(delete_pf("msitest\\this", FALSE
), "File not duplicated\n");
7406 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7409 DeleteFile("msitest\\maximus");
7410 RemoveDirectory("msitest");
7411 DeleteFile(msifile
);
7414 static void test_writeregistryvalues(void)
7420 CHAR path
[MAX_PATH
];
7421 REGSAM access
= KEY_ALL_ACCESS
;
7424 if (is_process_limited())
7426 skip("process is limited\n");
7430 CreateDirectoryA("msitest", NULL
);
7431 create_file("msitest\\augustus", 500);
7433 create_database(msifile
, wrv_tables
, sizeof(wrv_tables
) / sizeof(msi_table
));
7435 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
7436 access
|= KEY_WOW64_64KEY
;
7438 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7440 r
= MsiInstallProductA(msifile
, NULL
);
7441 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7443 skip("Not enough rights to perform tests\n");
7446 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7447 ok(delete_pf("msitest\\augustus", TRUE
), "File installed\n");
7448 ok(delete_pf("msitest", FALSE
), "File installed\n");
7450 res
= RegOpenKeyA(HKEY_LOCAL_MACHINE
, "SOFTWARE\\Wine\\msitest", &hkey
);
7451 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
7454 type
= REG_MULTI_SZ
;
7455 memset(path
, 'a', MAX_PATH
);
7456 res
= RegQueryValueExA(hkey
, "Value", NULL
, &type
, (LPBYTE
)path
, &size
);
7457 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
7458 ok(!memcmp(path
, "one\0two\0three\0\0", size
), "Wrong multi-sz data\n");
7459 ok(size
== 15, "Expected 15, got %d\n", size
);
7460 ok(type
== REG_MULTI_SZ
, "Expected REG_MULTI_SZ, got %d\n", type
);
7462 RegDeleteKeyA(HKEY_CURRENT_USER
, "SOFTWARE\\Wine\\msitest");
7465 DeleteFile(msifile
);
7466 DeleteFile("msitest\\augustus");
7467 RemoveDirectory("msitest");
7470 static void test_sourcefolder(void)
7474 if (is_process_limited())
7476 skip("process is limited\n");
7480 CreateDirectoryA("msitest", NULL
);
7481 create_file("augustus", 500);
7483 create_database(msifile
, sf_tables
, sizeof(sf_tables
) / sizeof(msi_table
));
7485 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7487 r
= MsiInstallProductA(msifile
, NULL
);
7488 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7490 skip("Not enough rights to perform tests\n");
7493 ok(r
== ERROR_INSTALL_FAILURE
,
7494 "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
7495 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
7498 ok(!delete_pf("msitest", FALSE
), "File installed\n");
7501 RemoveDirectoryA("msitest");
7503 r
= MsiInstallProductA(msifile
, NULL
);
7504 ok(r
== ERROR_INSTALL_FAILURE
,
7505 "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
7506 ok(!delete_pf("msitest\\augustus", TRUE
), "File installed\n");
7509 ok(!delete_pf("msitest", FALSE
), "File installed\n");
7513 DeleteFile(msifile
);
7514 DeleteFile("augustus");
7517 static void test_customaction51(void)
7521 if (is_process_limited())
7523 skip("process is limited\n");
7527 CreateDirectoryA("msitest", NULL
);
7528 create_file("msitest\\augustus", 500);
7530 create_database(msifile
, ca51_tables
, sizeof(ca51_tables
) / sizeof(msi_table
));
7532 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7534 r
= MsiInstallProductA(msifile
, NULL
);
7535 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7537 skip("Not enough rights to perform tests\n");
7540 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7541 ok(delete_pf("msitest\\augustus", TRUE
), "File installed\n");
7542 ok(delete_pf("msitest", FALSE
), "File installed\n");
7545 DeleteFile(msifile
);
7546 DeleteFile("msitest\\augustus");
7547 RemoveDirectory("msitest");
7550 static void test_installstate(void)
7554 if (is_process_limited())
7556 skip("process is limited\n");
7560 CreateDirectoryA("msitest", NULL
);
7561 create_file("msitest\\alpha", 500);
7562 create_file("msitest\\beta", 500);
7563 create_file("msitest\\gamma", 500);
7564 create_file("msitest\\theta", 500);
7565 create_file("msitest\\delta", 500);
7566 create_file("msitest\\epsilon", 500);
7567 create_file("msitest\\zeta", 500);
7568 create_file("msitest\\iota", 500);
7569 create_file("msitest\\eta", 500);
7570 create_file("msitest\\kappa", 500);
7571 create_file("msitest\\lambda", 500);
7572 create_file("msitest\\mu", 500);
7574 create_database(msifile
, is_tables
, sizeof(is_tables
) / sizeof(msi_table
));
7576 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7578 r
= MsiInstallProductA(msifile
, NULL
);
7579 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
7581 skip("Not enough rights to perform tests\n");
7584 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7585 ok(delete_pf("msitest\\alpha", TRUE
), "File not installed\n");
7586 ok(!delete_pf("msitest\\beta", TRUE
), "File installed\n");
7587 ok(delete_pf("msitest\\gamma", TRUE
), "File not installed\n");
7588 ok(delete_pf("msitest\\theta", TRUE
), "File not installed\n");
7589 ok(!delete_pf("msitest\\delta", TRUE
), "File installed\n");
7590 ok(!delete_pf("msitest\\epsilon", TRUE
), "File installed\n");
7591 ok(!delete_pf("msitest\\zeta", TRUE
), "File installed\n");
7592 ok(!delete_pf("msitest\\iota", TRUE
), "File installed\n");
7593 ok(!delete_pf("msitest\\eta", TRUE
), "File installed\n");
7594 ok(!delete_pf("msitest\\kappa", TRUE
), "File installed\n");
7595 ok(!delete_pf("msitest\\lambda", TRUE
), "File installed\n");
7596 ok(!delete_pf("msitest\\mu", TRUE
), "File installed\n");
7597 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7599 r
= MsiInstallProductA(msifile
, "ADDLOCAL=\"one,two,three,four\"");
7600 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7601 ok(delete_pf("msitest\\alpha", TRUE
), "File not installed\n");
7602 ok(!delete_pf("msitest\\beta", TRUE
), "File installed\n");
7603 ok(delete_pf("msitest\\gamma", TRUE
), "File not installed\n");
7604 ok(delete_pf("msitest\\theta", TRUE
), "File not installed\n");
7605 ok(!delete_pf("msitest\\delta", TRUE
), "File installed\n");
7606 ok(delete_pf("msitest\\epsilon", TRUE
), "File not installed\n");
7607 ok(delete_pf("msitest\\zeta", TRUE
), "File not installed\n");
7608 ok(!delete_pf("msitest\\iota", TRUE
), "File installed\n");
7609 ok(delete_pf("msitest\\eta", TRUE
), "File not installed\n");
7610 ok(!delete_pf("msitest\\kappa", TRUE
), "File installed\n");
7611 ok(!delete_pf("msitest\\lambda", TRUE
), "File installed\n");
7612 ok(!delete_pf("msitest\\mu", TRUE
), "File installed\n");
7613 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7615 r
= MsiInstallProductA(msifile
, "ADDSOURCE=\"one,two,three,four\"");
7616 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7617 ok(delete_pf("msitest\\alpha", TRUE
), "File not installed\n");
7618 ok(!delete_pf("msitest\\beta", TRUE
), "File installed\n");
7619 ok(!delete_pf("msitest\\gamma", TRUE
), "File installed\n");
7620 ok(delete_pf("msitest\\theta", TRUE
), "File not installed\n");
7621 ok(!delete_pf("msitest\\delta", TRUE
), "File installed\n");
7622 ok(!delete_pf("msitest\\epsilon", TRUE
), "File installed\n");
7623 ok(delete_pf("msitest\\zeta", TRUE
), "File not installed\n");
7624 ok(!delete_pf("msitest\\iota", TRUE
), "File installed\n");
7625 ok(!delete_pf("msitest\\eta", TRUE
), "File installed\n");
7626 ok(!delete_pf("msitest\\kappa", TRUE
), "File installed\n");
7627 ok(!delete_pf("msitest\\lambda", TRUE
), "File installed\n");
7628 ok(!delete_pf("msitest\\mu", TRUE
), "File installed\n");
7629 ok(delete_pf("msitest", FALSE
), "File not installed\n");
7631 r
= MsiInstallProductA(msifile
, "REMOVE=\"one,two,three,four\"");
7632 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
7633 ok(!delete_pf("msitest\\alpha", TRUE
), "File installed\n");
7634 ok(!delete_pf("msitest\\beta", TRUE
), "File installed\n");
7635 ok(!delete_pf("msitest\\gamma", TRUE
), "File installed\n");
7636 ok(!delete_pf("msitest\\theta", TRUE
), "File installed\n");
7637 ok(!delete_pf("msitest\\delta", TRUE
), "File installed\n");
7638 ok(!delete_pf("msitest\\epsilon", TRUE
), "File installed\n");
7639 ok(!delete_pf("msitest\\zeta", TRUE
), "File installed\n");
7640 ok(!delete_pf("msitest\\iota", TRUE
), "File installed\n");
7641 ok(!delete_pf("msitest\\eta", TRUE
), "File installed\n");
7642 ok(!delete_pf("msitest\\kappa", TRUE
), "File installed\n");
7643 ok(!delete_pf("msitest\\lambda", TRUE
), "File installed\n");
7644 ok(!delete_pf("msitest\\mu", TRUE
), "File installed\n");
7645 ok(!delete_pf("msitest", FALSE
), "File installed\n");
7648 DeleteFile(msifile
);
7649 DeleteFile("msitest\\alpha");
7650 DeleteFile("msitest\\beta");
7651 DeleteFile("msitest\\gamma");
7652 DeleteFile("msitest\\theta");
7653 DeleteFile("msitest\\delta");
7654 DeleteFile("msitest\\epsilon");
7655 DeleteFile("msitest\\zeta");
7656 DeleteFile("msitest\\iota");
7657 DeleteFile("msitest\\eta");
7658 DeleteFile("msitest\\kappa");
7659 DeleteFile("msitest\\lambda");
7660 DeleteFile("msitest\\mu");
7661 RemoveDirectory("msitest");
7664 struct sourcepathmap
7666 BOOL sost
; /* shortone\shorttwo */
7667 BOOL solt
; /* shortone\longtwo */
7668 BOOL lost
; /* longone\shorttwo */
7669 BOOL lolt
; /* longone\longtwo */
7670 BOOL soste
; /* shortone\shorttwo source exists */
7671 BOOL solte
; /* shortone\longtwo source exists */
7672 BOOL loste
; /* longone\shorttwo source exists */
7673 BOOL lolte
; /* longone\longtwo source exists */
7678 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7679 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7680 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7681 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7682 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7683 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7684 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7685 {TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7686 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7687 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7688 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7689 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7690 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7691 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7692 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7693 {TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7694 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7695 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7696 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7697 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7698 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7699 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7700 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7701 {TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7702 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7703 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7704 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7705 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7706 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7707 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7708 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7709 {TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7710 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7711 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7712 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7713 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7714 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7715 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7716 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7717 {TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7718 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7719 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7720 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7721 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7722 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7723 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7724 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7725 {TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7726 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7727 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7728 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7729 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7730 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7731 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7732 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7733 {TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7734 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7735 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7736 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7737 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7738 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7739 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7740 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7741 {TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7742 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7743 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7744 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7745 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7746 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7747 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7748 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7749 {TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7750 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7751 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7752 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7753 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7754 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7755 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7756 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7757 {TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7758 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7759 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7760 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7761 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7762 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7763 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7764 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7765 {TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7766 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7767 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7768 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7769 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7770 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7771 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7772 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7773 {TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7774 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7775 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7776 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7777 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7778 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7779 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7780 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7781 {TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7782 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7783 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7784 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7785 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7786 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7787 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7788 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7789 {TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7790 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7791 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7792 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7793 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7794 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7795 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7796 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7797 {TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7798 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7799 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7800 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7801 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7802 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7803 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7804 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7805 {TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7806 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7807 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7808 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7809 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7810 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7811 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7812 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7813 {FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7814 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7815 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7816 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7817 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7818 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7819 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7820 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7821 {FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7822 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7823 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7824 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7825 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7826 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7827 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7828 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7829 {FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7830 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7831 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7832 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7833 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7834 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7835 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7836 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7837 {FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7838 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7839 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7840 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7841 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7842 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7843 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7844 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7845 {FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7846 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7847 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7848 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7849 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7850 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7851 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7852 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7853 {FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7854 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7855 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7856 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7857 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7858 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7859 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7860 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7861 {FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7862 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7863 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7864 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7865 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7866 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7867 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7868 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7869 {FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7870 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7871 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7872 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7873 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7874 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7875 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7876 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7877 {FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7878 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7879 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7880 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7881 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7882 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7883 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7884 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7885 {FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7886 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7887 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7888 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7889 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7890 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7891 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7892 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7893 {FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7894 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7895 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7896 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7897 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7898 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7899 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7900 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7901 {FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7902 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7903 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7904 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7905 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7906 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7907 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7908 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7909 {FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7910 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7911 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7912 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7913 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7914 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_SUCCESS
, 200},
7915 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7916 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_SUCCESS
, 200},
7917 {FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7918 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7919 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7920 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7921 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7922 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7923 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7924 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7925 {FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7926 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7927 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7928 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7929 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7930 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7931 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7932 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, TRUE
, ERROR_INSTALL_FAILURE
, 0},
7933 {FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, FALSE
, ERROR_INSTALL_FAILURE
, 0},
7936 static DWORD
get_pf_file_size(LPCSTR file
)
7938 CHAR path
[MAX_PATH
];
7942 lstrcpyA(path
, PROG_FILES_DIR
);
7943 lstrcatA(path
, "\\");
7944 lstrcatA(path
, file
);
7946 hfile
= CreateFileA(path
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, OPEN_EXISTING
, 0, NULL
);
7947 if (hfile
== INVALID_HANDLE_VALUE
)
7948 return INVALID_FILE_SIZE
;
7950 size
= GetFileSize(hfile
, NULL
);
7955 static void test_sourcepath(void)
7959 if (!winetest_interactive
)
7961 skip("Run in interactive mode to run source path tests.\n");
7965 create_database(msifile
, sp_tables
, sizeof(sp_tables
) / sizeof(msi_table
));
7967 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
7969 for (i
= 0; i
< sizeof(spmap
) / sizeof(spmap
[0]); i
++)
7973 CreateDirectoryA("shortone", NULL
);
7974 CreateDirectoryA("shortone\\shorttwo", NULL
);
7979 CreateDirectoryA("shortone", NULL
);
7980 CreateDirectoryA("shortone\\longtwo", NULL
);
7985 CreateDirectoryA("longone", NULL
);
7986 CreateDirectoryA("longone\\shorttwo", NULL
);
7991 CreateDirectoryA("longone", NULL
);
7992 CreateDirectoryA("longone\\longtwo", NULL
);
7996 create_file("shortone\\shorttwo\\augustus", 50);
7998 create_file("shortone\\longtwo\\augustus", 100);
8000 create_file("longone\\shorttwo\\augustus", 150);
8002 create_file("longone\\longtwo\\augustus", 200);
8004 r
= MsiInstallProductA(msifile
, NULL
);
8005 ok(r
== spmap
[i
].err
, "%d: Expected %d, got %d\n", i
, spmap
[i
].err
, r
);
8006 ok(get_pf_file_size("msitest\\augustus") == spmap
[i
].size
,
8007 "%d: Expected %d, got %d\n", i
, spmap
[i
].size
,
8008 get_pf_file_size("msitest\\augustus"));
8010 if (r
== ERROR_SUCCESS
)
8012 ok(delete_pf("msitest\\augustus", TRUE
), "%d: File not installed\n", i
);
8013 ok(delete_pf("msitest", FALSE
), "%d: File not installed\n", i
);
8017 ok(!delete_pf("msitest\\augustus", TRUE
), "%d: File installed\n", i
);
8018 todo_wine
ok(!delete_pf("msitest", FALSE
), "%d: File installed\n", i
);
8021 DeleteFileA("shortone\\shorttwo\\augustus");
8022 DeleteFileA("shortone\\longtwo\\augustus");
8023 DeleteFileA("longone\\shorttwo\\augustus");
8024 DeleteFileA("longone\\longtwo\\augustus");
8025 RemoveDirectoryA("shortone\\shorttwo");
8026 RemoveDirectoryA("shortone\\longtwo");
8027 RemoveDirectoryA("longone\\shorttwo");
8028 RemoveDirectoryA("longone\\longtwo");
8029 RemoveDirectoryA("shortone");
8030 RemoveDirectoryA("longone");
8033 DeleteFileA(msifile
);
8036 static void test_MsiConfigureProductEx(void)
8042 CHAR keypath
[MAX_PATH
* 2], localpack
[MAX_PATH
];
8043 REGSAM access
= KEY_ALL_ACCESS
;
8048 win_skip("Different registry keys on Win9x and WinMe\n");
8051 if (is_process_limited())
8053 skip("process is limited\n");
8057 CreateDirectoryA("msitest", NULL
);
8058 create_file("msitest\\hydrogen", 500);
8059 create_file("msitest\\helium", 500);
8060 create_file("msitest\\lithium", 500);
8062 create_database(msifile
, mcp_tables
, sizeof(mcp_tables
) / sizeof(msi_table
));
8064 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
8065 access
|= KEY_WOW64_64KEY
;
8067 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8069 /* NULL szProduct */
8070 r
= MsiConfigureProductExA(NULL
, INSTALLLEVEL_DEFAULT
,
8071 INSTALLSTATE_DEFAULT
, "PROPVAR=42");
8072 ok(r
== ERROR_INVALID_PARAMETER
,
8073 "Expected ERROR_INVALID_PARAMETER, got %d\n", r
);
8075 /* empty szProduct */
8076 r
= MsiConfigureProductExA("", INSTALLLEVEL_DEFAULT
,
8077 INSTALLSTATE_DEFAULT
, "PROPVAR=42");
8078 ok(r
== ERROR_INVALID_PARAMETER
,
8079 "Expected ERROR_INVALID_PARAMETER, got %d\n", r
);
8081 /* garbage szProduct */
8082 r
= MsiConfigureProductExA("garbage", INSTALLLEVEL_DEFAULT
,
8083 INSTALLSTATE_DEFAULT
, "PROPVAR=42");
8084 ok(r
== ERROR_INVALID_PARAMETER
,
8085 "Expected ERROR_INVALID_PARAMETER, got %d\n", r
);
8087 /* guid without brackets */
8088 r
= MsiConfigureProductExA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D",
8089 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
,
8091 ok(r
== ERROR_INVALID_PARAMETER
,
8092 "Expected ERROR_INVALID_PARAMETER, got %d\n", r
);
8094 /* guid with brackets */
8095 r
= MsiConfigureProductExA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}",
8096 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
,
8098 ok(r
== ERROR_UNKNOWN_PRODUCT
,
8099 "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
8101 /* same length as guid, but random */
8102 r
= MsiConfigureProductExA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93",
8103 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
,
8105 ok(r
== ERROR_UNKNOWN_PRODUCT
,
8106 "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
8108 /* product not installed yet */
8109 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8110 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
,
8112 ok(r
== ERROR_UNKNOWN_PRODUCT
,
8113 "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r
);
8115 /* install the product, per-user unmanaged */
8116 r
= MsiInstallProductA(msifile
, "INSTALLLEVEL=10 PROPVAR=42");
8117 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8119 skip("Not enough rights to perform tests\n");
8122 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8123 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8124 ok(pf_exists("msitest\\helium"), "File not installed\n");
8125 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8126 ok(pf_exists("msitest"), "File not installed\n");
8128 /* product is installed per-user managed, remove it */
8129 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8130 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8132 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
8133 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not removed\n");
8134 ok(!delete_pf("msitest\\helium", TRUE
), "File not removed\n");
8135 ok(!delete_pf("msitest\\lithium", TRUE
), "File not removed\n");
8136 ok(!delete_pf("msitest", FALSE
), "Directory not removed\n");
8138 /* product has been removed */
8139 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8140 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
,
8142 ok(r
== ERROR_UNKNOWN_PRODUCT
,
8143 "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r
);
8145 /* install the product, machine */
8146 r
= MsiInstallProductA(msifile
, "ALLUSERS=1 INSTALLLEVEL=10 PROPVAR=42");
8147 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8148 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8149 ok(pf_exists("msitest\\helium"), "File not installed\n");
8150 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8151 ok(pf_exists("msitest"), "File not installed\n");
8153 /* product is installed machine, remove it */
8154 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8155 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8157 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
8158 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not removed\n");
8159 ok(!delete_pf("msitest\\helium", TRUE
), "File not removed\n");
8160 ok(!delete_pf("msitest\\lithium", TRUE
), "File not removed\n");
8161 ok(!delete_pf("msitest", FALSE
), "Directory not removed\n");
8163 /* product has been removed */
8164 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8165 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
,
8167 ok(r
== ERROR_UNKNOWN_PRODUCT
,
8168 "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r
);
8170 /* install the product, machine */
8171 r
= MsiInstallProductA(msifile
, "ALLUSERS=1 INSTALLLEVEL=10 PROPVAR=42");
8172 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8173 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8174 ok(pf_exists("msitest\\helium"), "File not installed\n");
8175 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8176 ok(pf_exists("msitest"), "File not installed\n");
8178 DeleteFileA(msifile
);
8180 /* local msifile is removed */
8181 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8182 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8184 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
8185 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not removed\n");
8186 ok(!delete_pf("msitest\\helium", TRUE
), "File not removed\n");
8187 ok(!delete_pf("msitest\\lithium", TRUE
), "File not removed\n");
8188 ok(!delete_pf("msitest", FALSE
), "Directory not removed\n");
8190 create_database(msifile
, mcp_tables
, sizeof(mcp_tables
) / sizeof(msi_table
));
8192 /* install the product, machine */
8193 r
= MsiInstallProductA(msifile
, "ALLUSERS=1 INSTALLLEVEL=10 PROPVAR=42");
8194 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8195 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8196 ok(pf_exists("msitest\\helium"), "File not installed\n");
8197 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8198 ok(pf_exists("msitest"), "File not installed\n");
8200 DeleteFileA(msifile
);
8202 lstrcpyA(keypath
, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\");
8203 lstrcatA(keypath
, "Installer\\UserData\\S-1-5-18\\Products\\");
8204 lstrcatA(keypath
, "84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties");
8206 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &props
);
8207 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8209 res
= RegSetValueExA(props
, "LocalPackage", 0, REG_SZ
,
8210 (const BYTE
*)"C:\\idontexist.msi", 18);
8211 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8213 /* LocalPackage is used to find the cached msi package */
8214 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8215 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8217 ok(r
== ERROR_INSTALL_SOURCE_ABSENT
,
8218 "Expected ERROR_INSTALL_SOURCE_ABSENT, got %d\n", r
);
8219 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8220 ok(pf_exists("msitest\\helium"), "File not installed\n");
8221 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8222 ok(pf_exists("msitest"), "File not installed\n");
8225 create_database(msifile
, mcp_tables
, sizeof(mcp_tables
) / sizeof(msi_table
));
8227 /* LastUsedSource (local msi package) can be used as a last resort */
8228 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8229 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8231 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
8232 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not removed\n");
8233 ok(!delete_pf("msitest\\helium", TRUE
), "File not removed\n");
8234 ok(!delete_pf("msitest\\lithium", TRUE
), "File not removed\n");
8235 ok(!delete_pf("msitest", FALSE
), "Directory not removed\n");
8237 /* install the product, machine */
8238 r
= MsiInstallProductA(msifile
, "ALLUSERS=1 INSTALLLEVEL=10 PROPVAR=42");
8239 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8240 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8241 ok(pf_exists("msitest\\helium"), "File not installed\n");
8242 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8243 ok(pf_exists("msitest"), "File not installed\n");
8245 lstrcpyA(keypath
, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\");
8246 lstrcatA(keypath
, "Installer\\UserData\\S-1-5-18\\Products\\");
8247 lstrcatA(keypath
, "84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties");
8249 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &props
);
8250 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8252 res
= RegSetValueExA(props
, "LocalPackage", 0, REG_SZ
,
8253 (const BYTE
*)"C:\\idontexist.msi", 18);
8254 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8256 lstrcpyA(keypath
, "SOFTWARE\\Classes\\Installer\\Products\\");
8257 lstrcatA(keypath
, "84A88FD7F6998CE40A22FB59F6B9C2BB\\SourceList");
8259 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, keypath
, 0, access
, &source
);
8260 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8264 res
= RegQueryValueExA(source
, "PackageName", NULL
, &type
,
8265 (LPBYTE
)localpack
, &size
);
8266 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8268 res
= RegSetValueExA(source
, "PackageName", 0, REG_SZ
,
8269 (const BYTE
*)"idontexist.msi", 15);
8270 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8272 /* SourceList is altered */
8273 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8274 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8276 ok(r
== ERROR_INSTALL_SOURCE_ABSENT
,
8277 "Expected ERROR_INSTALL_SOURCE_ABSENT, got %d\n", r
);
8278 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8279 ok(pf_exists("msitest\\helium"), "File not installed\n");
8280 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8281 ok(pf_exists("msitest"), "File not installed\n");
8283 /* restore the SourceList */
8284 res
= RegSetValueExA(source
, "PackageName", 0, REG_SZ
,
8285 (const BYTE
*)localpack
, lstrlenA(localpack
) + 1);
8286 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8288 /* finally remove the product */
8289 r
= MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}",
8290 INSTALLLEVEL_DEFAULT
, INSTALLSTATE_ABSENT
,
8292 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", r
);
8293 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not removed\n");
8294 ok(!delete_pf("msitest\\helium", TRUE
), "File not removed\n");
8295 ok(!delete_pf("msitest\\lithium", TRUE
), "File not removed\n");
8296 ok(!delete_pf("msitest", FALSE
), "File not removed\n");
8298 RegCloseKey(source
);
8302 DeleteFileA("msitest\\hydrogen");
8303 DeleteFileA("msitest\\helium");
8304 DeleteFileA("msitest\\lithium");
8305 RemoveDirectoryA("msitest");
8306 DeleteFileA(msifile
);
8309 static void test_missingcomponent(void)
8313 if (is_process_limited())
8315 skip("process is limited\n");
8319 CreateDirectoryA("msitest", NULL
);
8320 create_file("msitest\\hydrogen", 500);
8321 create_file("msitest\\helium", 500);
8322 create_file("msitest\\lithium", 500);
8323 create_file("beryllium", 500);
8325 create_database(msifile
, mcomp_tables
, sizeof(mcomp_tables
) / sizeof(msi_table
));
8327 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8329 r
= MsiInstallProductA(msifile
, "INSTALLLEVEL=10 PROPVAR=42");
8330 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8332 skip("Not enough rights to perform tests\n");
8335 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8336 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
8337 ok(pf_exists("msitest\\helium"), "File not installed\n");
8338 ok(pf_exists("msitest\\lithium"), "File not installed\n");
8339 ok(!pf_exists("msitest\\beryllium"), "File installed\n");
8340 ok(pf_exists("msitest"), "File not installed\n");
8342 r
= MsiInstallProductA(msifile
, "REMOVE=ALL INSTALLLEVEL=10 PROPVAR=42");
8343 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8344 ok(!delete_pf("msitest\\hydrogen", TRUE
), "File not removed\n");
8345 ok(!delete_pf("msitest\\helium", TRUE
), "File not removed\n");
8346 ok(!delete_pf("msitest\\lithium", TRUE
), "File not removed\n");
8347 ok(!pf_exists("msitest\\beryllium"), "File installed\n");
8348 ok(!delete_pf("msitest", FALSE
), "Directory not removed\n");
8351 DeleteFileA(msifile
);
8352 DeleteFileA("msitest\\hydrogen");
8353 DeleteFileA("msitest\\helium");
8354 DeleteFileA("msitest\\lithium");
8355 DeleteFileA("beryllium");
8356 RemoveDirectoryA("msitest");
8359 static void test_sourcedirprop(void)
8362 CHAR props
[MAX_PATH
];
8364 if (is_process_limited())
8366 skip("process is limited\n");
8370 CreateDirectoryA("msitest", NULL
);
8371 create_file("msitest\\augustus", 500);
8373 create_database(msifile
, ca51_tables
, sizeof(ca51_tables
) / sizeof(msi_table
));
8375 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8377 r
= MsiInstallProductA(msifile
, NULL
);
8378 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8380 skip("Not enough rights to perform tests\n");
8383 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8384 ok(delete_pf("msitest\\augustus", TRUE
), "File installed\n");
8385 ok(delete_pf("msitest", FALSE
), "File installed\n");
8387 DeleteFile("msitest\\augustus");
8388 RemoveDirectory("msitest");
8390 CreateDirectoryA("altsource", NULL
);
8391 CreateDirectoryA("altsource\\msitest", NULL
);
8392 create_file("altsource\\msitest\\augustus", 500);
8394 sprintf(props
, "SRCDIR=%s\\altsource\\", CURR_DIR
);
8396 r
= MsiInstallProductA(msifile
, props
);
8397 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8398 ok(delete_pf("msitest\\augustus", TRUE
), "File installed\n");
8399 ok(delete_pf("msitest", FALSE
), "File installed\n");
8401 DeleteFile("altsource\\msitest\\augustus");
8402 RemoveDirectory("altsource\\msitest");
8403 RemoveDirectory("altsource");
8406 DeleteFile("msitest\\augustus");
8407 RemoveDirectory("msitest");
8408 DeleteFile(msifile
);
8411 static void test_adminimage(void)
8415 if (is_process_limited())
8417 skip("process is limited\n");
8421 CreateDirectoryA("msitest", NULL
);
8422 CreateDirectoryA("msitest\\first", NULL
);
8423 CreateDirectoryA("msitest\\second", NULL
);
8424 CreateDirectoryA("msitest\\cabout", NULL
);
8425 CreateDirectoryA("msitest\\cabout\\new", NULL
);
8426 create_file("msitest\\one.txt", 100);
8427 create_file("msitest\\first\\two.txt", 100);
8428 create_file("msitest\\second\\three.txt", 100);
8429 create_file("msitest\\cabout\\four.txt", 100);
8430 create_file("msitest\\cabout\\new\\five.txt", 100);
8431 create_file("msitest\\filename", 100);
8432 create_file("msitest\\service.exe", 100);
8434 create_database_wordcount(msifile
, ai_tables
,
8435 sizeof(ai_tables
) / sizeof(msi_table
),
8436 msidbSumInfoSourceTypeAdminImage
);
8438 r
= MsiInstallProductA(msifile
, NULL
);
8439 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8441 skip("Not enough rights to perform tests\n");
8444 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8446 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8447 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8448 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8449 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8450 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8451 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8452 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8453 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8454 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
8455 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8456 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8457 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8460 DeleteFileA("msifile");
8461 DeleteFileA("msitest\\cabout\\new\\five.txt");
8462 DeleteFileA("msitest\\cabout\\four.txt");
8463 DeleteFileA("msitest\\second\\three.txt");
8464 DeleteFileA("msitest\\first\\two.txt");
8465 DeleteFileA("msitest\\one.txt");
8466 DeleteFileA("msitest\\service.exe");
8467 DeleteFileA("msitest\\filename");
8468 RemoveDirectoryA("msitest\\cabout\\new");
8469 RemoveDirectoryA("msitest\\cabout");
8470 RemoveDirectoryA("msitest\\second");
8471 RemoveDirectoryA("msitest\\first");
8472 RemoveDirectoryA("msitest");
8475 static void test_propcase(void)
8479 if (is_process_limited())
8481 skip("process is limited\n");
8485 CreateDirectoryA("msitest", NULL
);
8486 create_file("msitest\\augustus", 500);
8488 create_database(msifile
, pc_tables
, sizeof(pc_tables
) / sizeof(msi_table
));
8490 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8492 r
= MsiInstallProductA(msifile
, "MyProp=42");
8493 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8495 skip("Not enough rights to perform tests\n");
8498 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8499 ok(delete_pf("msitest\\augustus", TRUE
), "File not installed\n");
8500 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8503 DeleteFile(msifile
);
8504 DeleteFile("msitest\\augustus");
8505 RemoveDirectory("msitest");
8508 static void test_int_widths( void )
8510 static const char int0
[] = "int0\ni0\nint0\tint0\n1";
8511 static const char int1
[] = "int1\ni1\nint1\tint1\n1";
8512 static const char int2
[] = "int2\ni2\nint2\tint2\n1";
8513 static const char int3
[] = "int3\ni3\nint3\tint3\n1";
8514 static const char int4
[] = "int4\ni4\nint4\tint4\n1";
8515 static const char int5
[] = "int5\ni5\nint5\tint5\n1";
8516 static const char int8
[] = "int8\ni8\nint8\tint8\n1";
8526 { int0
, sizeof(int0
) - 1, ERROR_SUCCESS
},
8527 { int1
, sizeof(int1
) - 1, ERROR_SUCCESS
},
8528 { int2
, sizeof(int2
) - 1, ERROR_SUCCESS
},
8529 { int3
, sizeof(int3
) - 1, ERROR_FUNCTION_FAILED
},
8530 { int4
, sizeof(int4
) - 1, ERROR_SUCCESS
},
8531 { int5
, sizeof(int5
) - 1, ERROR_FUNCTION_FAILED
},
8532 { int8
, sizeof(int8
) - 1, ERROR_FUNCTION_FAILED
}
8535 char tmpdir
[MAX_PATH
], msitable
[MAX_PATH
], msidb
[MAX_PATH
];
8539 GetTempPathA(MAX_PATH
, tmpdir
);
8540 CreateDirectoryA(tmpdir
, NULL
);
8542 strcpy(msitable
, tmpdir
);
8543 strcat(msitable
, "\\msitable.idt");
8545 strcpy(msidb
, tmpdir
);
8546 strcat(msidb
, "\\msitest.msi");
8548 r
= MsiOpenDatabaseA(msidb
, MSIDBOPEN_CREATE
, &db
);
8549 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8551 for (i
= 0; i
< sizeof(tests
)/sizeof(tests
[0]); i
++)
8553 write_file(msitable
, tests
[i
].data
, tests
[i
].size
);
8555 r
= MsiDatabaseImportA(db
, tmpdir
, "msitable.idt");
8556 ok(r
== tests
[i
].ret
, " %u expected %u, got %u\n", i
, tests
[i
].ret
, r
);
8558 r
= MsiDatabaseCommit(db
);
8559 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8560 DeleteFileA(msitable
);
8565 RemoveDirectoryA(tmpdir
);
8568 static void test_shortcut(void)
8573 if (is_process_limited())
8575 skip("process is limited\n");
8579 create_test_files();
8580 create_database(msifile
, sc_tables
, sizeof(sc_tables
) / sizeof(msi_table
));
8582 r
= MsiInstallProductA(msifile
, NULL
);
8583 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8585 skip("Not enough rights to perform tests\n");
8588 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8590 hr
= CoInitializeEx(NULL
, COINIT_MULTITHREADED
);
8591 ok(SUCCEEDED(hr
), "CoInitialize failed 0x%08x\n", hr
);
8593 r
= MsiInstallProductA(msifile
, NULL
);
8594 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8598 hr
= CoInitializeEx(NULL
, COINIT_APARTMENTTHREADED
);
8599 ok(SUCCEEDED(hr
), "CoInitialize failed 0x%08x\n", hr
);
8601 r
= MsiInstallProductA(msifile
, NULL
);
8602 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8606 delete_pf("msitest\\cabout\\new\\five.txt", TRUE
);
8607 delete_pf("msitest\\cabout\\new", FALSE
);
8608 delete_pf("msitest\\cabout\\four.txt", TRUE
);
8609 delete_pf("msitest\\cabout", FALSE
);
8610 delete_pf("msitest\\changed\\three.txt", TRUE
);
8611 delete_pf("msitest\\changed", FALSE
);
8612 delete_pf("msitest\\first\\two.txt", TRUE
);
8613 delete_pf("msitest\\first", FALSE
);
8614 delete_pf("msitest\\filename", TRUE
);
8615 delete_pf("msitest\\one.txt", TRUE
);
8616 delete_pf("msitest\\service.exe", TRUE
);
8617 delete_pf("msitest\\Shortcut.lnk", TRUE
);
8618 delete_pf("msitest", FALSE
);
8621 delete_test_files();
8622 DeleteFile(msifile
);
8625 static void test_envvar(void)
8636 win_skip("Environment variables are handled differently on Win9x and WinMe\n");
8639 if (is_process_limited())
8641 skip("process is limited\n");
8645 create_test_files();
8646 create_database(msifile
, env_tables
, sizeof(env_tables
) / sizeof(msi_table
));
8648 res
= RegCreateKeyExA(HKEY_CURRENT_USER
, "Environment", 0, NULL
, 0, KEY_ALL_ACCESS
, NULL
, &env
, NULL
);
8649 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8651 res
= RegSetValueExA(env
, "MSITESTVAR1", 0, REG_SZ
, (const BYTE
*)"0", 2);
8652 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8654 res
= RegSetValueExA(env
, "MSITESTVAR2", 0, REG_SZ
, (const BYTE
*)"0", 2);
8655 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8657 r
= MsiInstallProductA(msifile
, NULL
);
8658 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8660 skip("Not enough rights to perform tests\n");
8663 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8666 size
= sizeof(buffer
);
8668 res
= RegQueryValueExA(env
, "MSITESTVAR1", NULL
, &type
, (LPBYTE
)buffer
, &size
);
8669 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8670 ok(type
== REG_SZ
, "Expected REG_SZ, got %u\n", type
);
8671 ok(!lstrcmp(buffer
, "1"), "Expected \"1\", got %s\n", buffer
);
8673 res
= RegDeleteValueA(env
, "MSITESTVAR1");
8674 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8677 size
= sizeof(buffer
);
8679 res
= RegQueryValueExA(env
, "MSITESTVAR2", NULL
, &type
, (LPBYTE
)buffer
, &size
);
8680 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8681 ok(type
== REG_SZ
, "Expected REG_SZ, got %u\n", type
);
8682 ok(!lstrcmp(buffer
, "1"), "Expected \"1\", got %s\n", buffer
);
8684 res
= RegDeleteValueA(env
, "MSITESTVAR2");
8685 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8687 res
= RegDeleteValueA(env
, "MSITESTVAR3");
8688 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8690 res
= RegDeleteValueA(env
, "MSITESTVAR4");
8691 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
8693 res
= RegDeleteValueA(env
, "MSITESTVAR5");
8694 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
8696 res
= RegDeleteValueA(env
, "MSITESTVAR6");
8697 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
8699 res
= RegDeleteValueA(env
, "MSITESTVAR7");
8700 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
8702 res
= RegDeleteValueA(env
, "MSITESTVAR8");
8703 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
8705 res
= RegDeleteValueA(env
, "MSITESTVAR9");
8706 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
8708 res
= RegDeleteValueA(env
, "MSITESTVAR10");
8709 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
8712 while (environment_dat_results
[(i
-11)]) {
8714 sprintf(name
, "MSITESTVAR%d", i
);
8717 size
= sizeof(buffer
);
8719 res
= RegQueryValueExA(env
, name
, NULL
, &type
, (LPBYTE
)buffer
, &size
);
8720 ok(res
== ERROR_SUCCESS
, "%d: Expected ERROR_SUCCESS, got %d\n", i
, res
);
8721 ok(type
== REG_SZ
, "%d: Expected REG_SZ, got %u\n", i
, type
);
8722 ok(!lstrcmp(buffer
, environment_dat_results
[(i
-11)]), "%d: Expected %s, got %s\n",
8723 i
, environment_dat_results
[(i
-11)], buffer
);
8725 res
= RegDeleteValueA(env
, name
);
8726 ok(res
== ERROR_SUCCESS
, "%d: Expected ERROR_SUCCESS, got %d\n", i
, res
);
8730 delete_pf("msitest\\cabout\\new\\five.txt", TRUE
);
8731 delete_pf("msitest\\cabout\\new", FALSE
);
8732 delete_pf("msitest\\cabout\\four.txt", TRUE
);
8733 delete_pf("msitest\\cabout", FALSE
);
8734 delete_pf("msitest\\changed\\three.txt", TRUE
);
8735 delete_pf("msitest\\changed", FALSE
);
8736 delete_pf("msitest\\first\\two.txt", TRUE
);
8737 delete_pf("msitest\\first", FALSE
);
8738 delete_pf("msitest\\filename", TRUE
);
8739 delete_pf("msitest\\one.txt", TRUE
);
8740 delete_pf("msitest\\service.exe", TRUE
);
8741 delete_pf("msitest", FALSE
);
8744 RegDeleteValueA(env
, "MSITESTVAR1");
8745 RegDeleteValueA(env
, "MSITESTVAR2");
8748 delete_test_files();
8749 DeleteFile(msifile
);
8752 static void test_preselected(void)
8756 if (is_process_limited())
8758 skip("process is limited\n");
8762 create_test_files();
8763 create_database(msifile
, ps_tables
, sizeof(ps_tables
) / sizeof(msi_table
));
8765 r
= MsiInstallProductA(msifile
, "ADDLOCAL=One");
8766 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8768 skip("Not enough rights to perform tests\n");
8771 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8773 ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File installed\n");
8774 ok(!delete_pf("msitest\\cabout\\new", FALSE
), "File installed\n");
8775 ok(!delete_pf("msitest\\cabout\\four.txt", TRUE
), "File installed\n");
8776 ok(!delete_pf("msitest\\cabout", FALSE
), "File installed\n");
8777 ok(!delete_pf("msitest\\changed\\three.txt", TRUE
), "File installed\n");
8778 ok(!delete_pf("msitest\\changed", FALSE
), "File installed\n");
8779 ok(!delete_pf("msitest\\first\\two.txt", TRUE
), "File installed\n");
8780 ok(!delete_pf("msitest\\first", FALSE
), "File installed\n");
8781 ok(!delete_pf("msitest\\filename", TRUE
), "File installed\n");
8782 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
8783 ok(!delete_pf("msitest\\service.exe", TRUE
), "File installed\n");
8784 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8786 r
= MsiInstallProductA(msifile
, NULL
);
8787 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8789 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8790 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8791 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8792 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8793 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8794 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8795 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8796 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8797 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8798 ok(!delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
8799 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8800 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8803 delete_test_files();
8804 DeleteFile(msifile
);
8807 static void test_installed_prop(void)
8809 static char prodcode
[] = "{7df88a48-996f-4ec8-a022-bf956f9b2cbb}";
8812 if (is_process_limited())
8814 skip("process is limited\n");
8818 create_test_files();
8819 create_database(msifile
, ip_tables
, sizeof(ip_tables
) / sizeof(msi_table
));
8821 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8823 r
= MsiInstallProductA(msifile
, "FULL=1");
8824 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8826 skip("Not enough rights to perform tests\n");
8829 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8831 r
= MsiInstallProductA(msifile
, "FULL=1");
8832 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
8834 r
= MsiConfigureProductExA(prodcode
, INSTALLLEVEL_DEFAULT
, INSTALLSTATE_DEFAULT
, "FULL=1");
8835 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
8837 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8838 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8839 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8840 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8841 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8842 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8843 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8844 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8845 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8846 ok(delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
8847 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8848 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8850 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
8851 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8854 delete_test_files();
8855 DeleteFile(msifile
);
8858 static void test_allusers_prop(void)
8862 if (is_process_limited())
8864 skip("process is limited\n");
8868 create_test_files();
8869 create_database(msifile
, aup_tables
, sizeof(aup_tables
) / sizeof(msi_table
));
8871 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8873 /* ALLUSERS property unset */
8874 r
= MsiInstallProductA(msifile
, "FULL=1");
8875 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
8877 skip("Not enough rights to perform tests\n");
8880 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8882 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8883 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8884 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8885 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8886 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8887 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8888 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8889 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8890 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8891 ok(delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
8892 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8893 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8895 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
8896 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8898 delete_test_files();
8900 create_test_files();
8901 create_database(msifile
, aup2_tables
, sizeof(aup2_tables
) / sizeof(msi_table
));
8903 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8905 /* ALLUSERS property set to 1 */
8906 r
= MsiInstallProductA(msifile
, "FULL=1");
8907 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8909 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8910 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8911 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8912 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8913 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8914 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8915 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8916 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8917 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8918 ok(delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
8919 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8920 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8922 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
8923 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8925 delete_test_files();
8927 create_test_files();
8928 create_database(msifile
, aup3_tables
, sizeof(aup3_tables
) / sizeof(msi_table
));
8930 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8932 /* ALLUSERS property set to 2 */
8933 r
= MsiInstallProductA(msifile
, "FULL=1");
8934 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8936 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8937 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8938 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8939 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8940 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8941 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8942 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8943 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8944 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8945 ok(delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
8946 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8947 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8949 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
8950 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8952 delete_test_files();
8954 create_test_files();
8955 create_database(msifile
, aup4_tables
, sizeof(aup4_tables
) / sizeof(msi_table
));
8957 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
8959 /* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */
8960 r
= MsiInstallProductA(msifile
, "FULL=1");
8961 if (r
== ERROR_SUCCESS
)
8964 win_skip("Win9x and WinMe act differently with respect to ALLUSERS\n");
8966 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
8967 ok(delete_pf("msitest\\cabout\\new", FALSE
), "File not installed\n");
8968 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
8969 ok(delete_pf("msitest\\cabout", FALSE
), "File not installed\n");
8970 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
8971 ok(delete_pf("msitest\\changed", FALSE
), "File not installed\n");
8972 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
8973 ok(delete_pf("msitest\\first", FALSE
), "File not installed\n");
8974 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
8975 ok(delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
8976 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
8977 ok(delete_pf("msitest", FALSE
), "File not installed\n");
8979 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
8980 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
8982 delete_test_files();
8985 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
8988 delete_test_files();
8989 DeleteFile(msifile
);
8992 static char session_manager
[] = "System\\CurrentControlSet\\Control\\Session Manager";
8993 static char rename_ops
[] = "PendingFileRenameOperations";
8995 static void process_pending_renames(HKEY hkey
)
8997 char *buf
, *src
, *dst
, *buf2
, *buf2ptr
;
8998 DWORD size
, buf2len
= 0;
9002 ret
= RegQueryValueExA(hkey
, rename_ops
, NULL
, NULL
, NULL
, &size
);
9003 buf
= HeapAlloc(GetProcessHeap(), 0, size
);
9004 buf2ptr
= buf2
= HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY
, size
);
9007 ret
= RegQueryValueExA(hkey
, rename_ops
, NULL
, NULL
, (LPBYTE
)buf
, &size
);
9008 ok(!ret
, "RegQueryValueExA failed %d (%u)\n", ret
, GetLastError());
9010 for (src
= buf
; *src
; src
= dst
+ strlen(dst
) + 1)
9012 DWORD flags
= MOVEFILE_COPY_ALLOWED
;
9014 dst
= src
+ strlen(src
) + 1;
9016 if (!strstr(src
, "msitest"))
9018 lstrcpyA(buf2ptr
, src
);
9019 buf2len
+= strlen(src
) + 1;
9020 buf2ptr
+= strlen(src
) + 1;
9023 lstrcpyA(buf2ptr
, dst
);
9024 buf2ptr
+= strlen(dst
) + 1;
9025 buf2len
+= strlen(dst
) + 1;
9036 flags
|= MOVEFILE_REPLACE_EXISTING
;
9039 if (src
[0] == '\\' && src
[1] == '?' && src
[2] == '?' && src
[3] == '\\') src
+= 4;
9042 if (dst
[0] == '\\' && dst
[1] == '?' && dst
[2] == '?' && dst
[3] == '\\') dst
+= 4;
9043 ok(MoveFileExA(src
, dst
, flags
), "Failed to move file %s -> %s (%u)\n", src
, dst
, GetLastError());
9046 ok(DeleteFileA(src
), "Failed to delete file %s (%u)\n", src
, GetLastError());
9049 ok(found
, "Expected a 'msitest' entry\n");
9054 RegSetValueExA(hkey
, rename_ops
, 0, REG_MULTI_SZ
, (LPBYTE
)buf2
, buf2len
);
9057 RegDeleteValueA(hkey
, rename_ops
);
9059 HeapFree(GetProcessHeap(), 0, buf
);
9060 HeapFree(GetProcessHeap(), 0, buf2
);
9063 static BOOL
file_matches_data(LPCSTR file
, LPCSTR data
)
9065 DWORD len
, data_len
= strlen(data
);
9069 handle
= CreateFile(file
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, OPEN_EXISTING
, 0, NULL
);
9070 ok(handle
!= INVALID_HANDLE_VALUE
, "failed to open %s (%u)\n", file
, GetLastError());
9072 if (ReadFile(handle
, buf
, sizeof(buf
), &len
, NULL
) && len
>= data_len
)
9074 CloseHandle(handle
);
9075 return !memcmp(buf
, data
, data_len
);
9077 CloseHandle(handle
);
9081 static void test_file_in_use(void)
9086 char path
[MAX_PATH
];
9090 win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n");
9093 if (is_process_limited())
9095 skip("process is limited\n");
9099 RegOpenKeyExA(HKEY_LOCAL_MACHINE
, session_manager
, 0, KEY_ALL_ACCESS
, &hkey
);
9101 CreateDirectoryA("msitest", NULL
);
9102 create_file("msitest\\maximus", 500);
9103 create_database(msifile
, fiu_tables
, sizeof(fiu_tables
) / sizeof(msi_table
));
9105 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9107 lstrcpy(path
, PROG_FILES_DIR
);
9108 lstrcat(path
, "\\msitest");
9109 CreateDirectoryA(path
, NULL
);
9111 lstrcat(path
, "\\maximus");
9112 file
= CreateFileA(path
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, CREATE_NEW
, FILE_ATTRIBUTE_NORMAL
, NULL
);
9114 r
= MsiInstallProductA(msifile
, "REBOOT=ReallySuppress FULL=1");
9115 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9117 skip("Not enough rights to perform tests\n");
9120 ok(r
== ERROR_SUCCESS_REBOOT_REQUIRED
, "Expected ERROR_SUCCESS_REBOOT_REQUIRED got %u\n", r
);
9121 ok(!file_matches_data(path
, "msitest\\maximus"), "Expected file not to match\n");
9123 ok(!file_matches_data(path
, "msitest\\maximus"), "Expected file not to match\n");
9125 process_pending_renames(hkey
);
9128 ok(file_matches_data(path
, "msitest\\maximus"), "Expected file to match\n");
9129 ok(delete_pf("msitest\\maximus", TRUE
), "File not present\n");
9130 ok(delete_pf("msitest", FALSE
), "Directory not present or not empty\n");
9132 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9133 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9138 delete_pf("msitest\\maximus", TRUE
);
9139 delete_pf("msitest", FALSE
);
9140 DeleteFileA("msitest\\maximus");
9141 delete_test_files();
9142 DeleteFile(msifile
);
9145 static void test_file_in_use_cab(void)
9150 char path
[MAX_PATH
];
9154 win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n");
9157 if (is_process_limited())
9159 skip("process is limited\n");
9163 RegOpenKeyExA(HKEY_LOCAL_MACHINE
, session_manager
, 0, KEY_ALL_ACCESS
, &hkey
);
9165 CreateDirectoryA("msitest", NULL
);
9166 create_file("maximus", 500);
9167 create_cab_file("test1.cab", MEDIA_SIZE
, "maximus\0");
9168 DeleteFile("maximus");
9170 create_database(msifile
, fiuc_tables
, sizeof(fiuc_tables
) / sizeof(msi_table
));
9172 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9174 lstrcpy(path
, PROG_FILES_DIR
);
9175 lstrcat(path
, "\\msitest");
9176 CreateDirectoryA(path
, NULL
);
9178 lstrcat(path
, "\\maximus");
9179 file
= CreateFileA(path
, GENERIC_READ
, FILE_SHARE_READ
, NULL
, CREATE_NEW
, FILE_ATTRIBUTE_NORMAL
, NULL
);
9181 r
= MsiInstallProductA(msifile
, "REBOOT=ReallySuppress FULL=1");
9182 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9184 skip("Not enough rights to perform tests\n");
9187 ok(r
== ERROR_SUCCESS_REBOOT_REQUIRED
, "Expected ERROR_SUCCESS_REBOOT_REQUIRED got %u\n", r
);
9188 ok(!file_matches_data(path
, "maximus"), "Expected file not to match\n");
9190 ok(!file_matches_data(path
, "maximus"), "Expected file not to match\n");
9192 process_pending_renames(hkey
);
9195 ok(file_matches_data(path
, "maximus"), "Expected file to match\n");
9196 ok(delete_pf("msitest\\maximus", TRUE
), "File not present\n");
9197 ok(delete_pf("msitest", FALSE
), "Directory not present or not empty\n");
9199 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9200 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9205 delete_pf("msitest\\maximus", TRUE
);
9206 delete_pf("msitest", FALSE
);
9207 DeleteFileA("msitest\\maximus");
9209 delete_test_files();
9210 DeleteFile(msifile
);
9213 static INT CALLBACK
handler_a(LPVOID context
, UINT type
, LPCSTR msg
)
9218 static INT CALLBACK
handler_w(LPVOID context
, UINT type
, LPCWSTR msg
)
9223 static INT CALLBACK
handler_record(LPVOID context
, UINT type
, MSIHANDLE record
)
9228 static void test_MsiSetExternalUI(void)
9230 INSTALLUI_HANDLERA ret_a
;
9231 INSTALLUI_HANDLERW ret_w
;
9232 INSTALLUI_HANDLER_RECORD prev
;
9235 ret_a
= MsiSetExternalUIA(handler_a
, INSTALLLOGMODE_ERROR
, NULL
);
9236 ok(ret_a
== NULL
, "expected NULL, got %p\n", ret_a
);
9238 ret_a
= MsiSetExternalUIA(NULL
, 0, NULL
);
9239 ok(ret_a
== handler_a
, "expected %p, got %p\n", handler_a
, ret_a
);
9241 /* Not present before Installer 3.1 */
9242 if (!pMsiSetExternalUIRecord
) {
9243 win_skip("MsiSetExternalUIRecord is not available\n");
9247 error
= pMsiSetExternalUIRecord(handler_record
, INSTALLLOGMODE_ERROR
, NULL
, &prev
);
9248 ok(!error
, "MsiSetExternalUIRecord failed %u\n", error
);
9249 ok(prev
== NULL
, "expected NULL, got %p\n", prev
);
9251 prev
= (INSTALLUI_HANDLER_RECORD
)0xdeadbeef;
9252 error
= pMsiSetExternalUIRecord(NULL
, INSTALLLOGMODE_ERROR
, NULL
, &prev
);
9253 ok(!error
, "MsiSetExternalUIRecord failed %u\n", error
);
9254 ok(prev
== handler_record
, "expected %p, got %p\n", handler_record
, prev
);
9256 ret_w
= MsiSetExternalUIW(handler_w
, INSTALLLOGMODE_ERROR
, NULL
);
9257 ok(ret_w
== NULL
, "expected NULL, got %p\n", ret_w
);
9259 ret_w
= MsiSetExternalUIW(NULL
, 0, NULL
);
9260 ok(ret_w
== handler_w
, "expected %p, got %p\n", handler_w
, ret_w
);
9262 ret_a
= MsiSetExternalUIA(handler_a
, INSTALLLOGMODE_ERROR
, NULL
);
9263 ok(ret_a
== NULL
, "expected NULL, got %p\n", ret_a
);
9265 ret_w
= MsiSetExternalUIW(handler_w
, INSTALLLOGMODE_ERROR
, NULL
);
9266 ok(ret_w
== NULL
, "expected NULL, got %p\n", ret_w
);
9268 prev
= (INSTALLUI_HANDLER_RECORD
)0xdeadbeef;
9269 error
= pMsiSetExternalUIRecord(handler_record
, INSTALLLOGMODE_ERROR
, NULL
, &prev
);
9270 ok(!error
, "MsiSetExternalUIRecord failed %u\n", error
);
9271 ok(prev
== NULL
, "expected NULL, got %p\n", prev
);
9273 ret_a
= MsiSetExternalUIA(NULL
, 0, NULL
);
9274 ok(ret_a
== NULL
, "expected NULL, got %p\n", ret_a
);
9276 ret_w
= MsiSetExternalUIW(NULL
, 0, NULL
);
9277 ok(ret_w
== NULL
, "expected NULL, got %p\n", ret_w
);
9279 prev
= (INSTALLUI_HANDLER_RECORD
)0xdeadbeef;
9280 error
= pMsiSetExternalUIRecord(NULL
, 0, NULL
, &prev
);
9281 ok(!error
, "MsiSetExternalUIRecord failed %u\n", error
);
9282 ok(prev
== handler_record
, "expected %p, got %p\n", handler_record
, prev
);
9284 error
= pMsiSetExternalUIRecord(handler_record
, INSTALLLOGMODE_ERROR
, NULL
, NULL
);
9285 ok(!error
, "MsiSetExternalUIRecord failed %u\n", error
);
9287 error
= pMsiSetExternalUIRecord(NULL
, 0, NULL
, NULL
);
9288 ok(!error
, "MsiSetExternalUIRecord failed %u\n", error
);
9291 static void test_feature_override(void)
9294 REGSAM access
= KEY_ALL_ACCESS
;
9297 if (is_process_limited())
9299 skip("process is limited\n");
9303 create_test_files();
9304 create_file("msitest\\override.txt", 1000);
9305 create_file("msitest\\preselected.txt", 1000);
9306 create_file("msitest\\notpreselected.txt", 1000);
9307 create_database(msifile
, fo_tables
, sizeof(fo_tables
) / sizeof(msi_table
));
9309 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
9310 access
|= KEY_WOW64_64KEY
;
9312 r
= MsiInstallProductA(msifile
, "ADDLOCAL=override");
9313 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9315 skip("Not enough rights to perform tests\n");
9318 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9320 ok(pf_exists("msitest\\override.txt"), "file not installed\n");
9321 ok(!pf_exists("msitest\\preselected.txt"), "file installed\n");
9322 ok(!pf_exists("msitest\\notpreselected.txt"), "file installed\n");
9324 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9325 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9327 ok(!delete_pf("msitest\\override.txt", TRUE
), "file not removed\n");
9329 r
= MsiInstallProductA(msifile
, "preselect=1");
9330 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9332 ok(pf_exists("msitest\\override.txt"), "file not installed\n");
9333 ok(pf_exists("msitest\\preselected.txt"), "file not installed\n");
9334 ok(!pf_exists("msitest\\notpreselected.txt"), "file installed\n");
9336 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9337 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9339 ok(!delete_pf("msitest\\override.txt", TRUE
), "file not removed\n");
9341 ok(delete_pf("msitest\\preselected.txt", TRUE
), "file removed\n");
9342 ok(delete_pf("msitest", FALSE
), "directory removed\n");
9345 r
= MsiInstallProductA(msifile
, NULL
);
9346 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9348 ok(pf_exists("msitest\\override.txt"), "file not installed\n");
9349 ok(pf_exists("msitest\\preselected.txt"), "file not installed\n");
9350 ok(!pf_exists("msitest\\notpreselected.txt"), "file installed\n");
9352 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9353 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9355 ok(!delete_pf("msitest\\override.txt", TRUE
), "file not removed\n");
9357 ok(delete_pf("msitest\\preselected.txt", TRUE
), "file removed\n");
9358 ok(delete_pf("msitest", FALSE
), "directory removed\n");
9361 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\msitest", access
);
9364 DeleteFileA("msitest\\override.txt");
9365 DeleteFileA("msitest\\preselected.txt");
9366 DeleteFileA("msitest\\notpreselected.txt");
9367 delete_test_files();
9368 DeleteFile(msifile
);
9371 static void test_create_folder(void)
9375 create_test_files();
9376 create_database(msifile
, cf_tables
, sizeof(cf_tables
) / sizeof(msi_table
));
9378 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9380 r
= MsiInstallProductA(msifile
, NULL
);
9381 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9383 skip("Not enough rights to perform tests\n");
9386 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9388 ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File installed\n");
9389 ok(!delete_pf("msitest\\cabout\\new", FALSE
), "Directory created\n");
9390 ok(!delete_pf("msitest\\cabout\\four.txt", TRUE
), "File installed\n");
9391 ok(!delete_pf("msitest\\cabout", FALSE
), "Directory created\n");
9392 ok(!delete_pf("msitest\\changed\\three.txt", TRUE
), "File installed\n");
9393 ok(!delete_pf("msitest\\changed", FALSE
), "Directory created\n");
9394 ok(!delete_pf("msitest\\first\\two.txt", TRUE
), "File installed\n");
9395 ok(!delete_pf("msitest\\first", FALSE
), "Directory created\n");
9396 ok(!delete_pf("msitest\\filename", TRUE
), "File installed\n");
9397 ok(!delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
9398 ok(!delete_pf("msitest\\service.exe", TRUE
), "File installed\n");
9399 ok(!delete_pf("msitest", FALSE
), "Directory created\n");
9401 r
= MsiInstallProductA(msifile
, "LOCAL=Two");
9402 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9404 ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File installed\n");
9405 ok(!delete_pf("msitest\\cabout\\new", FALSE
), "Directory created\n");
9406 ok(!delete_pf("msitest\\cabout\\four.txt", TRUE
), "File installed\n");
9407 ok(!delete_pf("msitest\\cabout", FALSE
), "Directory created\n");
9408 ok(!delete_pf("msitest\\changed\\three.txt", TRUE
), "File installed\n");
9409 ok(!delete_pf("msitest\\changed", FALSE
), "Directory created\n");
9410 ok(!delete_pf("msitest\\first\\two.txt", TRUE
), "File installed\n");
9411 ok(!delete_pf("msitest\\first", FALSE
), "Directory created\n");
9412 ok(!delete_pf("msitest\\filename", TRUE
), "File installed\n");
9413 ok(!delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
9414 ok(!delete_pf("msitest\\service.exe", TRUE
), "File installed\n");
9415 ok(!delete_pf("msitest", FALSE
), "Directory created\n");
9418 delete_test_files();
9419 DeleteFile(msifile
);
9422 static void test_remove_folder(void)
9426 create_test_files();
9427 create_database(msifile
, rf_tables
, sizeof(rf_tables
) / sizeof(msi_table
));
9429 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9431 r
= MsiInstallProductA(msifile
, NULL
);
9432 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9434 skip("Not enough rights to perform tests\n");
9437 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9439 ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File installed\n");
9440 ok(!delete_pf("msitest\\cabout\\new", FALSE
), "Directory created\n");
9441 ok(!delete_pf("msitest\\cabout\\four.txt", TRUE
), "File installed\n");
9442 ok(!delete_pf("msitest\\cabout", FALSE
), "Directory created\n");
9443 ok(!delete_pf("msitest\\changed\\three.txt", TRUE
), "File installed\n");
9444 ok(!delete_pf("msitest\\changed", FALSE
), "Directory created\n");
9445 ok(!delete_pf("msitest\\first\\two.txt", TRUE
), "File installed\n");
9446 ok(!delete_pf("msitest\\first", FALSE
), "Directory created\n");
9447 ok(!delete_pf("msitest\\filename", TRUE
), "File installed\n");
9448 ok(!delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
9449 ok(!delete_pf("msitest\\service.exe", TRUE
), "File installed\n");
9450 ok(!delete_pf("msitest", FALSE
), "Directory created\n");
9452 r
= MsiInstallProductA(msifile
, "LOCAL=Two");
9453 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9455 ok(!delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File installed\n");
9456 ok(!delete_pf("msitest\\cabout\\new", FALSE
), "Directory created\n");
9457 ok(!delete_pf("msitest\\cabout\\four.txt", TRUE
), "File installed\n");
9458 ok(!delete_pf("msitest\\cabout", FALSE
), "Directory created\n");
9459 ok(!delete_pf("msitest\\changed\\three.txt", TRUE
), "File installed\n");
9460 ok(!delete_pf("msitest\\changed", FALSE
), "Directory created\n");
9461 ok(!delete_pf("msitest\\first\\two.txt", TRUE
), "File installed\n");
9462 ok(!delete_pf("msitest\\first", FALSE
), "Directory created\n");
9463 ok(!delete_pf("msitest\\filename", TRUE
), "File installed\n");
9464 ok(!delete_pf("msitest\\one.txt", TRUE
), "File installed\n");
9465 ok(!delete_pf("msitest\\service.exe", TRUE
), "File installed\n");
9466 ok(!delete_pf("msitest", FALSE
), "Directory created\n");
9469 delete_test_files();
9470 DeleteFile(msifile
);
9473 static void test_start_services(void)
9476 SC_HANDLE scm
, service
;
9478 DWORD error
= ERROR_SUCCESS
;
9482 win_skip("Services are not implemented on Win9x and WinMe\n");
9485 scm
= OpenSCManager(NULL
, NULL
, SC_MANAGER_ALL_ACCESS
);
9486 if (!scm
&& GetLastError() == ERROR_ACCESS_DENIED
)
9488 skip("Not enough rights to perform tests\n");
9491 ok(scm
!= NULL
, "Failed to open the SC Manager\n");
9494 service
= OpenService(scm
, "Spooler", SC_MANAGER_ALL_ACCESS
);
9495 if (!service
&& GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST
)
9497 win_skip("The 'Spooler' service does not exist\n");
9498 CloseServiceHandle(scm
);
9501 ok(service
!= NULL
, "Failed to open Spooler, error %d\n", GetLastError());
9503 CloseServiceHandle(scm
);
9507 ret
= StartService(service
, 0, NULL
);
9508 if (!ret
&& (error
= GetLastError()) != ERROR_SERVICE_ALREADY_RUNNING
)
9510 skip("Terminal service not available, skipping test\n");
9511 CloseServiceHandle(service
);
9512 CloseServiceHandle(scm
);
9516 CloseServiceHandle(service
);
9517 CloseServiceHandle(scm
);
9519 create_test_files();
9520 create_database(msifile
, sss_tables
, sizeof(sss_tables
) / sizeof(msi_table
));
9522 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9524 r
= MsiInstallProductA(msifile
, NULL
);
9525 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9527 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
9528 ok(delete_pf("msitest\\cabout\\new", FALSE
), "Directory not created\n");
9529 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
9530 ok(delete_pf("msitest\\cabout", FALSE
), "Directory not created\n");
9531 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
9532 ok(delete_pf("msitest\\changed", FALSE
), "Directory not created\n");
9533 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
9534 ok(delete_pf("msitest\\first", FALSE
), "Directory not created\n");
9535 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
9536 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
9537 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
9538 ok(delete_pf("msitest", FALSE
), "Directory not created\n");
9540 delete_test_files();
9541 DeleteFile(msifile
);
9543 if (error
== ERROR_SUCCESS
)
9545 SERVICE_STATUS status
;
9547 scm
= OpenSCManager(NULL
, NULL
, SC_MANAGER_ALL_ACCESS
);
9548 service
= OpenService(scm
, "Spooler", SC_MANAGER_ALL_ACCESS
);
9550 ret
= ControlService(service
, SERVICE_CONTROL_STOP
, &status
);
9551 ok(ret
, "ControlService failed %u\n", GetLastError());
9553 CloseServiceHandle(service
);
9554 CloseServiceHandle(scm
);
9558 static void test_delete_services(void)
9564 win_skip("Services are not implemented on Win9x and WinMe\n");
9567 if (is_process_limited())
9569 skip("process is limited\n");
9573 create_test_files();
9574 create_database(msifile
, sds_tables
, sizeof(sds_tables
) / sizeof(msi_table
));
9576 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9578 r
= MsiInstallProductA(msifile
, NULL
);
9579 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9581 skip("Not enough rights to perform tests\n");
9584 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9586 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9587 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9589 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
9590 ok(delete_pf("msitest\\cabout\\new", FALSE
), "Directory not created\n");
9591 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
9592 ok(delete_pf("msitest\\cabout", FALSE
), "Directory not created\n");
9593 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
9594 ok(delete_pf("msitest\\changed", FALSE
), "Directory not created\n");
9595 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
9596 ok(delete_pf("msitest\\first", FALSE
), "Directory not created\n");
9597 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
9598 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
9599 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
9600 ok(delete_pf("msitest", FALSE
), "Directory not created\n");
9603 delete_test_files();
9604 DeleteFile(msifile
);
9607 static void test_self_registration(void)
9611 if (is_process_limited())
9613 skip("process is limited\n");
9617 create_test_files();
9618 create_database(msifile
, sr_tables
, sizeof(sr_tables
) / sizeof(msi_table
));
9620 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9622 r
= MsiInstallProductA(msifile
, NULL
);
9623 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9625 skip("Not enough rights to perform tests\n");
9628 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9630 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
9631 ok(delete_pf("msitest\\cabout\\new", FALSE
), "Directory not created\n");
9632 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
9633 ok(delete_pf("msitest\\cabout", FALSE
), "Directory not created\n");
9634 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
9635 ok(delete_pf("msitest\\changed", FALSE
), "Directory not created\n");
9636 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
9637 ok(delete_pf("msitest\\first", FALSE
), "Directory not created\n");
9638 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
9639 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
9640 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
9641 ok(delete_pf("msitest", FALSE
), "Directory not created\n");
9644 delete_test_files();
9645 DeleteFile(msifile
);
9648 static void test_register_font(void)
9650 static const char regfont1
[] = "Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts";
9651 static const char regfont2
[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Fonts";
9655 REGSAM access
= KEY_ALL_ACCESS
;
9658 if (is_process_limited())
9660 skip("process is limited\n");
9664 create_test_files();
9665 create_file("msitest\\font.ttf", 1000);
9666 create_database(msifile
, font_tables
, sizeof(font_tables
) / sizeof(msi_table
));
9668 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
9669 access
|= KEY_WOW64_64KEY
;
9671 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9673 r
= MsiInstallProductA(msifile
, NULL
);
9674 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9676 skip("Not enough rights to perform tests\n");
9679 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9681 ret
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, regfont1
, 0, access
, &key
);
9683 RegOpenKeyExA(HKEY_LOCAL_MACHINE
, regfont2
, 0, access
, &key
);
9685 ret
= RegQueryValueExA(key
, "msi test font", NULL
, NULL
, NULL
, NULL
);
9686 ok(ret
!= ERROR_FILE_NOT_FOUND
, "unexpected result %d\n", ret
);
9688 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9689 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9691 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
9693 ret
= RegQueryValueExA(key
, "msi test font", NULL
, NULL
, NULL
, NULL
);
9694 ok(ret
== ERROR_FILE_NOT_FOUND
, "unexpected result %d\n", ret
);
9696 RegDeleteValueA(key
, "msi test font");
9700 DeleteFileA("msitest\\font.ttf");
9701 delete_test_files();
9702 DeleteFile(msifile
);
9705 static void test_validate_product_id(void)
9709 if (is_process_limited())
9711 skip("process is limited\n");
9715 create_test_files();
9716 create_database(msifile
, vp_tables
, sizeof(vp_tables
) / sizeof(msi_table
));
9718 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9720 r
= MsiInstallProductA(msifile
, NULL
);
9721 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9723 skip("Not enough rights to perform tests\n");
9726 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9728 r
= MsiInstallProductA(msifile
, "SET_PRODUCT_ID=1");
9729 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9731 r
= MsiInstallProductA(msifile
, "SET_PRODUCT_ID=2");
9732 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9734 r
= MsiInstallProductA(msifile
, "PIDKEY=123-1234567");
9735 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9737 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE
), "File not installed\n");
9738 ok(delete_pf("msitest\\cabout\\new", FALSE
), "Directory not created\n");
9739 ok(delete_pf("msitest\\cabout\\four.txt", TRUE
), "File not installed\n");
9740 ok(delete_pf("msitest\\cabout", FALSE
), "Directory not created\n");
9741 ok(delete_pf("msitest\\changed\\three.txt", TRUE
), "File not installed\n");
9742 ok(delete_pf("msitest\\changed", FALSE
), "Directory not created\n");
9743 ok(delete_pf("msitest\\first\\two.txt", TRUE
), "File not installed\n");
9744 ok(delete_pf("msitest\\first", FALSE
), "Directory not created\n");
9745 ok(delete_pf("msitest\\filename", TRUE
), "File not installed\n");
9746 ok(delete_pf("msitest\\one.txt", TRUE
), "File not installed\n");
9747 ok(delete_pf("msitest\\service.exe", TRUE
), "File not installed\n");
9748 ok(delete_pf("msitest", FALSE
), "Directory not created\n");
9751 delete_test_files();
9752 DeleteFile(msifile
);
9755 static void test_install_remove_odbc(void)
9759 if (is_process_limited())
9761 skip("process is limited\n");
9765 create_test_files();
9766 create_file("msitest\\ODBCdriver.dll", 1000);
9767 create_file("msitest\\ODBCdriver2.dll", 1000);
9768 create_file("msitest\\ODBCtranslator.dll", 1000);
9769 create_file("msitest\\ODBCtranslator2.dll", 1000);
9770 create_file("msitest\\ODBCsetup.dll", 1000);
9771 create_database(msifile
, odbc_tables
, sizeof(odbc_tables
) / sizeof(msi_table
));
9773 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9775 r
= MsiInstallProductA(msifile
, NULL
);
9776 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9778 skip("Not enough rights to perform tests\n");
9781 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9783 ok(pf_exists("msitest\\ODBCdriver.dll"), "file not created\n");
9784 ok(pf_exists("msitest\\ODBCdriver2.dll"), "file not created\n");
9785 ok(pf_exists("msitest\\ODBCtranslator.dll"), "file not created\n");
9786 ok(pf_exists("msitest\\ODBCtranslator2.dll"), "file not created\n");
9787 ok(pf_exists("msitest\\ODBCsetup.dll"), "file not created\n");
9789 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9790 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9792 ok(!delete_pf("msitest\\ODBCdriver.dll", TRUE
), "file not removed\n");
9793 ok(!delete_pf("msitest\\ODBCdriver2.dll", TRUE
), "file not removed\n");
9794 ok(!delete_pf("msitest\\ODBCtranslator.dll", TRUE
), "file not removed\n");
9795 ok(!delete_pf("msitest\\ODBCtranslator2.dll", TRUE
), "file not removed\n");
9796 ok(!delete_pf("msitest\\ODBCsetup.dll", TRUE
), "file not removed\n");
9797 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
9800 DeleteFileA("msitest\\ODBCdriver.dll");
9801 DeleteFileA("msitest\\ODBCdriver2.dll");
9802 DeleteFileA("msitest\\ODBCtranslator.dll");
9803 DeleteFileA("msitest\\ODBCtranslator2.dll");
9804 DeleteFileA("msitest\\ODBCsetup.dll");
9805 delete_test_files();
9806 DeleteFile(msifile
);
9809 static void test_register_typelib(void)
9813 if (is_process_limited())
9815 skip("process is limited\n");
9819 create_test_files();
9820 create_file("msitest\\typelib.dll", 1000);
9821 create_database(msifile
, tl_tables
, sizeof(tl_tables
) / sizeof(msi_table
));
9823 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9825 r
= MsiInstallProductA(msifile
, "REGISTER_TYPELIB=1");
9826 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9828 skip("Not enough rights to perform tests\n");
9831 ok(r
== ERROR_INSTALL_FAILURE
, "Expected ERROR_INSTALL_FAILURE, got %u\n", r
);
9833 r
= MsiInstallProductA(msifile
, NULL
);
9834 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9836 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9837 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9839 ok(!delete_pf("msitest\\typelib.dll", TRUE
), "file not removed\n");
9840 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
9843 DeleteFileA("msitest\\typelib.dll");
9844 delete_test_files();
9845 DeleteFile(msifile
);
9848 static void test_create_remove_shortcut(void)
9852 if (is_process_limited())
9854 skip("process is limited\n");
9858 create_test_files();
9859 create_file("msitest\\target.txt", 1000);
9860 create_database(msifile
, crs_tables
, sizeof(crs_tables
) / sizeof(msi_table
));
9862 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9864 r
= MsiInstallProductA(msifile
, NULL
);
9865 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9867 skip("Not enough rights to perform tests\n");
9870 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9872 ok(pf_exists("msitest\\target.txt"), "file not created\n");
9873 ok(pf_exists("msitest\\shortcut.lnk"), "file not created\n");
9875 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9876 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9878 ok(!delete_pf("msitest\\shortcut.lnk", TRUE
), "file not removed\n");
9879 ok(!delete_pf("msitest\\target.txt", TRUE
), "file not removed\n");
9880 todo_wine
ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
9883 DeleteFileA("msitest\\target.txt");
9884 delete_test_files();
9885 DeleteFile(msifile
);
9888 static void test_publish_components(void)
9890 static char keypath
[] =
9891 "Software\\Microsoft\\Installer\\Components\\0CBCFA296AC907244845745CEEB2F8AA";
9897 if (is_process_limited())
9899 skip("process is limited\n");
9903 create_test_files();
9904 create_file("msitest\\english.txt", 1000);
9905 create_database(msifile
, pub_tables
, sizeof(pub_tables
) / sizeof(msi_table
));
9907 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9909 r
= MsiInstallProductA(msifile
, NULL
);
9910 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9912 skip("Not enough rights to perform tests\n");
9915 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9917 res
= RegOpenKeyA(HKEY_CURRENT_USER
, keypath
, &key
);
9918 ok(res
== ERROR_SUCCESS
, "components key not created %d\n", res
);
9920 res
= RegQueryValueExA(key
, "english.txt", NULL
, NULL
, NULL
, NULL
);
9921 ok(res
== ERROR_SUCCESS
, "value not found %d\n", res
);
9924 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9925 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9927 res
= RegOpenKeyA(HKEY_CURRENT_USER
, keypath
, &key
);
9928 ok(res
== ERROR_FILE_NOT_FOUND
, "unexpected result %d\n", res
);
9930 ok(!delete_pf("msitest\\english.txt", TRUE
), "file not removed\n");
9931 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
9934 DeleteFileA("msitest\\english.txt");
9935 delete_test_files();
9936 DeleteFile(msifile
);
9939 static void test_remove_duplicate_files(void)
9943 if (is_process_limited())
9945 skip("process is limited\n");
9949 create_test_files();
9950 create_file("msitest\\original.txt", 1000);
9951 create_file("msitest\\original2.txt", 1000);
9952 create_file("msitest\\original3.txt", 1000);
9953 create_database(msifile
, rd_tables
, sizeof(rd_tables
) / sizeof(msi_table
));
9955 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
9957 r
= MsiInstallProductA(msifile
, NULL
);
9958 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
9960 skip("Not enough rights to perform tests\n");
9963 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9965 ok(pf_exists("msitest\\original.txt"), "file not created\n");
9966 ok(pf_exists("msitest\\original2.txt"), "file not created\n");
9967 ok(!pf_exists("msitest\\original3.txt"), "file created\n");
9968 ok(pf_exists("msitest\\duplicate.txt"), "file not created\n");
9969 ok(!pf_exists("msitest\\duplicate2.txt"), "file created\n");
9971 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
9972 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
9974 ok(delete_pf("msitest\\original.txt", TRUE
), "file removed\n");
9975 ok(!delete_pf("msitest\\original2.txt", TRUE
), "file not removed\n");
9976 ok(!delete_pf("msitest\\original3.txt", TRUE
), "file not removed\n");
9977 ok(!delete_pf("msitest\\duplicate.txt", TRUE
), "file not removed\n");
9978 ok(!delete_pf("msitest\\duplicate2.txt", TRUE
), "file not removed\n");
9979 ok(delete_pf("msitest", FALSE
), "directory removed\n");
9982 DeleteFileA("msitest\\original.txt");
9983 DeleteFileA("msitest\\original2.txt");
9984 DeleteFileA("msitest\\original3.txt");
9985 delete_test_files();
9986 DeleteFile(msifile
);
9989 static void test_remove_registry_values(void)
9994 REGSAM access
= KEY_ALL_ACCESS
;
9997 if (is_process_limited())
9999 skip("process is limited\n");
10003 create_test_files();
10004 create_file("msitest\\registry.txt", 1000);
10005 create_database(msifile
, rrv_tables
, sizeof(rrv_tables
) / sizeof(msi_table
));
10007 if (pIsWow64Process
&& pIsWow64Process(GetCurrentProcess(), &wow64
) && wow64
)
10008 access
|= KEY_WOW64_64KEY
;
10010 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10012 RegCreateKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key1", 0, NULL
, 0, access
, NULL
, &key
, NULL
);
10013 RegSetValueExA(key
, "value1", 0, REG_SZ
, (const BYTE
*)"1", 2);
10016 RegCreateKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key2", 0, NULL
, 0, access
, NULL
, &key
, NULL
);
10017 RegSetValueExA(key
, "value2", 0, REG_SZ
, (const BYTE
*)"2", 2);
10020 RegCreateKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyA", 0, NULL
, 0, access
, NULL
, &key
, NULL
);
10021 RegSetValueExA(key
, "", 0, REG_SZ
, (const BYTE
*)"default", 8);
10022 RegSetValueExA(key
, "valueA", 0, REG_SZ
, (const BYTE
*)"A", 2);
10023 RegSetValueExA(key
, "valueB", 0, REG_SZ
, (const BYTE
*)"B", 2);
10026 RegCreateKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyB", 0, NULL
, 0, access
, NULL
, &key
, NULL
);
10027 RegSetValueExA(key
, "", 0, REG_SZ
, (const BYTE
*)"default", 8);
10028 RegSetValueExA(key
, "valueB", 0, REG_SZ
, (const BYTE
*)"B", 2);
10031 r
= MsiInstallProductA(msifile
, NULL
);
10032 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
10034 skip("Not enough rights to perform tests\n");
10037 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10039 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key1", 0, access
, &key
);
10040 ok(res
== ERROR_SUCCESS
, "key removed\n");
10043 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key2", 0, access
, &key
);
10044 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10046 res
= RegCreateKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key2", 0, NULL
, 0, access
, NULL
, &key
, NULL
);
10047 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10050 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10051 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10053 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key1", 0, access
, &key
);
10054 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10056 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key2", 0, access
, &key
);
10057 ok(res
== ERROR_SUCCESS
, "key removed\n");
10060 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyA", 0, access
, &key
);
10061 ok(res
== ERROR_SUCCESS
, "key removed\n");
10064 res
= RegOpenKeyExA(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyB", 0, access
, &key
);
10065 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10067 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyA", access
);
10068 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key2", access
);
10069 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine", access
);
10071 ok(!delete_pf("msitest\\registry.txt", TRUE
), "file not removed\n");
10072 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10075 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key1", access
);
10076 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\key2", access
);
10077 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyA", access
);
10078 delete_key(HKEY_LOCAL_MACHINE
, "Software\\Wine\\keyB", access
);
10080 DeleteFileA("msitest\\registry.txt");
10081 delete_test_files();
10082 DeleteFile(msifile
);
10085 static void test_find_related_products(void)
10089 if (is_process_limited())
10091 skip("process is limited\n");
10095 create_test_files();
10096 create_file("msitest\\product.txt", 1000);
10097 create_database(msifile
, frp_tables
, sizeof(frp_tables
) / sizeof(msi_table
));
10099 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10101 r
= MsiInstallProductA(msifile
, NULL
);
10102 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
10104 skip("Not enough rights to perform tests\n");
10107 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10109 /* install again, so it finds the upgrade code */
10110 r
= MsiInstallProductA(msifile
, NULL
);
10111 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10113 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10114 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10116 ok(!delete_pf("msitest\\product.txt", TRUE
), "file not removed\n");
10117 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10120 DeleteFileA("msitest\\product.txt");
10121 delete_test_files();
10122 DeleteFile(msifile
);
10125 static void test_remove_ini_values(void)
10129 char inifile
[MAX_PATH
], buf
[0x10];
10133 if (is_process_limited())
10135 skip("process is limited\n");
10139 create_test_files();
10140 create_file("msitest\\inifile.txt", 1000);
10141 create_database(msifile
, riv_tables
, sizeof(riv_tables
) / sizeof(msi_table
));
10143 lstrcpyA(inifile
, PROG_FILES_DIR
);
10144 lstrcatA(inifile
, "\\msitest");
10145 ret
= CreateDirectoryA(inifile
, NULL
);
10146 if (!ret
&& GetLastError() == ERROR_ACCESS_DENIED
)
10148 skip("Not enough rights to perform tests\n");
10151 lstrcatA(inifile
, "\\test.ini");
10152 file
= CreateFileA(inifile
, GENERIC_WRITE
|GENERIC_READ
, 0, NULL
, CREATE_ALWAYS
, 0, NULL
);
10155 ret
= WritePrivateProfileStringA("section1", "key1", "value1", inifile
);
10156 ok(ret
, "failed to write profile string %u\n", GetLastError());
10158 ret
= WritePrivateProfileStringA("sectionA", "keyA", "valueA", inifile
);
10159 ok(ret
, "failed to write profile string %u\n", GetLastError());
10161 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10163 r
= MsiInstallProductA(msifile
, NULL
);
10164 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10166 len
= GetPrivateProfileStringA("section1", "key1", NULL
, buf
, sizeof(buf
), inifile
);
10167 ok(len
== 6, "got %u expected 6\n", len
);
10169 len
= GetPrivateProfileStringA("sectionA", "keyA", NULL
, buf
, sizeof(buf
), inifile
);
10170 ok(!len
, "got %u expected 0\n", len
);
10172 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10173 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10175 len
= GetPrivateProfileStringA("section1", "key1", NULL
, buf
, sizeof(buf
), inifile
);
10176 ok(!len
, "got %u expected 0\n", len
);
10178 len
= GetPrivateProfileStringA("sectionA", "keyA", NULL
, buf
, sizeof(buf
), inifile
);
10179 ok(!len
, "got %u expected 0\n", len
);
10181 todo_wine
ok(!delete_pf("msitest\\test.ini", TRUE
), "file removed\n");
10182 ok(!delete_pf("msitest\\inifile.txt", TRUE
), "file not removed\n");
10183 ok(delete_pf("msitest", FALSE
), "directory removed\n");
10186 DeleteFileA("msitest\\inifile.txt");
10187 delete_test_files();
10188 DeleteFile(msifile
);
10191 static void test_remove_env_strings(void)
10201 win_skip("Environment variables are handled differently on win9x and winme\n");
10204 if (is_process_limited())
10206 skip("process is limited\n");
10210 create_test_files();
10211 create_file("msitest\\envvar.txt", 1000);
10212 create_database(msifile
, res_tables
, sizeof(res_tables
) / sizeof(msi_table
));
10214 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10216 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "Environment", &key
);
10217 ok(!res
, "failed to open environment key %d\n", res
);
10219 RegSetValueExA(key
, "MSITESTVAR1", 0, REG_SZ
, (const BYTE
*)"1", 2);
10220 RegSetValueExA(key
, "MSITESTVAR2", 0, REG_SZ
, (const BYTE
*)"1", 2);
10221 RegSetValueExA(key
, "MSITESTVAR3", 0, REG_SZ
, (const BYTE
*)"1", 2);
10222 RegSetValueExA(key
, "MSITESTVAR4", 0, REG_SZ
, (const BYTE
*)"1", 2);
10223 RegSetValueExA(key
, "MSITESTVAR5", 0, REG_SZ
, (const BYTE
*)"1", 2);
10227 r
= MsiInstallProductA(msifile
, NULL
);
10228 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
10230 skip("Not enough rights to perform tests\n");
10233 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10235 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "Environment", &key
);
10236 ok(!res
, "failed to open environment key %d\n", res
);
10240 size
= sizeof(buffer
);
10241 res
= RegQueryValueExA(key
, "MSITESTVAR1", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10242 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10243 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10244 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10248 size
= sizeof(buffer
);
10249 res
= RegQueryValueExA(key
, "MSITESTVAR2", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10250 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10251 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10252 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10256 size
= sizeof(buffer
);
10257 res
= RegQueryValueExA(key
, "MSITESTVAR3", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10258 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10259 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10260 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10264 size
= sizeof(buffer
);
10265 res
= RegQueryValueExA(key
, "MSITESTVAR4", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10266 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10267 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10268 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10272 size
= sizeof(buffer
);
10273 res
= RegQueryValueExA(key
, "MSITESTVAR5", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10274 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10275 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10276 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10280 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10281 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10283 res
= RegOpenKeyA(HKEY_CURRENT_USER
, "Environment", &key
);
10284 ok(!res
, "failed to open environment key %d\n", res
);
10286 res
= RegQueryValueExA(key
, "MSITESTVAR1", NULL
, NULL
, NULL
, NULL
);
10287 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
10289 res
= RegQueryValueExA(key
, "MSITESTVAR2", NULL
, NULL
, NULL
, NULL
);
10290 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
10294 size
= sizeof(buffer
);
10295 res
= RegQueryValueExA(key
, "MSITESTVAR3", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10296 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10297 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10298 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10299 RegDeleteValueA(key
, "MSITESTVAR3");
10301 res
= RegQueryValueExA(key
, "MSITESTVAR4", NULL
, NULL
, NULL
, NULL
);
10302 ok(res
== ERROR_FILE_NOT_FOUND
, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res
);
10306 size
= sizeof(buffer
);
10307 res
= RegQueryValueExA(key
, "MSITESTVAR5", NULL
, &type
, (LPBYTE
)buffer
, &size
);
10308 ok(res
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %d\n", res
);
10309 ok(type
== REG_SZ
, "expected REG_SZ, got %u\n", type
);
10310 ok(!lstrcmp(buffer
, "1"), "expected \"1\", got \"%s\"\n", buffer
);
10311 RegDeleteValueA(key
, "MSITESTVAR5");
10313 ok(!delete_pf("msitest\\envvar.txt", TRUE
), "file not removed\n");
10314 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10317 RegDeleteValueA(key
, "MSITESTVAR1");
10318 RegDeleteValueA(key
, "MSITESTVAR2");
10319 RegDeleteValueA(key
, "MSITESTVAR3");
10320 RegDeleteValueA(key
, "MSITESTVAR4");
10321 RegDeleteValueA(key
, "MSITESTVAR5");
10324 DeleteFileA("msitest\\envvar.txt");
10325 delete_test_files();
10326 DeleteFile(msifile
);
10329 static void test_register_class_info(void)
10335 if (is_process_limited())
10337 skip("process is limited\n");
10341 create_test_files();
10342 create_file("msitest\\class.txt", 1000);
10343 create_database(msifile
, rci_tables
, sizeof(rci_tables
) / sizeof(msi_table
));
10345 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10347 r
= MsiInstallProductA(msifile
, NULL
);
10348 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
10350 skip("Not enough rights to perform tests\n");
10353 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10355 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey
);
10356 ok(res
== ERROR_SUCCESS
, "key not created\n");
10359 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey
);
10360 ok(res
== ERROR_SUCCESS
, "key not created\n");
10363 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey
);
10364 ok(res
== ERROR_SUCCESS
, "key not created\n");
10367 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10368 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10370 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey
);
10371 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10373 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey
);
10374 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10376 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey
);
10377 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10379 ok(!delete_pf("msitest\\class.txt", TRUE
), "file not removed\n");
10380 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10383 DeleteFileA("msitest\\class.txt");
10384 delete_test_files();
10385 DeleteFile(msifile
);
10388 static void test_register_extension_info(void)
10394 if (is_process_limited())
10396 skip("process is limited\n");
10400 create_test_files();
10401 create_file("msitest\\extension.txt", 1000);
10402 create_database(msifile
, rei_tables
, sizeof(rei_tables
) / sizeof(msi_table
));
10404 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10406 r
= MsiInstallProductA(msifile
, NULL
);
10407 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
10409 skip("Not enough rights to perform tests\n");
10412 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10414 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, ".extension", &hkey
);
10415 ok(res
== ERROR_SUCCESS
, "key not created\n");
10418 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "Prog.Id.1\\shell\\Open\\command", &hkey
);
10419 ok(res
== ERROR_SUCCESS
, "key not created\n");
10422 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10423 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10425 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, ".extension", &hkey
);
10426 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10428 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "Prog.Id.1", &hkey
);
10429 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10431 ok(!delete_pf("msitest\\extension.txt", TRUE
), "file not removed\n");
10432 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10435 DeleteFileA("msitest\\extension.txt");
10436 delete_test_files();
10437 DeleteFile(msifile
);
10440 static void test_register_mime_info(void)
10446 if (is_process_limited())
10448 skip("process is limited\n");
10452 create_test_files();
10453 create_file("msitest\\mime.txt", 1000);
10454 create_database(msifile
, rmi_tables
, sizeof(rmi_tables
) / sizeof(msi_table
));
10456 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10458 r
= MsiInstallProductA(msifile
, NULL
);
10459 if (r
== ERROR_INSTALL_PACKAGE_REJECTED
)
10461 skip("Not enough rights to perform tests\n");
10464 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10466 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "MIME\\Database\\Content Type\\mime/type", &hkey
);
10467 ok(res
== ERROR_SUCCESS
, "key not created\n");
10470 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10471 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10473 res
= RegOpenKeyA(HKEY_CLASSES_ROOT
, "MIME\\Database\\Content Type\\mime/type", &hkey
);
10474 ok(res
== ERROR_FILE_NOT_FOUND
, "key not removed\n");
10476 ok(!delete_pf("msitest\\mime.txt", TRUE
), "file not removed\n");
10477 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10480 DeleteFileA("msitest\\mime.txt");
10481 delete_test_files();
10482 DeleteFile(msifile
);
10485 static void test_icon_table(void)
10487 MSIHANDLE hdb
= 0, record
;
10490 CHAR path
[MAX_PATH
], win9xpath
[MAX_PATH
];
10491 static const char prodcode
[] = "{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}";
10493 if (is_process_limited())
10495 skip("process is limited\n");
10499 create_database(msifile
, icon_base_tables
, sizeof(icon_base_tables
) / sizeof(msi_table
));
10501 res
= MsiOpenDatabase(msifile
, MSIDBOPEN_TRANSACT
, &hdb
);
10502 ok(res
== ERROR_SUCCESS
, "failed to open db: %d\n", res
);
10504 query
= "CREATE TABLE `Icon` (`Name` CHAR(72) NOT NULL, `Data` OBJECT NOT NULL PRIMARY KEY `Name`)";
10505 res
= run_query( hdb
, 0, query
);
10506 ok(res
== ERROR_SUCCESS
, "Can't create Icon table: %d\n", res
);
10508 create_file("icon.ico", 100);
10509 record
= MsiCreateRecord(1);
10510 res
= MsiRecordSetStream(record
, 1, "icon.ico");
10511 ok(res
== ERROR_SUCCESS
, "Failed to add stream data to record: %d\n", res
);
10512 DeleteFile("icon.ico");
10514 query
= "INSERT INTO `Icon` (`Name`, `Data`) VALUES ('testicon', ?)";
10515 res
= run_query(hdb
, record
, query
);
10516 ok(res
== ERROR_SUCCESS
, "Insert into Icon table failed: %d\n", res
);
10518 res
= MsiCloseHandle(record
);
10519 ok(res
== ERROR_SUCCESS
, "Failed to close record handle: %d\n", res
);
10520 res
= MsiDatabaseCommit(hdb
);
10521 ok(res
== ERROR_SUCCESS
, "Failed to commit database: %d\n", res
);
10522 res
= MsiCloseHandle(hdb
);
10523 ok(res
== ERROR_SUCCESS
, "Failed to close database: %d\n", res
);
10526 res
= MsiInstallProductA(msifile
, "PUBLISH_PRODUCT=1");
10527 if (res
== ERROR_INSTALL_PACKAGE_REJECTED
)
10529 skip("Not enough rights to perform tests\n");
10530 DeleteFile(msifile
);
10533 ok(res
== ERROR_SUCCESS
, "Failed to do per-user install: %d\n", res
);
10535 lstrcpyA(path
, APP_DATA_DIR
);
10536 lstrcatA(path
, "\\");
10537 lstrcatA(path
, "Microsoft\\Installer\\");
10538 lstrcatA(path
, prodcode
);
10539 lstrcatA(path
, "\\testicon");
10540 ok(file_exists(path
), "Per-user icon file isn't where it's expected (%s)\n", path
);
10542 res
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10543 ok(res
== ERROR_SUCCESS
, "Failed to uninstall per-user\n");
10546 res
= MsiInstallProductA(msifile
, "PUBLISH_PRODUCT=1 ALLUSERS=1");
10547 ok(res
== ERROR_SUCCESS
, "Failed to system-wide install: %d\n", res
);
10549 /* win9x with MSI 2.0 installs the icon to a different folder, same as above */
10550 lstrcpyA(win9xpath
, APP_DATA_DIR
);
10551 lstrcatA(win9xpath
, "\\");
10552 lstrcatA(win9xpath
, "Microsoft\\Installer\\");
10553 lstrcatA(win9xpath
, prodcode
);
10554 lstrcatA(win9xpath
, "\\testicon");
10556 lstrcpyA(path
, WINDOWS_DIR
);
10557 lstrcatA(path
, "\\");
10558 lstrcatA(path
, "Installer\\");
10559 lstrcatA(path
, prodcode
);
10560 lstrcatA(path
, "\\testicon");
10561 ok(file_exists(path
) || file_exists(win9xpath
),
10562 "System-wide icon file isn't where it's expected (%s)\n", path
);
10564 res
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10565 ok(res
== ERROR_SUCCESS
, "Failed to uninstall system-wide\n");
10567 delete_pfmsitest_files();
10568 DeleteFile(msifile
);
10571 static void test_sourcedir_props(void)
10577 win_skip("skipping sourcedir tests on win9x\n");
10580 if (is_process_limited())
10582 skip("process is limited\n");
10586 create_test_files();
10587 create_file("msitest\\sourcedir.txt", 1000);
10588 create_database(msifile
, sd_tables
, sizeof(sd_tables
) / sizeof(msi_table
));
10590 MsiSetInternalUI(INSTALLUILEVEL_FULL
, NULL
);
10592 /* full UI, no ResolveSource action */
10593 r
= MsiInstallProductA(msifile
, NULL
);
10594 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10596 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10597 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10599 ok(!delete_pf("msitest\\sourcedir.txt", TRUE
), "file not removed\n");
10600 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10602 /* full UI, ResolveSource action */
10603 r
= MsiInstallProductA(msifile
, "ResolveSource=1");
10604 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10606 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10607 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10609 ok(!delete_pf("msitest\\sourcedir.txt", TRUE
), "file not removed\n");
10610 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10612 MsiSetInternalUI(INSTALLUILEVEL_NONE
, NULL
);
10614 /* no UI, no ResolveSource action */
10615 r
= MsiInstallProductA(msifile
, NULL
);
10616 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10618 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10619 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10621 ok(!delete_pf("msitest\\sourcedir.txt", TRUE
), "file not removed\n");
10622 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10624 /* no UI, ResolveSource action */
10625 r
= MsiInstallProductA(msifile
, "ResolveSource=1");
10626 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10628 r
= MsiInstallProductA(msifile
, "REMOVE=ALL");
10629 ok(r
== ERROR_SUCCESS
, "Expected ERROR_SUCCESS, got %u\n", r
);
10631 ok(!delete_pf("msitest\\sourcedir.txt", TRUE
), "file not removed\n");
10632 ok(!delete_pf("msitest", FALSE
), "directory not removed\n");
10634 DeleteFileA("msitest\\sourcedir.txt");
10635 DeleteFile(msifile
);
10638 START_TEST(install
)
10641 char temp_path
[MAX_PATH
], prev_path
[MAX_PATH
], log_file
[MAX_PATH
];
10642 STATEMGRSTATUS status
;
10645 init_functionpointers();
10647 on_win9x
= check_win9x();
10649 GetCurrentDirectoryA(MAX_PATH
, prev_path
);
10650 GetTempPath(MAX_PATH
, temp_path
);
10651 SetCurrentDirectoryA(temp_path
);
10653 lstrcpyA(CURR_DIR
, temp_path
);
10654 len
= lstrlenA(CURR_DIR
);
10656 if(len
&& (CURR_DIR
[len
- 1] == '\\'))
10657 CURR_DIR
[len
- 1] = 0;
10662 /* Create a restore point ourselves so we circumvent the multitude of restore points
10663 * that would have been created by all the installation and removal tests.
10665 if (pSRSetRestorePointA
)
10667 memset(&status
, 0, sizeof(status
));
10668 ret
= notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE
, &status
);
10671 /* Create only one log file and don't append. We have to pass something
10672 * for the log mode for this to work. The logfile needs to have an absolute
10673 * path otherwise we still end up with some extra logfiles as some tests
10674 * change the current directory.
10676 lstrcpyA(log_file
, temp_path
);
10677 lstrcatA(log_file
, "\\msitest.log");
10678 MsiEnableLogA(INSTALLLOGMODE_FATALEXIT
, log_file
, 0);
10680 test_MsiInstallProduct();
10681 test_MsiSetComponentState();
10682 test_packagecoltypes();
10683 test_continuouscabs();
10686 test_samesequence();
10687 test_uiLevelFlags();
10688 test_readonlyfile();
10689 test_readonlyfile_cab();
10690 test_setdirproperty();
10691 test_cabisextracted();
10692 test_concurrentinstall();
10693 test_setpropertyfolder();
10694 test_publish_registerproduct();
10695 test_publish_publishproduct();
10696 test_publish_publishfeatures();
10697 test_publish_registeruser();
10698 test_publish_processcomponents();
10700 test_publishsourcelist();
10701 test_transformprop();
10702 test_currentworkingdir();
10705 test_removefiles();
10708 test_duplicatefiles();
10709 test_writeregistryvalues();
10710 test_sourcefolder();
10711 test_customaction51();
10712 test_installstate();
10714 test_MsiConfigureProductEx();
10715 test_missingcomponent();
10716 test_sourcedirprop();
10722 test_lastusedsource();
10723 test_preselected();
10724 test_installed_prop();
10725 test_file_in_use();
10726 test_file_in_use_cab();
10727 test_MsiSetExternalUI();
10728 test_allusers_prop();
10729 test_feature_override();
10730 test_create_folder();
10731 test_remove_folder();
10732 test_start_services();
10733 test_delete_services();
10734 test_self_registration();
10735 test_register_font();
10736 test_validate_product_id();
10737 test_install_remove_odbc();
10738 test_register_typelib();
10739 test_create_remove_shortcut();
10740 test_publish_components();
10741 test_remove_duplicate_files();
10742 test_remove_registry_values();
10743 test_find_related_products();
10744 test_remove_ini_values();
10745 test_remove_env_strings();
10746 test_register_class_info();
10747 test_register_extension_info();
10748 test_register_mime_info();
10750 test_sourcedir_props();
10752 DeleteFileA(log_file
);
10754 if (pSRSetRestorePointA
&& ret
)
10756 ret
= notify_system_change(END_NESTED_SYSTEM_CHANGE
, &status
);
10758 remove_restore_point(status
.llSequenceNumber
);
10760 FreeLibrary(hsrclient
);
10762 SetCurrentDirectoryA(prev_path
);