45 DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
47 static const char *
msifile =
"winetest-automation.msi";
59 static const CHAR component_dat[] =
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 60 "s72\tS38\ts72\ti2\tS255\tS72\n" 61 "Component\tComponent\n" 62 "Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n" 63 "Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n" 64 "One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\t\tone.txt\n" 65 "Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n" 66 "Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n" 67 "dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n" 68 "component\t\tMSITESTDIR\t0\t1\tfile\n";
72 "Directory\tDirectory\n" 73 "CABOUTDIR\tMSITESTDIR\tcabout\n" 74 "CHANGEDDIR\tMSITESTDIR\tchanged:second\n" 75 "FIRSTDIR\tMSITESTDIR\tfirst\n" 76 "MSITESTDIR\tProgramFilesFolder\tmsitest\n" 77 "NEWDIR\tCABOUTDIR\tnew\n" 78 "ProgramFilesFolder\tTARGETDIR\t.\n" 79 "TARGETDIR\t\tSourceDir\n";
81 static const CHAR feature_dat[] =
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" 82 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" 84 "Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n" 85 "Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n" 86 "One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n" 87 "Three\tOne\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n" 88 "Two\tOne\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n" 89 "feature\t\t\t\t2\t1\tTARGETDIR\t0\n";
93 "FeatureComponents\tFeature_\tComponent_\n" 99 "feature\tcomponent\n";
101 static const CHAR file_dat[] =
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" 102 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" 104 "five.txt\tFive\tfive.txt\t1000\t\t\t0\t5\n" 105 "four.txt\tFour\tfour.txt\t1000\t\t\t0\t4\n" 106 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n" 107 "three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n" 108 "two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n" 109 "file\tcomponent\tfilename\t100\t\t\t8192\t1\n";
113 "InstallExecuteSequence\tAction\n" 114 "AllocateRegistrySpace\tNOT Installed\t1550\n" 115 "CostFinalize\t\t1000\n" 116 "CostInitialize\t\t800\n" 118 "InstallFiles\t\t4000\n" 119 "RegisterProduct\t\t6100\n" 120 "PublishProduct\t\t6400\n" 121 "InstallFinalize\t\t6600\n" 122 "InstallInitialize\t\t1500\n" 123 "InstallValidate\t\t1400\n" 124 "LaunchConditions\t\t100\n" 125 "WriteRegistryValues\tSourceDir And SOURCEDIR\t5000\n";
127 static const CHAR media_dat[] =
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" 128 "i2\ti4\tL64\tS255\tS32\tS72\n" 130 "1\t5\t\t\tDISK1\t\n";
134 "Property\tProperty\n" 135 "DefaultUIFont\tDlgFont8\n" 138 "InstallMode\tTypical\n" 139 "Manufacturer\tWine\n" 140 "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n" 141 "ProductCode\t{837450fa-a39b-4bc8-b321-08b393f784b3}\n" 143 "ProductLanguage\t1033\n" 144 "ProductName\tMSITEST\n" 145 "ProductVersion\t1.1.1\n" 146 "PROMPTROLLBACKCOST\tP\n" 148 "UpgradeCode\t{CE067E8D-2E1A-4367-B734-4EB2BDAD6565}\n" 149 "MSIFASTINSTALL\t1\n";
152 "s72\ti2\tl255\tL255\tL0\ts72\n" 153 "Registry\tRegistry\n" 154 "Apples\t1\tSOFTWARE\\Wine\\msitest\tName\timaname\tOne\n" 155 "Oranges\t1\tSOFTWARE\\Wine\\msitest\tnumber\t#314\tTwo\n" 156 "regdata\t1\tSOFTWARE\\Wine\\msitest\tblah\tbad\tdangler\n" 157 "OrderTest\t1\tSOFTWARE\\Wine\\msitest\tOrderTestName\tOrderTestValue\tcomponent\n";
166 #define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)} 190 #define ADD_INFO_I2(property, iValue) {property, VT_I2, iValue, NULL, NULL} 191 #define ADD_INFO_I4(property, iValue) {property, VT_I4, iValue, NULL, NULL} 192 #define ADD_INFO_LPSTR(property, szValue) {property, VT_LPSTR, 0, NULL, szValue} 193 #define ADD_INFO_FILETIME(property, pftValue) {property, VT_FILETIME, 0, pftValue, NULL} 210 #define GET_PROC(dll, func) \ 211 p ## func = (void *)GetProcAddress(dll, #func); \ 213 trace("GetProcAddress(%s) failed\n", #func); 232 trace(
"Could not check if the current user is an administrator\n");
259 if (pRegDeleteKeyExA)
260 return pRegDeleteKeyExA(
key, subkey,
access, 0 );
288 for (
j = 0;
j < num_info;
j++)
320 for (
j = 0;
j < num_tables;
j++)
410 create_file(
"msitest\\cabout\\new\\five.txt", 100);
451 #define ok_w2(format, szString1, szString2) \ 454 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \ 455 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \ 456 if (lstrcmpA(string1, string2) != 0) \ 457 ok(0, format, string1, string2); \ 460 #define ok_w2n(format, szString1, szString2, len) \ 462 if (memcmp(szString1, szString2, len * sizeof(WCHAR)) != 0) \ 464 WideCharToMultiByte(CP_ACP, 0, szString1, -1, string1, MAX_PATH, NULL, NULL); \ 465 WideCharToMultiByte(CP_ACP, 0, szString2, -1, string2, MAX_PATH, NULL, NULL); \ 466 ok(0, format, string1, string2); \ 469 #define ok_aw(format, aString, wString) \ 471 WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \ 472 if (lstrcmpA(string1, aString) != 0) \ 473 ok(0, format, string1, aString); \ 475 #define ok_awplus(format, extra, aString, wString) \ 477 WideCharToMultiByte(CP_ACP, 0, wString, -1, string1, MAX_PATH, NULL, NULL); \ 478 if (lstrcmpA(string1, aString) != 0) \ 479 ok(0, format, extra, string1, aString); \ 482 #define ok_exception(hr, szDescription) \ 483 if (hr == DISP_E_EXCEPTION) \ 486 ok(excepinfo.wCode == 1000, "Exception info was %d, expected 1000\n", excepinfo.wCode); \ 488 ok(excepinfo.bstrSource != NULL, "Exception source was NULL\n"); \ 489 if (excepinfo.bstrSource) \ 490 ok_w2("Exception source was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrSource, L"Msi API Error"); \ 492 ok(excepinfo.bstrDescription != NULL, "Exception description was NULL\n"); \ 493 if (excepinfo.bstrDescription) \ 494 ok_w2("Exception description was \"%s\" but expected to be \"%s\"\n", excepinfo.bstrDescription, szDescription); \ 496 SysFreeString(excepinfo.bstrSource); \ 497 SysFreeString(excepinfo.bstrDescription); \ 498 SysFreeString(excepinfo.bstrHelpFile); \ 513 r = IDispatch_GetIDsOfNames( disp, &
IID_NULL, &
str, 1, 0, &
id );
529 { 1,
"CreateRecord" },
530 { 2,
"OpenPackage" },
531 { 3,
"OpenProduct" },
532 { 4,
"OpenDatabase" },
533 { 5,
"SummaryInformation" },
536 { 8,
"InstallProduct" },
538 { 10,
"LastErrorRecord" },
539 { 11,
"RegistryValue" },
540 { 12,
"Environment" },
541 { 13,
"FileAttributes" },
543 { 16,
"FileVersion" },
544 { 17,
"ProductState" },
545 { 18,
"ProductInfo" },
546 { 19,
"ConfigureProduct",
TRUE },
547 { 20,
"ReinstallProduct",
TRUE },
548 { 21,
"CollectUserInfo",
TRUE },
549 { 22,
"ApplyPatch",
TRUE },
550 { 23,
"FeatureParent",
TRUE },
551 { 24,
"FeatureState",
TRUE },
552 { 25,
"UseFeature",
TRUE },
553 { 26,
"FeatureUsageCount",
TRUE },
554 { 27,
"FeatureUsageDate",
TRUE },
555 { 28,
"ConfigureFeature",
TRUE },
556 { 29,
"ReinstallFeature",
TRUE },
557 { 30,
"ProvideComponent",
TRUE },
558 { 31,
"ComponentPath",
TRUE },
559 { 32,
"ProvideQualifiedComponent",
TRUE },
560 { 33,
"QualifierDescription",
TRUE },
561 { 34,
"ComponentQualifiers",
TRUE },
563 { 36,
"Features",
TRUE },
564 { 37,
"Components",
TRUE },
565 { 38,
"ComponentClients",
TRUE },
566 { 39,
"Patches",
TRUE },
567 { 40,
"RelatedProducts" },
568 { 41,
"PatchInfo",
TRUE },
569 { 42,
"PatchTransforms",
TRUE },
570 { 43,
"AddSource",
TRUE },
571 { 44,
"ClearSourceList",
TRUE },
572 { 45,
"ForceSourceListResolution",
TRUE },
573 { 46,
"ShortcutTarget",
TRUE },
574 { 47,
"FileHash",
TRUE },
575 { 48,
"FileSignatureInfo",
TRUE },
588 ok(dispid ==
ptr->did,
"%s: expected %ld, got %ld\n",
ptr->name,
ptr->did, dispid);
593 ok(dispid == 49 || dispid == -1,
"Expected 49 or -1, got %ld\n", dispid);
595 ok(dispid == 51 || dispid == -1,
"Expected 51 or -1, got %ld\n", dispid);
597 ok(dispid == 52 || dispid == -1,
"Expected 52 or -1, got %ld\n", dispid);
599 ok(dispid == 55 || dispid == -1,
"Expected 55 or -1, got %ld\n", dispid);
601 ok(dispid == 57 || dispid == -1,
"Expected 57 or -1, got %ld\n", dispid);
603 ok(dispid == 59 || dispid == -1,
"Expected 59 or -1, got %ld\n", dispid);
605 ok(dispid == 60 || dispid == -1,
"Expected 60 or -1, got %ld\n", dispid);
607 ok(dispid == 61 || dispid == -1,
"Expected 61 or -1, got %ld\n", dispid);
609 ok(dispid == 62 || dispid == -1,
"Expected 62 or -1, got %ld\n", dispid);
611 ok(dispid == 63 || dispid == -1,
"Expected 63 or -1, got %ld\n", dispid);
613 ok(dispid == 65 || dispid == -1,
"Expected 65 or -1, got %ld\n", dispid);
639 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
655 dispparams.rgvarg = vararg;
656 dispparams.cArgs = 1;
662 dispparams.cArgs = 2;
671 dispparams.cArgs = 1;
683 dispparams.cArgs = 2;
696 dispparams.cArgs = 3;
708 dispparams.cArgs = 2;
726 dispparams.cArgs = 1;
740 dispparams.cArgs = 1;
747 skip(
"OpenPackage failed, insufficient rights?\n");
751 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
758 dispparams.cArgs = 2;
764 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
771 dispparams.cArgs = 3;
778 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
783 dispparams.cArgs = 2;
798 dispparams.cArgs = 2;
806 ok(
hr ==
S_OK,
"IDispatch::Invoke returned %#lx\n",
hr);
824 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
826 dispparams.rgvarg =
NULL;
827 dispparams.cArgs = 0;
831 dispparams.rgvarg =
NULL;
832 dispparams.cArgs = 0;
857 ok(
hr ==
S_OK,
"IDispatch::GetIDsOfNames returned %#lx\n",
hr);
866 ok(
V_VT(pVarResult) == vtResult,
"Variant result type is %d, expected %d\n",
V_VT(pVarResult), vtResult);
870 ok(
hr ==
S_OK,
"VariantChangeTypeEx returned %#lx\n",
hr);
874 for (
i=0;
i<pDispParams->cArgs;
i++)
925 *pBool =
V_BOOL(&varresult);
954 V_I4(&vararg) = iValue;
993 V_I4(&vararg[0]) = openmode;
1028 *pInstallState =
V_I4(&varresult);
1096 DISPID dispid = DISPID_PROPERTYPUT;
1118 V_I4(&vararg[0]) = UpdateCount;
1157 DISPID dispid = DISPID_PROPERTYPUT;
1177 *pLangId =
V_I4(&varresult);
1191 V_I4(&vararg[0]) = iFlag;
1203 DISPID dispid = DISPID_PROPERTYPUT;
1208 V_I4(&vararg[1]) = iFlag;
1239 *iReturn =
V_I4(&varresult);
1256 *iReturn =
V_I4(&varresult);
1272 V_I4(vararg+1) = kind;
1276 ok(
V_VT(&varresult) ==
VT_I4,
"V_VT(varresult) = %d\n",
V_VT(&varresult));
1290 V_I4(&vararg[0]) = iInstallLevel;
1307 *pState =
V_I4(&varresult);
1324 *pState =
V_I4(&varresult);
1333 DISPID dispid = DISPID_PROPERTYPUT;
1341 V_I4(&vararg[0]) = iState;
1371 V_I4(&vararg[0]) = iUpdateCount;
1413 IDispatch_AddRef(pRecord);
1430 *pFieldCount =
V_I4(&varresult);
1444 V_I4(&vararg[0]) = iField;
1456 DISPID dispid = DISPID_PROPERTYPUT;
1461 V_I4(&vararg[1]) = iField;
1478 V_I4(&vararg[0]) = iField;
1490 DISPID dispid = DISPID_PROPERTYPUT;
1495 V_I4(&vararg[1]) = iField;
1498 V_I4(&vararg[0]) = iValue;
1521 V_I4(&vararg[0]) = iIndex;
1534 *pCount =
V_I4(&varresult);
1554 DISPID dispid = DISPID_PROPERTYPUT;
1573 *pCount =
V_I4(&varresult);
1580 #define TEST_SUMMARYINFO_PROPERTIES_MODIFIED 4 1591 ok(
hr ==
S_OK,
"SummaryInfo_PropertyCount failed, hresult %#lx\n",
hr);
1592 ok(
j == num_info,
"SummaryInfo_PropertyCount returned %d, expected %d\n",
j, num_info);
1595 for (
j = 0;
j < num_info;
j++)
1605 ok(
hr ==
S_OK,
"SummaryInfo_Property (pid %d) failed, hresult %#lx\n",
entry->property,
hr);
1606 if (
V_VT(&varresult) !=
vt)
1607 skip(
"Skipping property tests due to type mismatch\n");
1609 ok(
V_I4(&varresult) ==
entry->iValue,
"SummaryInfo_Property (pid %d) I4 result expected to be %d, but was %ld\n",
1619 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));
1623 ok_awplus(
"SummaryInfo_Property (pid %d) BSTR result expected to be %s, but was %s\n",
entry->property,
entry->szValue,
V_BSTR(&varresult));
1626 skip(
"SummaryInfo_Property (pid %d) unhandled result type %d\n",
entry->property,
vt);
1644 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1647 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1651 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1654 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1657 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1660 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1671 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1674 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1675 ok(
V_I2(&
var) ==
V_I2(&varresult),
"SummaryInfo_PropertyGet expected %d, but returned %d\n",
V_I2(&
var),
V_I2(&varresult));
1683 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1686 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1687 ok_w2(
"SummaryInfo_PropertyGet expected %s, but returned %s\n",
V_BSTR(&
var),
V_BSTR(&varresult));
1696 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1699 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1708 ok(
hr ==
S_OK,
"SummaryInfo_PropertyPut failed, hresult %#lx\n",
hr);
1711 ok(
hr ==
S_OK,
"SummaryInfo_PropertyGet failed, hresult %#lx\n",
hr);
1712 ok(
V_I4(&
var) ==
V_I4(&varresult),
"SummaryInfo_PropertyGet expected %ld, but returned %ld\n",
V_I4(&
var),
V_I4(&varresult));
1718 ok(
hr ==
S_OK,
"SummaryInfo_PropertyCount failed, hresult %#lx\n",
hr);
1719 ok(
j == num_info+4,
"SummaryInfo_PropertyCount returned %d, expected %d\n",
j, num_info);
1728 hr =
Database_OpenView(pDatabase,
L"SELECT `Feature` FROM `Feature` WHERE `Feature_Parent`='One'", &pView);
1729 ok(
hr ==
S_OK,
"Database_OpenView failed, hresult %#lx\n",
hr);
1737 ok(
hr ==
S_OK,
"View_Execute failed, hresult %#lx\n",
hr);
1741 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1742 ok(pRecord !=
NULL,
"View_Fetch should not have returned NULL record\n");
1746 memset(szString, 0,
sizeof(szString));
1748 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1749 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Three");
1753 ok(
hr ==
S_OK,
"Record_StringDataPut failed, hresult %#lx\n",
hr);
1756 memset(szString, 0,
sizeof(szString));
1758 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1759 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Two");
1780 ok(
hr ==
S_OK,
"View_Modify failed, hresult %#lx\n",
hr);
1783 memset(szString, 0,
sizeof(szString));
1785 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1786 todo_wine ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Three");
1788 IDispatch_Release(pRecord);
1793 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1794 ok(pRecord !=
NULL,
"View_Fetch should not have returned NULL record\n");
1798 memset(szString, 0,
sizeof(szString));
1800 ok(
hr ==
S_OK,
"Record_StringDataGet failed, hresult %#lx\n",
hr);
1801 ok_w2(
"Record_StringDataGet result was %s but expected %s\n", szString,
L"Two");
1803 IDispatch_Release(pRecord);
1808 ok(
hr ==
S_OK,
"View_Fetch failed, hresult %#lx\n",
hr);
1809 ok(pRecord ==
NULL,
"View_Fetch should have returned NULL record\n");
1811 IDispatch_Release(pRecord);
1815 ok(
hr ==
S_OK,
"View_Close failed, hresult %#lx\n",
hr);
1817 IDispatch_Release(pView);
1822 ok(
hr ==
S_OK,
"Database_SummaryInformation failed, hresult %#lx\n",
hr);
1823 ok(pSummaryInfo !=
NULL,
"Database_SummaryInformation should not have returned NULL record\n");
1827 IDispatch_Release(pSummaryInfo);
1839 ULONG refs_before, refs_after;
1844 ok(
hr ==
S_OK,
"Session_Installer failed, hresult %#lx\n",
hr);
1845 ok(pInst !=
NULL,
"Session_Installer returned NULL IDispatch pointer\n");
1846 ok(pInst ==
pInstaller,
"Session_Installer does not match Installer instance from CoCreateInstance\n");
1847 refs_before = IDispatch_AddRef(pInst);
1850 ok(
hr ==
S_OK,
"Session_Installer failed, hresult %#lx\n",
hr);
1851 ok(pInst !=
NULL,
"Session_Installer returned NULL IDispatch pointer\n");
1852 ok(pInst ==
pInstaller,
"Session_Installer does not match Installer instance from CoCreateInstance\n");
1853 refs_after = IDispatch_Release(pInst);
1854 ok(refs_before == refs_after,
"got %lu and %lu\n", refs_before, refs_after);
1859 ok(
hr ==
S_OK,
"Session_PropertyGet failed, hresult %#lx\n",
hr);
1864 ok(0,
"Property \"ProductName\" expected to be \"MSITEST\" but was \"%s\"\n",
string);
1869 ok(
hr ==
S_OK,
"Session_PropertyPut failed, hresult %#lx\n",
hr);
1872 ok(
hr ==
S_OK,
"Session_PropertyGet failed, hresult %#lx\n",
hr);
1877 ok(0,
"Property \"ProductName\" expected to be \"ProductName\" but was \"%s\"\n",
string);
1887 ok(
hr ==
S_OK,
"Session_PropertyPut failed, hresult %#lx\n",
hr);
1891 ok(
hr ==
S_OK,
"Session_LanguageGet failed, hresult %#lx\n",
hr);
1896 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1897 ok(!
bool,
"Reboot at end session mode is %d\n",
bool);
1900 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1901 ok(!
bool,
"Maintenance mode is %d\n",
bool);
1905 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1907 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1908 ok(
bool,
"Reboot at end session mode is %d, expected 1\n",
bool);
1910 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1913 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1917 ok(
hr ==
S_OK,
"Session_ModeGet failed, hresult %#lx\n",
hr);
1918 ok(
bool,
"Reboot now mode is %d, expected 1\n",
bool);
1921 ok(
hr ==
S_OK,
"Session_ModePut failed, hresult %#lx\n",
hr);
1930 ok(
hr ==
S_OK,
"Session_Database failed, hresult %#lx\n",
hr);
1934 IDispatch_Release(pDatabase);
1939 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1943 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1947 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1952 ok(
hr ==
S_OK,
"Session_DoAction failed, hresult %#lx\n",
hr);
1953 ok(myint ==
IDOK,
"DoAction(CostInitialize) returned %d, %d expected\n", myint,
IDOK);
1957 ok(
hr ==
S_OK,
"Session_SetInstallLevel failed, hresult %#lx\n",
hr);
1961 ok(
hr ==
S_OK,
"Session_FeatureCurrentState failed, hresult %#lx\n",
hr);
1966 ok(
hr ==
S_OK,
"Installer_CreateRecord failed: %#lx\n",
hr);
1968 ok(
hr ==
S_OK,
"Session_Message failed: %#lx\n",
hr);
1969 ok(myint == 0,
"Session_Message returned %x\n", myint);
1973 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1977 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1982 ok(
hr ==
S_OK,
"Session_FeatureRequestStatePut failed, hresult %#lx\n",
hr);
1984 ok(
hr ==
S_OK,
"Session_FeatureRequestStateGet failed, hresult %#lx\n",
hr);
1989 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
1993 ok(
hr ==
S_OK,
"Session_EvaluateCondition failed, hresult %#lx\n",
hr);
2020 static const DWORD qw[2] = { 0x12345678, 0x87654321 };
2024 HKEY hkey, hkey_sub;
2035 win_skip(
"Needed W-functions are not implemented\n");
2043 ok(
hr ==
S_OK,
"Installer_RegistryValueE failed, hresult %#lx\n",
hr);
2044 ok(!bRet,
"Registry key expected to not exist, but Installer_RegistryValue claims it does\n");
2046 memset(szString, 0,
sizeof(szString));
2050 memset(szString, 0,
sizeof(szString));
2058 "RegSetValueExW failed\n");
2060 "RegSetValueExW failed\n");
2062 "RegSetValueExW failed\n");
2064 ok(bRet,
"SetEnvironmentVariableA failed %lu\n",
GetLastError());
2066 "RegSetValueExW failed\n");
2068 "RegSetValueExW failed\n");
2070 "RegSetValueExW failed\n");
2072 "RegSetValueExW failed\n");
2075 "RegSetValueExW failed\n");
2082 ok(
hr ==
S_OK,
"Installer_RegistryValueE failed, hresult %#lx\n",
hr);
2083 ok(bRet,
"Registry key expected to exist, but Installer_RegistryValue claims it does not\n");
2085 memset(szString, 0,
sizeof(szString));
2087 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2088 ok_w2(
"Default registry value \"%s\" does not match expected \"%s\"\n", szString,
L"One");
2091 memset(szString, 0,
sizeof(szString));
2096 memset(szString, 0,
sizeof(szString));
2098 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2099 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"One");
2105 ok(
hr ==
S_OK,
"Installer_RegistryValue failed, hresult %#lx\n",
hr);
2106 ok(
V_I4(&varresult) == 305419896,
"Registry value %ld does not match expected value\n",
V_I4(&varresult));
2109 memset(szString, 0,
sizeof(szString));
2111 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2112 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"(REG_BINARY)");
2114 memset(szString, 0,
sizeof(szString));
2116 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2117 ok_w2(
"Registry value \"%s\" does not match expected \"%s\"\n", szString,
L"Four");
2120 memset(szString, 0,
sizeof(szString));
2122 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2123 ok_w2n(
"Registry value \"%s\" does not match expected \"%s\"\n",
2124 szString,
L"Five\nHi",
lstrlenW(
L"Five\nHi"));
2126 memset(szString, 0,
sizeof(szString));
2128 ok(
hr ==
S_OK,
"Installer_RegistryValueW failed, hresult %#lx\n",
hr);
2130 "Registry value does not match\n");
2136 ok(
hr ==
S_OK,
"Installer_RegistryValue failed, hresult %#lx\n",
hr);
2139 memset(szString, 0,
sizeof(szString));
2141 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2142 ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"");
2145 memset(szString, 0,
sizeof(szString));
2147 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2149 todo_wine ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"Two");
2152 memset(szString, 0,
sizeof(szString));
2154 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2157 memset(szString, 0,
sizeof(szString));
2159 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2160 ok_w2(
"Registry name \"%s\" does not match expected \"%s\"\n", szString,
L"Eight");
2163 memset(szString, 0,
sizeof(szString));
2165 ok(
hr ==
S_OK,
"Installer_RegistryValueI failed, hresult %#lx\n",
hr);
2186 ok(
hr ==
S_OK,
"Installer_Products failed, hresult %#lx\n",
hr);
2191 ok(
hr ==
S_OK,
"StringList_NewEnum failed, hresult %#lx\n",
hr);
2194 hr = IUnknown_QueryInterface(
pUnk, &IID_IEnumVARIANT, (
void **)&pEnum);
2195 ok (
hr ==
S_OK,
"IUnknown::QueryInterface returned %#lx\n",
hr);
2198 skip(
"IEnumVARIANT tests\n");
2202 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2207 memset(szString, 0,
sizeof(szString));
2209 ok(
hr ==
S_OK,
"StringList_Item failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2215 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2221 if (!bProductFound && !
lstrcmpW(szString,
L"{837450fa-a39b-4bc8-b321-08b393f784b3}"))
2222 bProductFound =
TRUE;
2227 hr = IEnumVARIANT_Next(pEnum, 1, &
var, &celt);
2228 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2229 ok(celt == 1,
"%lu items were retrieved, expected 1\n", celt);
2231 ok_w2(
"%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString,
V_BSTR(&
var));
2237 if (bProductInstalled)
2239 ok(bProductInstalled == bProductFound,
"Product expected to %s installed but product code was %s\n",
2240 bProductInstalled ?
"be" :
"not be",
2241 bProductFound ?
"found" :
"not found");
2251 IEnumVARIANT_Clone(pEnum,
NULL);
2255 hr = IEnumVARIANT_Clone(pEnum, &pEnum2);
2256 ok(
hr ==
S_OK,
"IEnumVARIANT_Clone failed, hresult %#lx\n",
hr);
2264 hr = IEnumVARIANT_Next(pEnum2, 1, &
var, &celt);
2265 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2266 ok(celt == 1,
"%lu items were retrieved, expected 0\n", celt);
2271 skip(
"IEnumVARIANT::Next of clone will not return success with 0 products\n");
2273 IEnumVARIANT_Release(pEnum2);
2277 hr = IEnumVARIANT_Skip(pEnum, 1);
2278 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Skip failed, hresult %#lx\n",
hr);
2281 hr = IEnumVARIANT_Next(pEnum, 1,
NULL, &celt);
2282 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2283 ok(celt == 0,
"%lu items were retrieved, expected 0\n", celt);
2286 hr = IEnumVARIANT_Next(pEnum, 1, &
var, &celt);
2287 ok(
hr ==
S_FALSE,
"IEnumVARIANT_Next failed, hresult %#lx\n",
hr);
2288 ok(celt == 0,
"%lu items were retrieved, expected 0\n", celt);
2292 hr = IEnumVARIANT_Reset(pEnum);
2293 ok(
hr ==
S_OK,
"IEnumVARIANT_Reset failed, hresult %#lx\n",
hr);
2298 hr = IEnumVARIANT_Skip(pEnum, iCount-1);
2299 ok(
hr ==
S_OK,
"IEnumVARIANT_Skip failed, hresult %#lx\n",
hr);
2303 hr = IEnumVARIANT_Next(pEnum, 1, &
var,
NULL);
2304 ok(
hr ==
S_OK,
"IEnumVARIANT_Next failed (idx %d, count %d), hresult %#lx\n",
idx, iCount,
hr);
2306 ok_w2(
"%s returned by StringList_Item does not match %s returned by IEnumVARIANT_Next\n", szString,
V_BSTR(&
var));
2310 skip(
"IEnumVARIANT::Skip impossible for 0 products\n");
2314 memset(szString, 0,
sizeof(szString));
2316 ok(
hr ==
DISP_E_BADINDEX,
"StringList_Item for an invalid index did not return DISP_E_BADINDEX, hresult %#lx\n",
hr);
2318 if (pEnum) IEnumVARIANT_Release(pEnum);
2320 IDispatch_Release(pStringList);
2335 ret =
RegQueryInfoKeyA(hkey,
NULL,
NULL,
NULL,
NULL, &
dwSize,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2362 ret =
RegQueryInfoKeyA(hkey,
NULL,
NULL,
NULL,
NULL, &
dwSize,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2369 if (!
strcmp(
string, findkey))
2399 skip(
"Installer_InstallProduct (insufficient privileges)\n");
2410 ok(
hr ==
S_OK,
"Expected UILevel property put invoke to return S_OK, got %#lx\n",
hr);
2416 skip(
"InstallProduct failed, insufficient rights?\n");
2420 ok(
hr ==
S_OK,
"Installer_InstallProduct failed, hresult %#lx\n",
hr);
2424 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2430 memset(szString, 0,
sizeof(szString));
2436 memset(szString, 0,
sizeof(szString));
2442 memset(szString, 0,
sizeof(szString));
2444 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2445 todo_wine ok_w2(
"Installer_ProductInfo returned %s but expected %s\n", szString,
L"winetest-automation.msi");
2448 memset(szString, 0,
sizeof(szString));
2450 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2451 todo_wine ok_w2(
"Installer_ProductInfo returned %s but expected %s\n", szString,
L"MSITEST");
2458 ok(
hr ==
S_OK,
"Installer_RelatedProducts failed, hresult %#lx\n",
hr);
2463 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2464 ok(iCount == 1,
"Expected one related product but found %d\n", iCount);
2467 memset(szString, 0,
sizeof(szString));
2469 ok(
hr ==
S_OK,
"StringList_Item failed (idx 0, count %d), hresult %#lx\n", iCount,
hr);
2470 ok_w2(
"StringList_Item returned %s but expected %s\n", szString,
L"{837450fa-a39b-4bc8-b321-08b393f784b3}");
2472 IDispatch_Release(pStringList);
2476 ok(
hr ==
S_OK,
"Installer_ProductInfo failed, hresult %#lx\n",
hr);
2480 ok(
delete_pf(
"msitest\\cabout\\new\\five.txt",
TRUE),
"File not installed\n");
2482 ok(
delete_pf(
"msitest\\cabout\\four.txt",
TRUE),
"File not installed\n");
2484 ok(
delete_pf(
"msitest\\changed\\three.txt",
TRUE),
"File not installed\n");
2486 ok(
delete_pf(
"msitest\\first\\two.txt",
TRUE),
"File not installed\n");
2510 ok(
num == 314,
"Expected 314, got %lu\n",
num);
2525 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{837450fa-a39b-4bc8-b321-08b393f784b3}",
2530 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656",
access);
2534 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData",
"af054738b93a8cb43b12803b397f483b",
access, &hkey);
2542 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products\\af054738b93a8cb43b12803b397f483b",
access);
2552 res =
RegDeleteKeyA(hkey,
"UpgradeCodes\\D8E760ECA1E276347B43E42BDBDA5656");
2579 ok(
hr ==
S_OK,
"Installer_CreateRecord failed, hresult %#lx\n",
hr);
2580 ok(pRecord !=
NULL,
"Installer_CreateRecord should not have returned NULL record\n");
2585 ok(
hr ==
S_OK,
"Record_FiledCountGet failed, hresult %#lx\n",
hr);
2586 ok(iValue == 1,
"Record_FieldCountGet result was %d but expected 1\n", iValue);
2590 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2595 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2600 ok(
hr ==
S_OK,
"Record_IntegerDataPut failed, hresult %#lx\n",
hr);
2609 ok(
hr ==
S_OK,
"Record_IntegerDataGet failed, hresult %#lx\n",
hr);
2610 ok(iValue == 100,
"Record_IntegerDataGet result was %d but expected 100\n", iValue);
2612 IDispatch_Release(pRecord);
2621 skip(
"OpenPackage failed, insufficient rights?\n");
2625 ok(
hr ==
S_OK,
"Installer_OpenPackage failed, hresult %#lx\n",
hr);
2629 IDispatch_Release(pSession);
2634 ok(
hr ==
S_OK,
"Installer_OpenDatabase failed, hresult %#lx\n",
hr);
2638 IDispatch_Release(pDatabase);
2643 ok(
hr ==
S_OK,
"Installer_SummaryInformation failed, hresult %#lx\n",
hr);
2647 IDispatch_Release(pSumInfo);
2658 ok(
hr ==
S_OK,
"Installer_ProductState failed, hresult %#lx\n",
hr);
2680 ok(
hr ==
S_OK,
"Installer_RelatedProducts failed, hresult %#lx\n",
hr);
2685 ok(
hr ==
S_OK,
"StringList_Count failed, hresult %#lx\n",
hr);
2686 ok(!iCount,
"Expected no related products but found %d\n", iCount);
2688 IDispatch_Release(pStringList);
2694 ok(
hr ==
S_OK,
"Installer_VersionGet failed, hresult %#lx\n",
hr);
2710 if (pIsWow64Process)
2728 ok (
hr ==
S_OK,
"OleInitialize returned %#lx\n",
hr);
2730 ok (
hr ==
S_OK,
"CLSIDFromProgID returned %#lx\n",
hr);
2732 ok(
hr ==
S_OK,
"CoCreateInstance returned %#lx\n",
hr);
2737 ok (
hr ==
S_OK,
"IUnknown::QueryInterface returned %#lx\n",
hr);
2744 IUnknown_Release(
pUnk);
static void delete_test_files(void)
static HRESULT SummaryInfo_PropertyCountGet(IDispatch *pSummaryInfo, int *pCount)
static HRESULT Session_SetInstallLevel(IDispatch *pSession, LONG iInstallLevel)
static const CHAR media_dat[]
#define DISP_E_UNKNOWNNAME
INTERNETFEATURELIST feature
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
static const CHAR registry_dat[]
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
static HRESULT Session_PropertyPut(IDispatch *pSession, LPCWSTR szName, LPCWSTR szValue)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
static const CHAR directory_dat[]
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
static const WCHAR szName[]
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
static const CHAR install_exec_seq_dat[]
enum _TOKEN_ELEVATION_TYPE TOKEN_ELEVATION_TYPE
static const msi_summary_info summary_info[]
static void test_Installer_Products(BOOL bProductInstalled)
#define DISPATCH_PROPERTYGET
static HRESULT Session_EvaluateCondition(IDispatch *pSession, LPCWSTR szCondition, int *iReturn)
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
static BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
#define WideCharToMultiByte
static BOOL get_program_files_dir(LPSTR buf)
static void write_file(const CHAR *filename, const char *data, int data_size)
#define ERROR_NO_MORE_ITEMS
LONG WINAPI RegDeleteKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
struct _msi_summary_info msi_summary_info
ACPI_SIZE strlen(const char *String)
static HRESULT Record_StringDataPut(IDispatch *pRecord, int iField, LPCWSTR szString)
static HRESULT View_Modify(IDispatch *pView, int iMode, IDispatch *pRecord)
static HRESULT SummaryInfo_PropertyGet(IDispatch *pSummaryInfo, int pid, VARIANT *pVarResult, VARTYPE vtExpect)
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)
GLdouble GLdouble GLdouble r
static char PROG_FILES_DIR[MAX_PATH]
#define LOCALE_USER_DEFAULT
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
static DWORD delete_key(HKEY hkey)
#define HKEY_CURRENT_USER
static HRESULT Session_PropertyGet(IDispatch *pSession, LPCWSTR szName, LPWSTR szReturn)
GLuint GLuint GLsizei count
static CHAR string2[MAX_PATH]
BOOL WINAPI SetEndOfFile(HANDLE hFile)
static CHAR string1[MAX_PATH]
static HRESULT View_Close(IDispatch *pView)
#define DISP_E_MEMBERNOTFOUND
static CHAR CURR_DIR[MAX_PATH]
static HRESULT View_Execute(IDispatch *pView, IDispatch *pRecord)
static HINSTANCE hkernel32
struct _msi_table msi_table
HRESULT WINAPI VariantCopyInd(VARIANT *pvargDest, VARIANTARG *pvargSrc)
static HRESULT Database_SummaryInformation(IDispatch *pDatabase, int iUpdateCount, IDispatch **pSummaryInfo)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
#define ERROR_NOT_ENOUGH_MEMORY
#define INVALID_HANDLE_VALUE
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
DWORD WINAPI GetLastError(VOID)
static HRESULT Installer_RelatedProducts(LPCWSTR szProduct, IDispatch **pStringList)
BOOL WINAPI CheckTokenMembership(IN HANDLE ExistingTokenHandle, IN PSID SidToCheck, OUT PBOOL IsMember)
static void test_Installer_RegistryValue(void)
static BOOL create_package(LPWSTR path)
static void init_functionpointers(void)
void WINAPI VariantInit(VARIANTARG *pVarg)
static HRESULT StringList_Count(IDispatch *pStringList, int *pCount)
static LONG(WINAPI *pRegDeleteKeyExA)(HKEY
static const WCHAR szAttribute[]
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
static HRESULT Record_FieldCountGet(IDispatch *pRecord, int *pFieldCount)
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
static HRESULT Session_FeatureRequestStateGet(IDispatch *pSession, LPCWSTR szName, int *pState)
static const CHAR file_dat[]
static HRESULT Session_ModeGet(IDispatch *pSession, int iFlag, VARIANT_BOOL *mode)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void test_Installer(void)
#define ok_exception(hr, szDescription)
static BOOL is_process_limited(void)
static HRESULT Session_FeatureRequestStatePut(IDispatch *pSession, LPCWSTR szName, int iState)
PVOID WINAPI FreeSid(PSID pSid)
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 token
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
static UINT find_registry_key(HKEY hkeyParent, LPCSTR subkey, LPCSTR findkey, REGSAM access, HKEY *phkey)
static const CHAR component_dat[]
static HRESULT Installer_OpenPackage(LPCWSTR szPackagePath, int options, IDispatch **pSession)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
static const CHAR property_dat[]
#define GET_PROC(dll, func)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BSTR WINAPI SysAllocString(LPCOLESTR str)
static FILETIME systemtime
static HRESULT Installer_ProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR szString)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
static BOOL(WINAPI *pIsWow64Process)(HANDLE
#define ADD_INFO_FILETIME(property, pftValue)
static const msi_table tables[]
static void test_Installer_InstallProduct(void)
#define DISPATCH_PROPERTYPUT
#define ERROR_FILE_NOT_FOUND
static HRESULT Record_StringDataGet(IDispatch *pRecord, int iField, LPWSTR szString)
#define SECURITY_NT_AUTHORITY
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
typedef bool(CARDLIBPROC *pCanDragProc)(CardRegion &stackobj
static HRESULT Installer_RegistryValueE(HKEY hkey, LPCWSTR szKey, BOOL *pBool)
static const WCHAR nameW[]
static HRESULT Record_IntegerDataGet(IDispatch *pRecord, int iField, int *pValue)
static void write_msi_summary_info(MSIHANDLE db, const msi_summary_info *info, int num_info)
BOOL WINAPI IsWow64Process(IN HANDLE hProcess, OUT PBOOL Wow64Process)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
static const char * msifile
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
#define DISP_E_TYPEMISMATCH
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
static HRESULT Installer_RegistryValueW(HKEY hkey, LPCWSTR szKey, LPCWSTR szValue, LPWSTR szString)
static DISPID get_dispid(IDispatch *disp, const char *name)
#define SECURITY_BUILTIN_DOMAIN_RID
static HRESULT invoke(IDispatch *pDispatch, LPCSTR szName, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, VARTYPE vtResult)
static HRESULT Database_OpenView(IDispatch *pDatabase, LPCWSTR szSql, IDispatch **pView)
static HRESULT Session_FeatureCurrentState(IDispatch *pSession, LPCWSTR szName, int *pState)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
#define todo_wine_if(is_todo)
static HRESULT View_Fetch(IDispatch *pView, IDispatch **ppRecord)
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const char *szValue)
static IDispatch * pInstaller
#define MSIDBOPEN_TRANSACT
#define ADD_INFO_I4(property, iValue)
static int _invoke_todo_vtResult
static HRESULT Installer_RegistryValue(HKEY hkey, LPCWSTR szKey, VARIANT vValue, VARIANT *pVarResult, VARTYPE vtExpect)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
static HRESULT SummaryInfo_PropertyPut(IDispatch *pSummaryInfo, int pid, VARIANT *pVariant)
static HRESULT Installer_CreateRecord(int count, IDispatch **pRecord)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
static HRESULT Installer_Products(IDispatch **pStringList)
static HRESULT StringList_Item(IDispatch *pStringList, int iIndex, LPWSTR szString)
LONG WINAPI RegEnumKeyA(HKEY hKey, DWORD dwIndex, LPSTR lpName, DWORD cbName)
#define FILE_ATTRIBUTE_NORMAL
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
static SID_IDENTIFIER_AUTHORITY NtAuthority
static HRESULT Installer_UILevelPut(int level)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
#define GetCurrentProcess()
static HRESULT Installer_SummaryInformation(BSTR PackagePath, int UpdateCount, IDispatch **pSumInfo)
UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
#define ok_w2(format, szString1, szString2)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
_In_ DWORD _Out_ _In_ WORD wFlags
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
static void test_dispid(void)
DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
static HRESULT Installer_VersionGet(LPWSTR szVersion)
struct stdole::EXCEPINFO EXCEPINFO
static VARIANTARG static DISPID
static LONG delete_key_portable(HKEY key, LPCSTR subkey, REGSAM access)
static HRESULT Installer_InstallProduct(LPCWSTR szPackagePath, LPCWSTR szPropertyValues)
int WINAPI lstrlenA(LPCSTR lpString)
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
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
GLuint GLint GLboolean GLint GLenum access
UINT WINAPI MsiDatabaseCommit(MSIHANDLE hdb)
static void test_Session(IDispatch *pSession)
static HRESULT Record_IntegerDataPut(IDispatch *pRecord, int iField, int iValue)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phDB)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
static void create_file(const CHAR *name, DWORD size)
#define MultiByteToWideChar
static void test_dispatch(void)
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE handle)
static HRESULT Session_ModePut(IDispatch *pSession, int iFlag, VARIANT_BOOL mode)
static HRESULT Installer_OpenDatabase(LPCWSTR szDatabasePath, int openmode, IDispatch **pDatabase)
static HRESULT Session_Database(IDispatch *pSession, IDispatch **pDatabase)
static EXCEPINFO excepinfo
struct stdole::DISPPARAMS DISPPARAMS
static const get_did_t get_did_data[]
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
int strcmp(const char *String1, const char *String2)
#define ERROR_CALL_NOT_IMPLEMENTED
static HRESULT Session_DoAction(IDispatch *pSession, LPCWSTR szAction, int *iReturn)
UINT WINAPI MsiDatabaseImportA(MSIHANDLE handle, const char *szFolder, const char *szFilename)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei GLenum type
#define CreateFileA(a, b, c, d, e, f, g)
static const CHAR feature_dat[]
static void test_SummaryInfo(IDispatch *pSummaryInfo, const msi_summary_info *info, int num_info, BOOL readonly)
HRESULT WINAPI VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
static UINT delete_registry_key(HKEY hkeyParent, LPCSTR subkey, REGSAM access)
#define ok_w2n(format, szString1, szString2, len)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
#define DOMAIN_ALIAS_RID_ADMINS
#define ADD_INFO_LPSTR(property, szValue)
static HRESULT StringList__NewEnum(IDispatch *pList, IUnknown **ppEnumVARIANT)
static HRESULT Session_LanguageGet(IDispatch *pSession, UINT *pLangId)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
static char * stringw(char *buf, char *end, const wchar_t *sw, int len, int field_width, int precision, int flags)
INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME lpSt, double *pDateOut)
static void create_database(const CHAR *name, const msi_table *tables, int num_tables, const msi_summary_info *info, int num_info)
#define RegCloseKey(hKey)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static HRESULT Installer_ProductState(LPCWSTR szProduct, int *pInstallState)
static void test_Database(IDispatch *pDatabase, BOOL readonly)
#define ok_awplus(format, extra, aString, wString)
static void create_test_files(void)
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
static HRESULT Installer_RegistryValueI(HKEY hkey, LPCWSTR szKey, int iValue, LPWSTR szString, VARTYPE vtResult)
static HRESULT Session_Message(IDispatch *pSession, LONG kind, IDispatch *record, int *ret)
#define HKEY_LOCAL_MACHINE
#define KEY_ENUMERATE_SUB_KEYS
#define TEST_SUMMARYINFO_PROPERTIES_MODIFIED
static const CHAR feature_comp_dat[]
GLuint const GLchar * name