43DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
45static const char *
msifile =
"winetest-automation.msi";
56static const CHAR component_dat[] =
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
57 "s72\tS38\ts72\ti2\tS255\tS72\n"
58 "Component\tComponent\n"
59 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
60 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
61 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\t\tone.txt\n"
62 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
63 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
64 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
65 "component\t\tMSITESTDIR\t0\t1\tfile\n";
69 "Directory\tDirectory\n"
70 "CABOUTDIR\tMSITESTDIR\tcabout\n"
71 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
72 "FIRSTDIR\tMSITESTDIR\tfirst\n"
73 "MSITESTDIR\tProgramFilesFolder\tmsitest\n"
74 "NEWDIR\tCABOUTDIR\tnew\n"
75 "ProgramFilesFolder\tTARGETDIR\t.\n"
76 "TARGETDIR\t\tSourceDir\n";
78static const CHAR feature_dat[] =
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
79 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
81 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
82 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
83 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
84 "Three\tOne\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
85 "Two\tOne\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
86 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n";
90 "FeatureComponents\tFeature_\tComponent_\n"
96 "feature\tcomponent\n";
98static const CHAR file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
99 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
101 "five.txt\tFive\tfive.txt\t1000\t\t\t0\t5\n"
102 "four.txt\tFour\tfour.txt\t1000\t\t\t0\t4\n"
103 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
104 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
105 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
106 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n";
110 "InstallExecuteSequence\tAction\n"
111 "AllocateRegistrySpace\tNOT Installed\t1550\n"
112 "CostFinalize\t\t1000\n"
113 "CostInitialize\t\t800\n"
115 "InstallFiles\t\t4000\n"
116 "RegisterProduct\t\t6100\n"
117 "PublishProduct\t\t6400\n"
118 "InstallFinalize\t\t6600\n"
119 "InstallInitialize\t\t1500\n"
120 "InstallValidate\t\t1400\n"
121 "LaunchConditions\t\t100\n"
122 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000\n";
124static const CHAR media_dat[] =
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
125 "i2\ti4\tL64\tS255\tS32\tS72\n"
127 "1\t5\t\t\tDISK1\t\n";
131 "Property\tProperty\n"
132 "DefaultUIFont\tDlgFont8\n"
135 "InstallMode\tTypical\n"
136 "Manufacturer\tWine\n"
137 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
138 "ProductCode\t{837450fa-a39b-4bc8-b321-08b393f784b3}\n"
140 "ProductLanguage\t1033\n"
141 "ProductName\tMSITEST\n"
142 "ProductVersion\t1.1.1\n"
143 "PROMPTROLLBACKCOST\tP\n"
145 "UpgradeCode\t{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}\n"
146 "MSIFASTINSTALL\t1\n";
149 "s72\ti2\tl255\tL255\tL0\ts72\n"
150 "Registry\tRegistry\n"
151 "Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n"
152 "Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n"
153 "regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n"
154 "OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent\n";
156#define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)}
180#define ADD_INFO_I2(property, iValue) {property, VT_I2, iValue, NULL, NULL}
181#define ADD_INFO_I4(property, iValue) {property, VT_I4, iValue, NULL, NULL}
182#define ADD_INFO_LPSTR(property, szValue) {property, VT_LPSTR, 0, NULL, szValue}
183#define ADD_INFO_FILETIME(property, pftValue) {property, VT_FILETIME, 0, pftValue, NULL}
219 for (
j = 0;
j < num_info;
j++)
251 for (
j = 0;
j < num_tables;
j++)
321 create_file(
"msitest\\cabout\\new\\five.txt", 100);
347#define ok_w2(format, szString1, szString2) \
350 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
351 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
352 if (lstrcmpA(string1, string2) != 0) \
353 ok(0, format, string1, string2); \
356#define ok_w2n(format, szString1, szString2, len) \
358 if (memcmp(szString1, szString2, len * sizeof(WCHAR)) != 0) \
360 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \
361 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \
362 ok(0, format, string1, string2); \
365#define ok_aw(format, aString, wString) \
367 WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \
368 if (lstrcmpA(string1, aString) != 0) \
369 ok(0, format, string1, aString); \
371#define ok_awplus(format, extra, aString, wString) \
373 WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \
374 if (lstrcmpA(string1, aString) != 0) \
375 ok(0, format, extra, string1, aString); \
378#define ok_exception(hr, szDescription) \
379 if (hr == DISP_E_EXCEPTION) \
382 ok(excepinfo.wCode == 1000, "Exception info was %d, expected 1000\n", excepinfo.wCode); \
384 ok(excepinfo.bstrSource != NULL, "Exception source was NULL\n"); \
385 if (excepinfo.bstrSource) \
386 ok_w2("Exception source was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrSource, L"Msi API Error"); \
388 ok(excepinfo.bstrDescription != NULL, "Exception description was NULL\n"); \
389 if (excepinfo.bstrDescription) \
390 ok_w2("Exception description was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrDescription, szDescription); \
392 SysFreeString(excepinfo.bstrSource); \
393 SysFreeString(excepinfo.bstrDescription); \
394 SysFreeString(excepinfo.bstrHelpFile); \
409 r = IDispatch_GetIDsOfNames( disp, &
IID_NULL, &
str, 1, 0, &
id );
425 { 1,
"CreateRecord" },
426 { 2,
"OpenPackage" },
427 { 3,
"OpenProduct" },
428 { 4,
"OpenDatabase" },
429 { 5,
"SummaryInformation" },
432 { 8,
"InstallProduct" },
434 { 10,
"LastErrorRecord" },
435 { 11,
"RegistryValue" },
436 { 12,
"Environment" },
437 { 13,
"FileAttributes" },
439 { 16,
"FileVersion" },
440 { 17,
"ProductState" },
441 { 18,
"ProductInfo" },
442 { 19,
"ConfigureProduct",
TRUE },
443 { 20,
"ReinstallProduct",
TRUE },
444 { 21,
"CollectUserInfo",
TRUE },
445 { 22,
"ApplyPatch",
TRUE },
446 { 23,
"FeatureParent",
TRUE },
447 { 24,
"FeatureState",
TRUE },
448 { 25,
"UseFeature",
TRUE },
449 { 26,
"FeatureUsageCount",
TRUE },
450 { 27,
"FeatureUsageDate",
TRUE },
451 { 28,
"ConfigureFeature",
TRUE },
452 { 29,
"ReinstallFeature",
TRUE },
453 { 30,
"ProvideComponent",
TRUE },
454 { 31,
"ComponentPath",
TRUE },
455 { 32,
"ProvideQualifiedComponent",
TRUE },
456 { 33,
"QualifierDescription",
TRUE },
457 { 34,
"ComponentQualifiers",
TRUE },
459 { 36,
"Features",
TRUE },
460 { 37,
"Components",
TRUE },
461 { 38,
"ComponentClients",
TRUE },
462 { 39,
"Patches",
TRUE },
463 { 40,
"RelatedProducts" },
464 { 41,
"PatchInfo",
TRUE },
465 { 42,
"PatchTransforms",
TRUE },
466 { 43,
"AddSource",
TRUE },
467 { 44,
"ClearSourceList",
TRUE },
468 { 45,
"ForceSourceListResolution",
TRUE },
469 { 46,
"ShortcutTarget",
TRUE },
470 { 47,
"FileHash",
TRUE },
471 { 48,
"FileSignatureInfo",
TRUE },
484 ok(dispid ==
ptr->did,
"%s: expected %ld, got %ld\n",
ptr->name,
ptr->did, dispid);
489 ok(dispid == 49 || dispid == -1,
"Expected 49 or -1, got %ld\n", dispid);
491 ok(dispid == 51 || dispid == -1,
"Expected 51 or -1, got %ld\n", dispid);
493 ok(dispid == 52 || dispid == -1,
"Expected 52 or -1, got %ld\n", dispid);
495 ok(dispid == 55 || dispid == -1,
"Expected 55 or -1, got %ld\n", dispid);
497 ok(dispid == 57 || dispid == -1,
"Expected 57 or -1, got %ld\n", dispid);
499 ok(dispid == 59 || dispid == -1,
"Expected 59 or -1, got %ld\n", dispid);
501 ok(dispid == 60 || dispid == -1,
"Expected 60 or -1, got %ld\n", dispid);
503 ok(dispid == 61 || dispid == -1,
"Expected 61 or -1, got %ld\n", dispid);
505 ok(dispid == 62 || dispid == -1,
"Expected 62 or -1, got %ld\n", dispid);
507 ok(dispid == 63 || dispid == -1,
"Expected 63 or -1, got %ld\n", dispid);
509 ok(dispid == 65 || dispid == -1,
"Expected 65 or -1, got %ld\n", dispid);
521 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
535 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
551 dispparams.rgvarg = vararg;
552 dispparams.cArgs = 1;
558 dispparams.cArgs = 2;
567 dispparams.cArgs = 1;
579 dispparams.cArgs = 2;
592 dispparams.cArgs = 3;
604 dispparams.cArgs = 2;
622 dispparams.cArgs = 1;
636 dispparams.cArgs = 1;
643 skip(
"OpenPackage failed, insufficient rights?\n");
647 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
654 dispparams.cArgs = 2;
660 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
667 dispparams.cArgs = 3;
674 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
679 dispparams.cArgs = 2;
694 dispparams.cArgs = 2;
702 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
720 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
722 dispparams.rgvarg =
NULL;
723 dispparams.cArgs = 0;
727 dispparams.rgvarg =
NULL;
728 dispparams.cArgs = 0;
753 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
762 ok(
V_VT(pVarResult) == vtResult,
"Variant result type is %d, expected %d\n",
V_VT(pVarResult), vtResult);
766 ok(
hr ==
S_OK,
"VariantChangeTypeEx returned %#lx\n",
hr);
770 for (
i=0;
i<pDispParams->cArgs;
i++)
821 *pBool =
V_BOOL(&varresult);
850 V_I4(&vararg) = iValue;
889 V_I4(&vararg[0]) = openmode;
924 *pInstallState =
V_I4(&varresult);
952 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
979 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
992 DISPID dispid = DISPID_PROPERTYPUT;
993 DISPPARAMS dispparams = {&vararg, &dispid,
sizeof(vararg)/
sizeof(
VARIANTARG), 1};
1014 V_I4(&vararg[0]) = UpdateCount;
1024 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1053 DISPID dispid = DISPID_PROPERTYPUT;
1054 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1069 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1073 *pLangId =
V_I4(&varresult);
1087 V_I4(&vararg[0]) = iFlag;
1099 DISPID dispid = DISPID_PROPERTYPUT;
1100 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1104 V_I4(&vararg[1]) = iFlag;
1115 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1135 *iReturn =
V_I4(&varresult);
1152 *iReturn =
V_I4(&varresult);
1168 V_I4(vararg+1) = kind;
1172 ok(
V_VT(&varresult) ==
VT_I4,
"V_VT(varresult) = %d\n",
V_VT(&varresult));
1186 V_I4(&vararg[0]) = iInstallLevel;
1203 *pState =
V_I4(&varresult);
1220 *pState =
V_I4(&varresult);
1229 DISPID dispid = DISPID_PROPERTYPUT;
1230 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1237 V_I4(&vararg[0]) = iState;
1267 V_I4(&vararg[0]) = iUpdateCount;
1290 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1309 IDispatch_AddRef(pRecord);
1317 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1324 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1326 *pFieldCount =
V_I4(&varresult);
1340 V_I4(&vararg[0]) = iField;
1352 DISPID dispid = DISPID_PROPERTYPUT;
1353 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1357 V_I4(&vararg[1]) = iField;
1374 V_I4(&vararg[0]) = iField;
1386 DISPID dispid = DISPID_PROPERTYPUT;
1387 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1391 V_I4(&vararg[1]) = iField;
1394 V_I4(&vararg[0]) = iValue;
1402 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1417 V_I4(&vararg[0]) = iIndex;
1428 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1430 *pCount =
V_I4(&varresult);
1450 DISPID dispid = DISPID_PROPERTYPUT;
1451 DISPPARAMS dispparams = {vararg, &dispid,
ARRAY_SIZE(vararg), 1};
1465 DISPPARAMS dispparams = {
NULL,
NULL, 0, 0};
1469 *pCount =
V_I4(&varresult);
1476#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED 4
1487 ok(
hr ==
S_OK,
"SummaryInfo_PropertyCount failed, hresult %#lx\n",
hr);
1488 ok(
j == num_info,
"SummaryInfo_PropertyCount returned %d, expected %d\n",
j, num_info);
1491 for (
j = 0;
j < num_info;
j++)
1501 ok(
hr ==
S_OK,
"SummaryInfo_Property (pid %d) failed, hresult %#lx\n",
entry->property,
hr);
1502 if (
V_VT(&varresult) !=
vt)
1503 skip(
"Skipping property tests due to type mismatch\n");
1505 ok(
V_I4(&varresult) ==
entry->iValue,
"SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %ld\n",
1515 ok(
d ==
V_DATE(&varresult),
"SummaryInfo_Property (pid %d) DATE result expected to be %lf, but was %lf\n",
entry->property,
d,
V_DATE(&varresult));
1519 ok_awplus(
"SummaryInfo_Property (pid %d) BSTR result expected to be %s, but was %s\n",
entry->property,
entry->szValue,
V_BSTR(&varresult));
1522 skip(
"SummaryInfo_Property (pid %d) unhandled result type %d\n",
entry->property,
vt);
1540 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1543 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1547 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1550 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1553 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1556 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1567 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1570 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1571 ok(
V_I2(&
var) ==
V_I2(&varresult),
"SummaryInfo_PropertyGet expected %d, but returned %d\n",
V_I2(&
var),
V_I2(&varresult));
1579 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1582 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1583 ok_w2(
"SummaryInfo_PropertyGet expected %s, but returned %s\n",
V_BSTR(&
var),
V_BSTR(&varresult));
1592 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1595 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1604 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1607 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1608 ok(
V_I4(&
var) ==
V_I4(&varresult),
"SummaryInfo_PropertyGet expected %ld, but returned %ld\n",
V_I4(&
var),
V_I4(&varresult));
1614 ok(
hr ==
S_OK,
"SummaryInfo_PropertyCount failed, hresult %#lx\n",
hr);
1615 ok(
j == num_info+4,
"SummaryInfo_PropertyCount returned %d, expected %d\n",
j, num_info);
1624 hr =
Database_OpenView(pDatabase,
L"SELECT `Feature` FROM `Feature` WHERE `Feature_Parent`='One'", &pView);
1625 ok(
hr ==
S_OK,
"Database_OpenView failed, hresult %#lx\n",
hr);
1633 ok(
hr ==
S_OK,
"View_Execute failed, hresult %#lx\n",
hr);
1637 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1638 ok(pRecord !=
NULL,
"View_Fetch should not have returned NULL record\n");
1642 memset(szString, 0,
sizeof(szString));
1644 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1645 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Three");
1649 ok(
hr ==
S_OK,
"Record_StringDataPut failed, hresult %#lx\n",
hr);
1652 memset(szString, 0,
sizeof(szString));
1654 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1655 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Two");
1676 ok(
hr ==
S_OK,
"View_Modify failed, hresult %#lx\n",
hr);
1679 memset(szString, 0,
sizeof(szString));
1681 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1682 todo_wine ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Three");
1684 IDispatch_Release(pRecord);
1689 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1690 ok(pRecord !=
NULL,
"View_Fetch should not have returned NULL record\n");
1694 memset(szString, 0,
sizeof(szString));
1696 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1697 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Two");
1699 IDispatch_Release(pRecord);
1704 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1705 ok(pRecord ==
NULL,
"View_Fetch should have returned NULL record\n");
1707 IDispatch_Release(pRecord);
1711 ok(
hr ==
S_OK,
"View_Close failed, hresult %#lx\n",
hr);
1713 IDispatch_Release(pView);
1718 ok(
hr ==
S_OK,
"Database_SummaryInformation failed, hresult %#lx\n",
hr);
1719 ok(pSummaryInfo !=
NULL,
"Database_SummaryInformation should not have returned NULL record\n");
1723 IDispatch_Release(pSummaryInfo);
1735 ULONG refs_before, refs_after;
1740 ok(
hr ==
S_OK,
"Session_Installer failed, hresult %#lx\n",
hr);
1741 ok(pInst !=
NULL,
"Session_Installer returned NULL IDispatch pointer\n");
1742 ok(pInst ==
pInstaller,
"Session_Installer does not match Installer instance from CoCreateInstance\n");
1743 refs_before = IDispatch_AddRef(pInst);
1746 ok(
hr ==
S_OK,
"Session_Installer failed, hresult %#lx\n",
hr);
1747 ok(pInst !=
NULL,
"Session_Installer returned NULL IDispatch pointer\n");
1748 ok(pInst ==
pInstaller,
"Session_Installer does not match Installer instance from CoCreateInstance\n");
1749 refs_after = IDispatch_Release(pInst);
1750 ok(refs_before == refs_after,
"got %lu and %lu\n", refs_before, refs_after);
1755 ok(
hr ==
S_OK,
"Session_PropertyGet failed, hresult %#lx\n",
hr);
1760 ok(0,
"Property \"ProductName\" expected to be \"MSITEST\" but was \"%s\"\n",
string);
1765 ok(
hr ==
S_OK,
"Session_PropertyPut failed, hresult %#lx\n",
hr);
1768 ok(
hr ==
S_OK,
"Session_PropertyGet failed, hresult %#lx\n",
hr);
1773 ok(0,
"Property \"ProductName\" expected to be \"ProductName\" but was \"%s\"\n",
string);
1783 ok(
hr ==
S_OK,
"Session_PropertyPut failed, hresult %#lx\n",
hr);
1787 ok(
hr ==
S_OK,
"Session_LanguageGet failed, hresult %#lx\n",
hr);
1792 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1793 ok(!
bool,
"Reboot at end session mode is %d\n",
bool);
1796 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1797 ok(!
bool,
"Maintenance mode is %d\n",
bool);
1801 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1803 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1804 ok(
bool,
"Reboot at end session mode is %d, expected 1\n",
bool);
1806 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1809 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1813 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1814 ok(
bool,
"Reboot now mode is %d, expected 1\n",
bool);
1817 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1826 ok(
hr ==
S_OK,
"Session_Database failed, hresult %#lx\n",
hr);
1830 IDispatch_Release(pDatabase);
1835 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1839 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1843 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1848 ok(
hr ==
S_OK,
"Session_DoAction failed, hresult %#lx\n",
hr);
1849 ok(myint ==
IDOK,
"DoAction(CostInitialize) returned %d, %d expected\n", myint,
IDOK);
1853 ok(
hr ==
S_OK,
"Session_SetInstallLevel failed, hresult %#lx\n",
hr);
1857 ok(
hr ==
S_OK,
"Session_FeatureCurrentState failed, hresult %#lx\n",
hr);
1862 ok(
hr ==
S_OK,
"Installer_CreateRecord failed: %#lx\n",
hr);
1864 ok(
hr ==
S_OK,
"Session_Message failed: %#lx\n",
hr);
1865 ok(myint == 0,
"Session_Message returned %x\n", myint);
1869 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1873 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1878 ok(
hr ==
S_OK,
"Session_FeatureRequestStatePut failed, hresult %#lx\n",
hr);
1880 ok(
hr ==
S_OK,
"Session_FeatureRequestStateGet failed, hresult %#lx\n",
hr);
1885 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1889 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1916 static const DWORD qw[2] = { 0x12345678, 0x87654321 };
1920 HKEY hkey, hkey_sub;
1931 win_skip(
"Needed W-functions are not implemented\n");
1939 ok(
hr ==
S_OK,
"Installer_RegistryValueE failed, hresult %#lx\n",
hr);
1940 ok(!bRet,
"Registry key expected to not exist, but Installer_RegistryValue claims it does\n");
1942 memset(szString, 0,
sizeof(szString));
1946 memset(szString, 0,
sizeof(szString));
1954 "RegSetValueExW failed\n");
1956 "RegSetValueExW failed\n");
1958 "RegSetValueExW failed\n");
1960 ok(bRet,
"SetEnvironmentVariableA failed %lu\n",
GetLastError());
1962 "RegSetValueExW failed\n");
1964 "RegSetValueExW failed\n");
1966 "RegSetValueExW failed\n");
1968 "RegSetValueExW failed\n");
1971 "RegSetValueExW failed\n");
1978 ok(
hr ==
S_OK,
"Installer_RegistryValueE failed, hresult %#lx\n",
hr);
1979 ok(bRet,
"Registry key expected to exist, but Installer_RegistryValue claims it does not\n");
1981 memset(szString, 0,
sizeof(szString));
1983 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
1984 ok_w2(
"Default registry value \"%s\" does not match expected \"%s\"\n", szString,
L"One");
1987 memset(szString, 0,
sizeof(szString));
1992 memset(szString, 0,
sizeof(szString));
1994 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
1995 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"One");
2001 ok(
hr ==
S_OK,
"Installer_RegistryValue failed, hresult %#lx\n",
hr);
2002 ok(
V_I4(&varresult) == 305419896,
"Registry value %ld does not match expected value\n",
V_I4(&varresult));
2005 memset(szString, 0,
sizeof(szString));
2007 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2008 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"(REG_BINARY)");
2010 memset(szString, 0,
sizeof(szString));
2012 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2013 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"Four");
2016 memset(szString, 0,
sizeof(szString));
2018 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2019 ok_w2n(
"Registry value \"%s\" does not match expected \"%s\"\n",
2020 szString,
L"Five\nHi",
lstrlenW(
L"Five\nHi"));
2022 memset(szString, 0,
sizeof(szString));
2024 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2026 "Registry value does not match\n");
2032 ok(
hr ==
S_OK,
"Installer_RegistryValue failed, hresult %#lx\n",
hr);
2035 memset(szString, 0,
sizeof(szString));
2037 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2038 ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"");
2041 memset(szString, 0,
sizeof(szString));
2043 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2045 todo_wine ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"Two");
2048 memset(szString, 0,
sizeof(szString));
2050 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2053 memset(szString, 0,
sizeof(szString));
2055 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2056 ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"Eight");
2059 memset(szString, 0,
sizeof(szString));
2061 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2082 ok(
hr ==
S_OK,
"Installer_Products failed, hresult %#lx\n",
hr);
2087 ok(
hr ==
S_OK,
"StringList_NewEnum failed, hresult %#lx\n",
hr);
2090 hr = IUnknown_QueryInterface(
pUnk, &IID_IEnumVARIANT, (
void **)&pEnum);
2091 ok (
hr ==
S_OK,
"IUnknown::QueryInterface returned %#lx\n",
hr);
2094 skip(
"IEnumVARIANT tests\n");
2098 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2103 memset(szString, 0,
sizeof(szString));
2105 ok(
hr ==
S_OK,
"StringList_Item failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2111 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2117 if (!bProductFound && !
lstrcmpW(szString,
L"{837450fa-a39b-4bc8-b321-08b393f784b3}"))
2118 bProductFound =
TRUE;
2123 hr = IEnumVARIANT_Next(pEnum, 1, &
var, &celt);
2124 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2125 ok(celt == 1,
"%lu items were retrieved, expected 1\n", celt);
2127 ok_w2(
"%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString,
V_BSTR(&
var));
2133 if (bProductInstalled)
2135 ok(bProductInstalled == bProductFound,
"Product expected to %s installed but product code was %s\n",
2136 bProductInstalled ?
"be" :
"not be",
2137 bProductFound ?
"found" :
"not found");
2147 IEnumVARIANT_Clone(pEnum,
NULL);
2151 hr = IEnumVARIANT_Clone(pEnum, &pEnum2);
2152 ok(
hr ==
S_OK,
"IEnumVARIANT_Clone failed, hresult %#lx\n",
hr);
2160 hr = IEnumVARIANT_Next(pEnum2, 1, &
var, &celt);
2161 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2162 ok(celt == 1,
"%lu items were retrieved, expected 0\n", celt);
2167 skip(
"IEnumVARIANT::Next of clone will not return success with 0 products\n");
2169 IEnumVARIANT_Release(pEnum2);
2173 hr = IEnumVARIANT_Skip(pEnum, 1);
2174 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Skip failed, hresult %#lx\n",
hr);
2177 hr = IEnumVARIANT_Next(pEnum, 1,
NULL, &celt);
2178 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2179 ok(celt == 0,
"%lu items were retrieved, expected 0\n", celt);
2182 hr = IEnumVARIANT_Next(pEnum, 1, &
var, &celt);
2183 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2184 ok(celt == 0,
"%lu items were retrieved, expected 0\n", celt);
2188 hr = IEnumVARIANT_Reset(pEnum);
2189 ok(
hr ==
S_OK,
"IEnumVARIANT_Reset failed, hresult %#lx\n",
hr);
2194 hr = IEnumVARIANT_Skip(pEnum, iCount-1);
2195 ok(
hr ==
S_OK,
"IEnumVARIANT_Skip failed, hresult %#lx\n",
hr);
2199 hr = IEnumVARIANT_Next(pEnum, 1, &
var,
NULL);
2200 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2202 ok_w2(
"%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString,
V_BSTR(&
var));
2206 skip(
"IEnumVARIANT::Skip impossible for 0 products\n");
2210 memset(szString, 0,
sizeof(szString));
2212 ok(
hr ==
DISP_E_BADINDEX,
"StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult %#lx\n",
hr);
2214 if (pEnum) IEnumVARIANT_Release(pEnum);
2216 IDispatch_Release(pStringList);
2231 ret =
RegQueryInfoKeyA(hkey,
NULL,
NULL,
NULL,
NULL, &
dwSize,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2258 ret =
RegQueryInfoKeyA(hkey,
NULL,
NULL,
NULL,
NULL, &
dwSize,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2265 if (!
strcmp(
string, findkey))
2295 skip(
"Installer_InstallProduct (insufficient privileges)\n");
2306 ok(
hr ==
S_OK,
"Expected UILevel property put invoke to return S_OK, got %#lx\n",
hr);
2312 skip(
"InstallProduct failed, insufficient rights?\n");
2316 ok(
hr ==
S_OK,
"Installer_InstallProduct failed, hresult %#lx\n",
hr);
2320 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2326 memset(szString, 0,
sizeof(szString));
2332 memset(szString, 0,
sizeof(szString));
2338 memset(szString, 0,
sizeof(szString));
2340 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2341 todo_wine ok_w2(
"Installer_ProductInfo returned %s but expected %s\n", szString,
L"winetest-automation.msi");
2344 memset(szString, 0,
sizeof(szString));
2346 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2347 todo_wine ok_w2(
"Installer_ProductInfo returned %s but expected %s\n", szString,
L"MSITEST");
2354 ok(
hr ==
S_OK,
"Installer_RelatedProducts failed, hresult %#lx\n",
hr);
2359 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2360 ok(iCount == 1,
"Expected one related product but found %d\n", iCount);
2363 memset(szString, 0,
sizeof(szString));
2365 ok(
hr ==
S_OK,
"StringList_Item failed (idx 0, count %d), hresult %#lx\n", iCount,
hr);
2366 ok_w2(
"StringList_Item returned %s but expected %s\n", szString,
L"{837450fa-a39b-4bc8-b321-08b393f784b3}");
2368 IDispatch_Release(pStringList);
2372 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2376 ok(
delete_pf(
"msitest\\cabout\\new\\five.txt",
TRUE),
"File not installed\n");
2378 ok(
delete_pf(
"msitest\\cabout\\four.txt",
TRUE),
"File not installed\n");
2380 ok(
delete_pf(
"msitest\\changed\\three.txt",
TRUE),
"File not installed\n");
2382 ok(
delete_pf(
"msitest\\first\\two.txt",
TRUE),
"File not installed\n");
2406 ok(
num == 314,
"Expected 314, got %lu\n",
num);
2421 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{837450fa-a39b-4bc8-b321-08b393f784b3}",
2426 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656",
access, 0);
2430 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData",
"af054738b93a8cb43b12803b397f483b",
access, &hkey);
2438 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\af054738b93a8cb43b12803b397f483b",
access, 0);
2448 res =
RegDeleteKeyA(hkey,
"UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656");
2475 ok(
hr ==
S_OK,
"Installer_CreateRecord failed, hresult %#lx\n",
hr);
2476 ok(pRecord !=
NULL,
"Installer_CreateRecord should not have returned NULL record\n");
2481 ok(
hr ==
S_OK,
"Record_FiledCountGet failed, hresult %#lx\n",
hr);
2482 ok(iValue == 1,
"Record_FieldCountGet result was %d but expected 1\n", iValue);
2486 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2491 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2496 ok(
hr ==
S_OK,
"Record_IntegerDataPut failed, hresult %#lx\n",
hr);
2505 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2506 ok(iValue == 100,
"Record_IntegerDataGet result was %d but expected 100\n", iValue);
2508 IDispatch_Release(pRecord);
2517 skip(
"OpenPackage failed, insufficient rights?\n");
2521 ok(
hr ==
S_OK,
"Installer_OpenPackage failed, hresult %#lx\n",
hr);
2525 IDispatch_Release(pSession);
2530 ok(
hr ==
S_OK,
"Installer_OpenDatabase failed, hresult %#lx\n",
hr);
2534 IDispatch_Release(pDatabase);
2539 ok(
hr ==
S_OK,
"Installer_SummaryInformation failed, hresult %#lx\n",
hr);
2543 IDispatch_Release(pSumInfo);
2554 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2576 ok(
hr ==
S_OK,
"Installer_RelatedProducts failed, hresult %#lx\n",
hr);
2581 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2582 ok(!iCount,
"Expected no related products but found %d\n", iCount);
2584 IDispatch_Release(pStringList);
2590 ok(
hr ==
S_OK,
"Installer_VersionGet failed, hresult %#lx\n",
hr);
2624 ok (
hr ==
S_OK,
"OleInitialize returned %#lx\n",
hr);
2626 ok (
hr ==
S_OK,
"CLSIDFromProgID returned %#lx\n",
hr);
2628 ok(
hr ==
S_OK,
"CoCreateInstance returned %#lx\n",
hr);
2633 ok (
hr ==
S_OK,
"IUnknown::QueryInterface returned %#lx\n",
hr);
2640 IUnknown_Release(
pUnk);
static char CURR_DIR[MAX_PATH]
int strcmp(const char *String1, const char *String2)
static const WCHAR nameW[]
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegDeleteKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegEnumKeyA(HKEY hKey, DWORD dwIndex, LPSTR lpName, DWORD cbName)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
#define ERROR_CALL_NOT_IMPLEMENTED
#define CreateFileA(a, b, c, d, e, f, g)
#define GetCurrentProcess()
#define ERROR_NO_MORE_ITEMS
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
UINT WINAPI MsiDatabaseImportA(MSIHANDLE handle, const char *szFolder, const char *szFilename)
UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phDB)
UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const char *szValue)
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE handle)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
static BOOL is_process_elevated(void)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLint GLboolean GLint GLenum access
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define create_file(name, size)
void restart_as_admin_elevated(void)
static HRESULT SummaryInfo_PropertyGet(IDispatch *pSummaryInfo, int pid, VARIANT *pVarResult, VARTYPE vtExpect)
static const CHAR registry_dat[]
static const CHAR property_dat[]
static HRESULT View_Execute(IDispatch *pView, IDispatch *pRecord)
static void test_Installer_Products(BOOL bProductInstalled)
static CHAR string2[MAX_PATH]
static HRESULT View_Fetch(IDispatch *pView, IDispatch **ppRecord)
static HRESULT Installer_CreateRecord(int count, IDispatch **pRecord)
static HRESULT Session_DoAction(IDispatch *pSession, LPCWSTR szAction, int *iReturn)
static HRESULT Record_IntegerDataGet(IDispatch *pRecord, int iField, int *pValue)
#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED
static const CHAR directory_dat[]
static HRESULT Session_Database(IDispatch *pSession, IDispatch **pDatabase)
static HRESULT StringList_Count(IDispatch *pStringList, int *pCount)
static void delete_test_files(void)
static HRESULT Session_LanguageGet(IDispatch *pSession, UINT *pLangId)
static const msi_summary_info summary_info[]
static HRESULT Installer_VersionGet(LPWSTR szVersion)
#define ADD_INFO_FILETIME(property, pftValue)
static HRESULT Installer_SummaryInformation(BSTR PackagePath, int UpdateCount, IDispatch **pSumInfo)
static const CHAR file_dat[]
static HRESULT Installer_ProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR szString)
static void test_Database(IDispatch *pDatabase, BOOL readonly)
static HRESULT Record_StringDataGet(IDispatch *pRecord, int iField, LPWSTR szString)
static HRESULT StringList__NewEnum(IDispatch *pList, IUnknown **ppEnumVARIANT)
static HRESULT Session_PropertyGet(IDispatch *pSession, LPCWSTR szName, LPWSTR szReturn)
static HRESULT Session_EvaluateCondition(IDispatch *pSession, LPCWSTR szCondition, int *iReturn)
static HRESULT Session_SetInstallLevel(IDispatch *pSession, LONG iInstallLevel)
static void test_Installer(void)
static void test_Installer_RegistryValue(void)
static void test_Session(IDispatch *pSession)
static const CHAR install_exec_seq_dat[]
static HRESULT Installer_OpenPackage(LPCWSTR szPackagePath, int options, IDispatch **pSession)
static FILETIME systemtime
static HRESULT Database_OpenView(IDispatch *pDatabase, LPCWSTR szSql, IDispatch **pView)
static void create_database_suminfo(const CHAR *name, const msi_table *tables, int num_tables, const msi_summary_info *info, int num_info)
#define ok_w2n(format, szString1, szString2, len)
static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, VARTYPE vtResult)
#define ok_w2(format, szString1, szString2)
static void test_Installer_InstallProduct(void)
static HRESULT Record_StringDataPut(IDispatch *pRecord, int iField, LPCWSTR szString)
static HRESULT Installer_ProductState(LPCWSTR szProduct, int *pInstallState)
static HRESULT Record_IntegerDataPut(IDispatch *pRecord, int iField, int iValue)
static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szString)
static HRESULT Session_ModePut(IDispatch *pSession, int iFlag, VARIANT_BOOL mode)
static void create_test_files(void)
static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, REGSAM access, HKEY *phkey)
static HRESULT View_Modify(IDispatch *pView, int iMode, IDispatch *pRecord)
static HRESULT Installer_Products(IDispatch **pStringList)
static HRESULT SummaryInfo_PropertyCountGet(IDispatch *pSummaryInfo, int *pCount)
static HRESULT Installer_RegistryValueE(HKEY hkey, LPCWSTR szKey, BOOL *pBool)
static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *info, int num_info, BOOL readonly)
struct _msi_summary_info msi_summary_info
static const CHAR feature_dat[]
static const char * msifile
static CHAR string1[MAX_PATH]
static const msi_table tables[]
static EXCEPINFO excepinfo
static HRESULT Database_SummaryInformation(IDispatch *pDatabase, int iUpdateCount, IDispatch **pSummaryInfo)
#define ok_exception(hr, szDescription)
static void test_dispatch(void)
#define ok_awplus(format, extra, aString, wString)
static HRESULT Installer_RegistryValue(HKEY hkey, LPCWSTR szKey, VARIANT vValue, VARIANT *pVarResult, VARTYPE vtExpect)
static HRESULT View_Close(IDispatch *pView)
static HRESULT Session_FeatureRequestStateGet(IDispatch *pSession, LPCWSTR szName, int *pState)
static HRESULT SummaryInfo_PropertyPut(IDispatch *pSummaryInfo, int pid, VARIANT *pVariant)
static const get_did_t get_did_data[]
static UINT delete_registry_key(HKEY hkeyParent, LPCSTR subkey, REGSAM access)
static int _invoke_todo_vtResult
static HRESULT Installer_UILevelPut(int level)
static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LPWSTR szString, VARTYPE vtResult)
static const CHAR component_dat[]
static const CHAR media_dat[]
static DISPID get_dispid(IDispatch *disp, const char *name)
static HRESULT Installer_RegistryValueW(HKEY hkey, LPCWSTR szKey, LPCWSTR szValue, LPWSTR szString)
static BOOL create_package(LPWSTR path)
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
static HRESULT Installer_RelatedProducts(LPCWSTR szProduct, IDispatch **pStringList)
#define ADD_INFO_I4(property, iValue)
static HRESULT Installer_InstallProduct(LPCWSTR szPackagePath, LPCWSTR szPropertyValues)
static void test_dispid(void)
static HRESULT Session_FeatureRequestStatePut(IDispatch *pSession, LPCWSTR szName, int iState)
static HRESULT Session_PropertyPut(IDispatch *pSession, LPCWSTR szName, LPCWSTR szValue)
static void write_msi_summary_info(MSIHANDLE db, const msi_summary_info *info, int num_info)
static const CHAR feature_comp_dat[]
static HRESULT Session_ModeGet(IDispatch *pSession, int iFlag, VARIANT_BOOL *mode)
static HRESULT Record_FieldCountGet(IDispatch *pRecord, int *pFieldCount)
#define ADD_INFO_LPSTR(property, szValue)
static void write_file(const CHAR *filename, const char *data, int data_size)
static IDispatch * pInstaller
static HRESULT Session_FeatureCurrentState(IDispatch *pSession, LPCWSTR szName, int *pState)
static HRESULT Installer_OpenDatabase(LPCWSTR szDatabasePath, int openmode, IDispatch **pDatabase)
static HRESULT Session_Message(IDispatch *pSession, LONG kind, IDispatch *record, int *ret)
static BOOL get_program_files_dir(LPSTR buf)
#define todo_wine_if(is_todo)
BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
char PROG_FILES_DIR[MAX_PATH]
static const WCHAR szAttribute[]
static VARIANTARG static DISPID
INTERNETFEATURELIST feature
@ INSTALLSTATE_ADVERTISED
UINT WINAPI MsiDatabaseCommit(MSIHANDLE hdb)
#define MSIDBOPEN_TRANSACT
#define KEY_ENUMERATE_SUB_KEYS
#define LOCALE_USER_DEFAULT
BSTR WINAPI SysAllocString(LPCOLESTR str)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYGET
static const WCHAR szName[]
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define delete_key(r, p, s)
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME lpSt, double *pDateOut)
HRESULT WINAPI VariantCopyInd(VARIANT *pvargDest, VARIANTARG *pvargSrc)
HRESULT WINAPI VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
static char * stringw(char *buf, char *end, const wchar_t *sw, int len, int field_width, int precision, int flags)
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ _In_ WORD wFlags
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
#define DISP_E_MEMBERNOTFOUND
#define DISP_E_TYPEMISMATCH
#define DISP_E_UNKNOWNNAME
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER