21 #define _WIN32_MSI 300 37 static const char msifile[] =
"winetest.msi";
38 static const WCHAR msifileW[] = {
'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'.',
'm',
's',
'i',0};
91 #define GET_PROC(dll, func) \ 92 p ## func = (void *)GetProcAddress(dll, #func); \ 94 trace("GetProcAddress(%s) failed\n", #func); 191 if (!pCheckTokenMembership || !pOpenProcessToken)
return FALSE;
195 !pCheckTokenMembership(
NULL,
Group, &IsInGroup))
197 trace(
"Could not check if the current user is an administrator\n");
225 #define MEDIA_SIZE 0x7FFFFFFF 226 #define FOLDER_THRESHOLD 900000 252 BOOL fContinuation,
void *pv)
261 DWORD dwShareMode = 0;
274 dwCreateDisposition, 0,
NULL);
288 ok(
res,
"Failed to ReadFile\n");
300 ok(
res,
"Failed to WriteFile\n");
327 ok(
ret,
"Failed to DeleteFile %s\n", pszFile);
339 if (tempname && (
strlen(tempname) < (
unsigned)cbTempName))
365 ok(
res,
"Expected GetFileInformationByHandle to succeed\n");
397 pCabParams->
setID = 0xbeef;
398 pCabParams->
iCab = 1;
418 ok(hfci !=
NULL,
"Failed to create an FCI context\n");
424 ok(
res,
"Failed to add file: %s\n",
ptr);
429 ok(
res,
"Failed to flush the cabinet\n");
432 ok(
res,
"Failed to destroy the cabinet\n");
452 IStorage_Release(stg);
466 IStream_Release(stm);
467 IStorage_Release(stg);
493 "Directory\tDirectory_Parent\tDefaultDir\n" 495 "Directory\tDirectory\n" 496 "MSITESTDIR\tProgramFilesFolder\tmsitest\n" 497 "ProgramFilesFolder\tTARGETDIR\t.\n" 498 "TARGETDIR\t\tSourceDir";
501 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 502 "s72\tS38\ts72\ti2\tS255\tS72\n" 503 "Component\tComponent\n" 504 "One\t{8F5BAEEF-DD92-40AC-9397-BE3CF9F97C81}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n";
507 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" 508 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" 510 "One\t\tOne\tOne\t1\t3\tMSITESTDIR\t0\n" 511 "Two\t\t\t\t2\t1\tTARGETDIR\t0\n";
514 "Feature_\tComponent_\n" 516 "FeatureComponents\tFeature_\tComponent_\n" 520 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" 521 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" 523 "one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n";
526 "Action\tCondition\tSequence\n" 528 "InstallExecuteSequence\tAction\n" 529 "ValidateProductID\t\t700\n" 530 "CostInitialize\t\t800\n" 532 "CostFinalize\t\t1000\n" 533 "InstallValidate\t\t1400\n" 534 "InstallInitialize\t\t1500\n" 535 "ProcessComponents\t\t1600\n" 536 "UnpublishFeatures\t\t1800\n" 537 "RemoveFiles\t\t3500\n" 538 "InstallFiles\t\t4000\n" 539 "RegisterProduct\t\t6100\n" 540 "PublishFeatures\t\t6300\n" 541 "PublishProduct\t\t6400\n" 542 "InstallFinalize\t\t6600";
545 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" 546 "i2\ti4\tL64\tS255\tS32\tS72\n" 548 "1\t1\t\t\tDISK1\t\n";
553 "Property\tProperty\n" 555 "Manufacturer\tWine\n" 556 "ProductCode\t{38847338-1BBC-4104-81AC-2FAAC7ECDDCD}\n" 557 "ProductName\tMSITEST\n" 558 "ProductVersion\t1.1.1\n" 559 "UpgradeCode\t{9574448F-9B86-4E07-B6F6-8D199DA12127}\n" 560 "MSIFASTINSTALL\t1\n";
565 "Property\tProperty\n" 567 "Manufacturer\tWine\n" 568 "ProductCode\t{FF4AFE9C-6AC2-44F9-A060-9EA6BD16C75E}\n" 569 "ProductName\tMSITEST2\n" 570 "ProductVersion\t1.1.1\n" 571 "UpgradeCode\t{6B60C3CA-B8CA-4FB7-A395-092D98FF5D2A}\n" 572 "MSIFASTINSTALL\t1\n";
575 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 576 "s72\tS38\ts72\ti2\tS255\tS72\n" 577 "Component\tComponent\n" 578 "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t2\t\thydrogen\n" 579 "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t2\t\thelium\n" 580 "lithium\t{4AF28FFC-71C7-4307-BDE4-B77C5338F56F}\tMSITESTDIR\t2\tPROPVAR=42\tlithium\n";
583 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" 584 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" 586 "hydroxyl\t\thydroxyl\thydroxyl\t2\t1\tTARGETDIR\t0\n" 587 "heliox\t\theliox\theliox\t2\t5\tTARGETDIR\t0\n" 588 "lithia\t\tlithia\tlithia\t2\t10\tTARGETDIR\t0";
591 "Feature_\tComponent_\n" 593 "FeatureComponents\tFeature_\tComponent_\n" 594 "hydroxyl\thydrogen\n" 599 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" 600 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" 602 "hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n" 603 "helium\thelium\thelium\t0\t\t\t8192\t1\n" 604 "lithium\tlithium\tlithium\t0\t\t\t8192\t1";
607 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 608 "s72\tS38\ts72\ti2\tS255\tS72\n" 609 "Component\tComponent\n" 610 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n";
613 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" 614 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" 616 "feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n" 617 "montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0";
620 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" 621 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" 623 "maximus\tmaximus\tmaximus\t500\t\t\t8192\t1";
626 "Feature_\tComponent_\n" 628 "FeatureComponents\tFeature_\tComponent_\n" 630 "montecristo\tmaximus";
633 "Action\tCondition\tSequence\n" 635 "InstallExecuteSequence\tAction\n" 636 "ValidateProductID\t\t700\n" 637 "CostInitialize\t\t800\n" 639 "CostFinalize\t\t1000\n" 640 "InstallValidate\t\t1400\n" 641 "InstallInitialize\t\t1500\n" 642 "ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n" 643 "UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n" 644 "RemoveFiles\t\t3500\n" 645 "InstallFiles\t\t4000\n" 646 "RegisterUser\tREGISTER_USER=1 Or FULL=1\t6000\n" 647 "RegisterProduct\tREGISTER_PRODUCT=1 Or FULL=1\t6100\n" 648 "PublishFeatures\tPUBLISH_FEATURES=1 Or FULL=1\t6300\n" 649 "PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n" 650 "InstallFinalize\t\t6600";
653 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" 654 "i2\ti4\tL64\tS255\tS32\tS72\n" 656 "1\t1\t\t\tDISK1\t\n";
659 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" 660 "i2\ti4\tL64\tS255\tS32\tS72\n" 662 "1\t1\t\ttest1.cab\tDISK1\t\n";
665 "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" 666 "i2\ti4\tL64\tS255\tS32\tS72\n" 668 "1\t1\t\t#test1.cab\tDISK1\t\n";
671 "Action\tType\tSource\tTarget\tISComments\n" 672 "s72\ti2\tS64\tS0\tS255\n" 673 "CustomAction\tAction\n" 674 "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n";
677 "Action\tCondition\tSequence\n" 679 "InstallExecuteSequence\tAction\n" 680 "CostFinalize\t\t1000\n" 681 "CostInitialize\t\t800\n" 683 "SetFolderProp\t\t950\n" 684 "InstallFiles\t\t4000\n" 685 "InstallServices\t\t5000\n" 686 "InstallFinalize\t\t6600\n" 687 "InstallInitialize\t\t1500\n" 688 "InstallValidate\t\t1400\n" 689 "LaunchConditions\t\t100";
692 "Action\tCondition\tSequence\n" 694 "InstallUISequence\tAction\n" 695 "CostInitialize\t\t800\n" 697 "CostFinalize\t\t1000\n" 698 "ExecuteAction\t\t1100\n";
701 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" 702 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" 704 "sourcedir.txt\tsourcedir\tsourcedir.txt\t1000\t\t\t8192\t1\n";
707 "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" 708 "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" 710 "sourcedir\t\t\tsourcedir feature\t1\t2\tMSITESTDIR\t0\n";
713 "Feature_\tComponent_\n" 715 "FeatureComponents\tFeature_\tComponent_\n" 716 "sourcedir\tsourcedir\n";
719 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 720 "s72\tS38\ts72\ti2\tS255\tS72\n" 721 "Component\tComponent\n" 722 "sourcedir\t{DD422F92-3ED8-49B5-A0B7-F266F98357DF}\tMSITESTDIR\t0\t\tsourcedir.txt\n";
725 "Action\tCondition\tSequence\n" 727 "InstallUISequence\tAction\n" 728 "TestSourceDirProp1\tnot SourceDir and not SOURCEDIR and not Installed\t99\n" 730 "TestSourceDirProp2\tnot SourceDir and not SOURCEDIR and not Installed\t101\n" 731 "LaunchConditions\tnot Installed \t110\n" 732 "TestSourceDirProp3\tnot SourceDir and not SOURCEDIR and not Installed\t111\n" 733 "FindRelatedProducts\t\t120\n" 734 "TestSourceDirProp4\tnot SourceDir and not SOURCEDIR and not Installed\t121\n" 736 "TestSourceDirProp5\tnot SourceDir and not SOURCEDIR and not Installed\t131\n" 737 "RMCCPSearch\t\t140\n" 738 "TestSourceDirProp6\tnot SourceDir and not SOURCEDIR and not Installed\t141\n" 739 "ValidateProductID\t\t150\n" 740 "TestSourceDirProp7\tnot SourceDir and not SOURCEDIR and not Installed\t151\n" 741 "CostInitialize\t\t800\n" 742 "TestSourceDirProp8\tnot SourceDir and not SOURCEDIR and not Installed\t801\n" 744 "TestSourceDirProp9\tnot SourceDir and not SOURCEDIR and not Installed\t901\n" 745 "IsolateComponents\t\t1000\n" 746 "TestSourceDirProp10\tnot SourceDir and not SOURCEDIR and not Installed\t1001\n" 747 "CostFinalize\t\t1100\n" 748 "TestSourceDirProp11\tnot SourceDir and not SOURCEDIR and not Installed\t1101\n" 749 "MigrateFeatureStates\t\t1200\n" 750 "TestSourceDirProp12\tnot SourceDir and not SOURCEDIR and not Installed\t1201\n" 751 "ExecuteAction\t\t1300\n" 752 "TestSourceDirProp13\tnot SourceDir and not SOURCEDIR and not Installed\t1301\n";
755 "Action\tCondition\tSequence\n" 757 "InstallExecuteSequence\tAction\n" 758 "TestSourceDirProp14\tSourceDir and SOURCEDIR and not Installed\t99\n" 759 "LaunchConditions\t\t100\n" 760 "TestSourceDirProp15\tSourceDir and SOURCEDIR and not Installed\t101\n" 761 "ValidateProductID\t\t700\n" 762 "TestSourceDirProp16\tSourceDir and SOURCEDIR and not Installed\t701\n" 763 "CostInitialize\t\t800\n" 764 "TestSourceDirProp17\tSourceDir and SOURCEDIR and not Installed\t801\n" 765 "ResolveSource\tResolveSource and not Installed\t850\n" 766 "TestSourceDirProp18\tResolveSource and not SourceDir and not SOURCEDIR and not Installed\t851\n" 767 "TestSourceDirProp19\tnot ResolveSource and SourceDir and SOURCEDIR and not Installed\t852\n" 769 "TestSourceDirProp20\tSourceDir and SOURCEDIR and not Installed\t901\n" 770 "IsolateComponents\t\t1000\n" 771 "TestSourceDirProp21\tSourceDir and SOURCEDIR and not Installed\t1001\n" 772 "CostFinalize\t\t1100\n" 773 "TestSourceDirProp22\tSourceDir and SOURCEDIR and not Installed\t1101\n" 774 "MigrateFeatureStates\t\t1200\n" 775 "TestSourceDirProp23\tSourceDir and SOURCEDIR and not Installed\t1201\n" 776 "InstallValidate\t\t1400\n" 777 "TestSourceDirProp24\tSourceDir and SOURCEDIR and not Installed\t1401\n" 778 "InstallInitialize\t\t1500\n" 779 "TestSourceDirProp25\tSourceDir and SOURCEDIR and not Installed\t1501\n" 780 "ProcessComponents\t\t1600\n" 781 "TestSourceDirProp26\tnot SourceDir and not SOURCEDIR and not Installed\t1601\n" 782 "UnpublishFeatures\t\t1800\n" 783 "TestSourceDirProp27\tnot SourceDir and not SOURCEDIR and not Installed\t1801\n" 784 "RemoveFiles\t\t3500\n" 785 "TestSourceDirProp28\tnot SourceDir and not SOURCEDIR and not Installed\t3501\n" 786 "InstallFiles\t\t4000\n" 787 "TestSourceDirProp29\tnot SourceDir and not SOURCEDIR and not Installed\t4001\n" 788 "RegisterUser\t\t6000\n" 789 "TestSourceDirProp30\tnot SourceDir and not SOURCEDIR and not Installed\t6001\n" 790 "RegisterProduct\t\t6100\n" 791 "TestSourceDirProp31\tnot SourceDir and not SOURCEDIR and not Installed\t6101\n" 792 "PublishFeatures\t\t6300\n" 793 "TestSourceDirProp32\tnot SourceDir and not SOURCEDIR and not Installed\t6301\n" 794 "PublishProduct\t\t6400\n" 795 "TestSourceDirProp33\tnot SourceDir and not SOURCEDIR and not Installed\t6401\n" 796 "InstallExecute\t\t6500\n" 797 "TestSourceDirProp34\tnot SourceDir and not SOURCEDIR and not Installed\t6501\n" 798 "InstallFinalize\t\t6600\n" 799 "TestSourceDirProp35\tnot SourceDir and not SOURCEDIR and not Installed\t6601\n";
802 "Action\tType\tSource\tTarget\tISComments\n" 803 "s72\ti2\tS64\tS0\tS255\n" 804 "CustomAction\tAction\n" 805 "TestSourceDirProp1\t19\t\tTest 1 failed\t\n" 806 "TestSourceDirProp2\t19\t\tTest 2 failed\t\n" 807 "TestSourceDirProp3\t19\t\tTest 3 failed\t\n" 808 "TestSourceDirProp4\t19\t\tTest 4 failed\t\n" 809 "TestSourceDirProp5\t19\t\tTest 5 failed\t\n" 810 "TestSourceDirProp6\t19\t\tTest 6 failed\t\n" 811 "TestSourceDirProp7\t19\t\tTest 7 failed\t\n" 812 "TestSourceDirProp8\t19\t\tTest 8 failed\t\n" 813 "TestSourceDirProp9\t19\t\tTest 9 failed\t\n" 814 "TestSourceDirProp10\t19\t\tTest 10 failed\t\n" 815 "TestSourceDirProp11\t19\t\tTest 11 failed\t\n" 816 "TestSourceDirProp12\t19\t\tTest 12 failed\t\n" 817 "TestSourceDirProp13\t19\t\tTest 13 failed\t\n" 818 "TestSourceDirProp14\t19\t\tTest 14 failed\t\n" 819 "TestSourceDirProp15\t19\t\tTest 15 failed\t\n" 820 "TestSourceDirProp16\t19\t\tTest 16 failed\t\n" 821 "TestSourceDirProp17\t19\t\tTest 17 failed\t\n" 822 "TestSourceDirProp18\t19\t\tTest 18 failed\t\n" 823 "TestSourceDirProp19\t19\t\tTest 19 failed\t\n" 824 "TestSourceDirProp20\t19\t\tTest 20 failed\t\n" 825 "TestSourceDirProp21\t19\t\tTest 21 failed\t\n" 826 "TestSourceDirProp22\t19\t\tTest 22 failed\t\n" 827 "TestSourceDirProp23\t19\t\tTest 23 failed\t\n" 828 "TestSourceDirProp24\t19\t\tTest 24 failed\t\n" 829 "TestSourceDirProp25\t19\t\tTest 25 failed\t\n" 830 "TestSourceDirProp26\t19\t\tTest 26 failed\t\n" 831 "TestSourceDirProp27\t19\t\tTest 27 failed\t\n" 832 "TestSourceDirProp28\t19\t\tTest 28 failed\t\n" 833 "TestSourceDirProp29\t19\t\tTest 29 failed\t\n" 834 "TestSourceDirProp30\t19\t\tTest 30 failed\t\n" 835 "TestSourceDirProp31\t19\t\tTest 31 failed\t\n" 836 "TestSourceDirProp32\t19\t\tTest 32 failed\t\n" 837 "TestSourceDirProp33\t19\t\tTest 33 failed\t\n" 838 "TestSourceDirProp34\t19\t\tTest 34 failed\t\n" 839 "TestSourceDirProp35\t19\t\tTest 35 failed\t\n";
842 "Action\tCondition\tSequence\n" 844 "InstallExecuteSequence\tAction\n" 845 "CostInitialize\t\t800\n" 847 "CostFinalize\t\t1000\n" 848 "InstallValidate\t\t1400\n" 849 "InstallInitialize\t\t1500\n" 850 "RunInstall\tnot Installed\t1550\n" 851 "ProcessComponents\t\t1600\n" 852 "UnpublishFeatures\t\t1800\n" 853 "RemoveFiles\t\t3500\n" 854 "InstallFiles\t\t4000\n" 855 "RegisterProduct\t\t6100\n" 856 "PublishFeatures\t\t6300\n" 857 "PublishProduct\t\t6400\n" 858 "InstallFinalize\t\t6600\n";
861 "Action\tType\tSource\tTarget\tISComments\n" 862 "s72\ti2\tS64\tS0\tS255\n" 863 "CustomAction\tAction\n" 864 "RunInstall\t23\tmsitest\\concurrent.msi\tMYPROP=[UILevel]\t\n";
867 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 868 "s72\tS38\ts72\ti2\tS255\tS72\n" 869 "Component\tComponent\n" 870 "maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\tUILevel=5\tmaximus\n";
873 "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" 874 "s72\tS38\ts72\ti2\tS255\tS72\n" 875 "Component\tComponent\n" 876 "augustus\t\tMSITESTDIR\t0\tUILevel=3 AND MYPROP=5\taugustus\n";
879 "Feature_\tComponent_\n" 881 "FeatureComponents\tFeature_\tComponent_\n" 885 "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" 886 "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" 888 "augustus\taugustus\taugustus\t500\t\t\t8192\t1";
891 "Action\tType\tSource\tTarget\tISComments\n" 892 "s72\ti2\tS64\tS0\tS255\n" 893 "CustomAction\tAction\n" 894 "TestCommandlineProp\t19\t\tTest1\t\n";
897 "Action\tCondition\tSequence\n" 899 "InstallExecuteSequence\tAction\n" 900 "LaunchConditions\t\t100\n" 901 "ValidateProductID\t\t700\n" 902 "CostInitialize\t\t800\n" 904 "CostFinalize\t\t1000\n" 905 "TestCommandlineProp\tP=\"one\"\t1100\n" 906 "InstallInitialize\t\t1500\n" 907 "ProcessComponents\t\t1600\n" 908 "InstallValidate\t\t1400\n" 909 "InstallFinalize\t\t5000\n";
918 #define ADD_TABLE(x) {#x".idt", x##_dat, sizeof(x##_dat)} 1068 "{004757CA-5092-49C2-AD20-28E1CE0DF5F2}");
1087 #define create_database(name, tables, num_tables) \ 1088 create_database_wordcount(name, tables, num_tables, 100, 0, ";1033"); 1090 #define create_database_template(name, tables, num_tables, version, template) \ 1091 create_database_wordcount(name, tables, num_tables, version, 0, template); 1095 const char *
template)
1110 for (
j = 0;
j < num_tables;
j++)
1157 "Installation Database");
1161 "Installation Database");
1173 "{A2078D65-94D6-4205-8DEE-F68D6FD622AA}");
1211 "CREATE TABLE `Directory` ( " 1212 "`Directory` CHAR(255) NOT NULL, " 1213 "`Directory_Parent` CHAR(255), " 1214 "`DefaultDir` CHAR(255) NOT NULL " 1215 "PRIMARY KEY `Directory`)");
1219 "CREATE TABLE `Property` ( " 1220 "`Property` CHAR(72) NOT NULL, " 1221 "`Value` CHAR(255) " 1222 "PRIMARY KEY `Property`)");
1226 "(`Property`, `Value`) " 1227 "VALUES( 'ProductCode', '%s' )", prodcode);
1241 if (!pMsiUseFeatureExA)
1243 win_skip(
"MsiUseFeatureExA not implemented\n");
1256 r = pMsiUseFeatureExA(
NULL,
"WORDVIEWFiles", -2, 1 );
1259 r = pMsiUseFeatureExA(
"{90850409-6000-11d3-8cfe-0150048383c9}",
1263 r = pMsiUseFeatureExA(
"{9085040-6000-11d3-8cfe-0150048383c9}",
1264 "WORDVIEWFiles", -2, 0 );
1267 r = pMsiUseFeatureExA(
"{0085040-6000-11d3-8cfe-0150048383c9}",
1268 "WORDVIEWFiles", -2, 0 );
1271 r = pMsiUseFeatureExA(
"{90850409-6000-11d3-8cfe-0150048383c9}",
1272 "WORDVIEWFiles", -2, 1 );
1278 if (pRegDeleteKeyExA)
1279 return pRegDeleteKeyExA(
key, subkey,
access, 0 );
1288 DWORD dwType, cbData;
1296 r = pMsiOpenPackageExW(
NULL, 0, &hpkg);
1324 skip(
"Not enough rights to perform tests\n");
1335 skip(
"Out of memory\n");
1346 skip(
"Not enough rights to perform tests\n");
1397 if(!pMsiGetComponentPathA)
1403 r = pMsiGetComponentPathA(
"bogus",
"bogus",
NULL,
NULL );
1406 r = pMsiGetComponentPathA(
"bogus",
"{00000000-0000-0000-000000000000}",
NULL,
NULL );
1411 r = pMsiGetComponentPathA(
"bogus",
"{00000000-0000-0000-000000000000}",
buffer, &sz );
1414 r = pMsiGetComponentPathA(
"{00000000-78E1-11D2-B60F-006097C998E7}",
1415 "{00000000-0000-0000-0000-000000000000}",
buffer, &sz );
1418 r = pMsiGetComponentPathA(
"{00000409-78E1-11D2-B60F-006097C998E7}",
1419 "{00000000-0000-0000-0000-00000000}",
buffer, &sz );
1422 r = pMsiGetComponentPathA(
"{00000409-78E1-11D2-B60F-006097C998E7}",
1423 "{029E403D-A86A-1D11-5B5B0006799C897E}",
buffer, &sz );
1426 r = pMsiGetComponentPathA(
"{00000000-78E1-11D2-B60F-006097C9987e}",
1427 "{00000000-A68A-11d1-5B5B-0006799C897E}",
buffer, &sz );
1452 create_file(
"msitest\\one.txt",
"msitest\\one.txt", 100);
1454 create_file(
"msitest\\first\\two.txt",
"msitest\\first\\two.txt", 100);
1456 create_file(
"msitest\\second\\three.txt",
"msitest\\second\\three.txt", 100);
1462 create_file(
"msitest\\filename",
"msitest\\filename", 100);
1463 create_file(
"msitest\\service.exe",
"msitest\\service.exe", 100);
1483 #define HASHSIZE sizeof(MSIFILEHASHINFO) 1500 { 0x98500190, 0xb04fd23c, 0x7d3f96d6, 0x727fe128 },
1504 {
"C:\\Program Files\\msitest\\caesar\n", 0,
1506 { 0x2b566794, 0xfd42181b, 0x2514d6e4, 0x5768b4e2 },
1510 {
"C:\\Program Files\\msitest\\caesar\n", 500,
1512 { 0x58095058, 0x805efeff, 0x10f3483e, 0x0147d653 },
1519 const char name[] =
"msitest.bin";
1524 if (!pMsiGetFileHashA)
1526 win_skip(
"MsiGetFileHash not implemented\n");
1537 r = pMsiGetFileHashA(
"", 0, &
hash);
1539 "Expected ERROR_PATH_NOT_FOUND or ERROR_BAD_PATHNAME, got %d\n",
r);
1550 hash.dwFileHashInfoSize = 0;
1571 ok(!
ret,
"Hash incorrect\n");
1619 ok(
hr ==
S_OK,
"Expected S_OK, got %d\n",
hr);
1622 ok(
size == 39,
"Expected 39, got %d\n",
hr);
1637 char *usersid =
NULL;
1644 pConvertSidToStringSidA(
user->User.Sid, &usersid);
1675 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
1682 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
1689 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
1696 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
1704 "expected ERROR_SUCCESS, got %u\n",
error);
1711 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
1720 "expected ERROR_SUCCESS, got %u\n",
error);
1722 lstrcpyA(keypath,
"Software\\Microsoft\\Installer\\Products\\");
1734 "expected ERROR_SUCCESS, got %u\n",
error);
1736 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\");
1742 skip(
"Not enough rights to perform tests\n");
1756 "expected ERROR_SUCCESS, got %u\n",
error);
1768 "expected ERROR_SUCCESS, got %u\n",
error);
1773 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
1781 skip(
"Not enough rights to perform tests\n");
1795 "expected ERROR_SUCCESS, got %u\n",
error);
1806 "expected ERROR_SUCCESS, got %u\n",
error);
1818 "expected ERROR_SUCCESS, got %u\n",
error);
1830 "expected ERROR_SUCCESS, got %u\n",
error);
1840 "expected ERROR_SUCCESS, got %u\n",
error);
1852 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
1854 lstrcatA(keypath,
"\\Installer\\Products\\");
1862 "Expected INSTALLSTATE_ADVERTISED, got %d\n",
state);
1864 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
1874 "Expected INSTALLSTATE_ADVERTISED, got %d\n",
state);
1881 "Expected INSTALLSTATE_ADVERTISED, got %d\n",
state);
1901 lstrcpyA(keypath,
"Software\\Classes\\Installer\\Products\\");
1910 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
1911 lstrcatA(keypath,
"S-1-5-18\\Products\\");
1919 "Expected INSTALLSTATE_ADVERTISED, got %d\n",
state);
1926 "Expected INSTALLSTATE_ADVERTISED, got %d\n",
state);
1948 "!$%&'()*+,-.0123456789=?@ABCDEFGHIJKLMNO" 1949 "PQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwx" 1958 unsigned int x, *
p,
i;
1960 p = (
unsigned int*)
guid;
1961 for(
i=0;
i<4;
i++ )
1987 ok(
hr ==
S_OK,
"Expected S_OK, got %d\n",
hr);
1990 ok(
size == 39,
"Expected 39, got %d\n",
hr);
2001 HKEY userkey, localkey, compkey, compkey2;
2027 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2034 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2041 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2048 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2056 "expected ERROR_SUCCESS, got %u\n",
error);
2063 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2070 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2078 "expected ERROR_SUCCESS, got %u\n",
error);
2086 "expected ERROR_SUCCESS, got %u\n",
error);
2090 lstrcpyA(keypath,
"Software\\Microsoft\\Installer\\Features\\");
2102 "expected ERROR_SUCCESS, got %u\n",
error);
2113 "expected ERROR_SUCCESS, got %u\n",
error);
2115 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2124 skip(
"Not enough rights to perform tests\n");
2138 "expected ERROR_SUCCESS, got %u\n",
error);
2148 "expected ERROR_SUCCESS, got %u\n",
error);
2158 "expected ERROR_SUCCESS, got %u\n",
error);
2168 "expected ERROR_SUCCESS, got %u\n",
error);
2178 "expected ERROR_SUCCESS, got %u\n",
error);
2180 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2182 lstrcatA(keypath,
"\\Components\\");
2188 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2190 lstrcatA(keypath,
"\\Components\\");
2201 "expected ERROR_SUCCESS, got %u\n",
error);
2211 "expected ERROR_SUCCESS, got %u\n",
error);
2221 "expected ERROR_SUCCESS, got %u\n",
error);
2232 "expected ERROR_SUCCESS, got %u\n",
error);
2243 "expected ERROR_SUCCESS, got %u\n",
error);
2254 "expected ERROR_SUCCESS, got %u\n",
error);
2265 "expected ERROR_SUCCESS, got %u\n",
error);
2276 "expected ERROR_SUCCESS, got %u\n",
error);
2292 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
2294 lstrcatA(keypath,
"\\Installer\\Features\\");
2311 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2348 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2350 lstrcatA(keypath,
"\\Components\\");
2356 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2358 lstrcatA(keypath,
"\\Components\\");
2399 lstrcpyA(keypath,
"Software\\Classes\\Installer\\Features\\");
2416 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2417 lstrcatA(keypath,
"S-1-5-18\\Products\\");
2452 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2453 lstrcatA(keypath,
"S-1-5-18\\Components\\");
2459 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2460 lstrcatA(keypath,
"S-1-5-18\\Components\\");
2503 HKEY compkey, prodkey;
2519 if (!pMsiQueryComponentStateA)
2521 win_skip(
"MsiQueryComponentStateA not implemented\n");
2533 state = MAGIC_ERROR;
2538 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2539 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2542 state = MAGIC_ERROR;
2547 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2548 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2551 state = MAGIC_ERROR;
2556 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2557 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2560 state = MAGIC_ERROR;
2565 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2566 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2569 state = MAGIC_ERROR;
2574 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2575 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2578 state = MAGIC_ERROR;
2583 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2584 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2586 state = MAGIC_ERROR;
2591 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2592 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2594 lstrcpyA(keypath,
"Software\\Classes\\Installer\\Products\\");
2600 skip(
"Not enough rights to perform tests\n");
2606 state = MAGIC_ERROR;
2612 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2618 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Products\\");
2620 lstrcatA(keypath,
"\\InstallProperties");
2625 skip(
"Not enough rights to perform tests\n");
2632 state = MAGIC_ERROR;
2636 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2637 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2643 state = MAGIC_ERROR;
2649 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2651 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Components\\");
2658 state = MAGIC_ERROR;
2664 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2670 state = MAGIC_ERROR;
2676 "Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d\n",
state);
2677 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2680 state = MAGIC_ERROR;
2685 ok(
state == MAGIC_ERROR,
"Expected state not changed, got %d\n",
state);
2686 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2692 state = MAGIC_ERROR;
2698 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2704 state = MAGIC_ERROR;
2710 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2716 state = MAGIC_ERROR;
2722 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2728 state = MAGIC_ERROR;
2734 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2740 state = MAGIC_ERROR;
2746 ok(
error == 0xdeadbeef,
"expected 0xdeadbeef, got %u\n",
error);
2757 state = MAGIC_ERROR;
2760 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2762 lstrcpyA(keypath,
"Software\\Microsoft\\Installer\\Products\\");
2768 state = MAGIC_ERROR;
2776 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2780 lstrcatA(keypath,
"\\InstallProperties");
2790 state = MAGIC_ERROR;
2795 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2797 lstrcatA(keypath,
"\\Components\\");
2804 state = MAGIC_ERROR;
2813 state = MAGIC_ERROR;
2817 "Expected INSTALLSTATE_NOTUSED or INSTALLSTATE_LOCAL, got %d\n",
state);
2822 state = MAGIC_ERROR;
2829 state = MAGIC_ERROR;
2832 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2834 lstrcpyA(keypath,
"Software\\Microsoft\\Installer\\Products\\");
2840 state = MAGIC_ERROR;
2843 ok(
state == MAGIC_ERROR,
"Expected 0xdeadbeef, got %d\n",
state);
2848 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Managed\\");
2850 lstrcatA(keypath,
"\\Installer\\Products\\");
2856 state = MAGIC_ERROR;
2864 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\");
2868 lstrcatA(keypath,
"\\InstallProperties");
2876 state = MAGIC_ERROR;
2893 HKEY compkey, prodkey, installprop;
2964 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
2965 lstrcatA(keypath,
"Installer\\UserData\\S-1-5-18\\Components\\");
2971 skip(
"Not enough rights to perform tests\n");
2997 ok(
size == 10,
"Expected 10, got %d\n",
size);
3004 ok(
size == 10,
"Expected 10, got %d\n",
size);
3006 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3007 lstrcatA(keypath,
"Installer\\UserData\\S-1-5-18\\Products\\");
3009 lstrcatA(keypath,
"\\InstallProperties");
3024 ok(
size == 10,
"Expected 10, got %d\n",
size);
3031 ok(
size == 10,
"Expected 10, got %d\n",
size);
3041 ok(
size == 10,
"Expected 10, got %d\n",
size);
3048 ok(
size == 10,
"Expected 10, got %d\n",
size);
3055 ok(
size == 10,
"Expected 10, got %d\n",
size);
3062 ok(
size == 10,
"Expected 10, got %d\n",
size);
3072 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3073 lstrcatA(keypath,
"Installer\\UserData\\");
3075 lstrcatA(keypath,
"\\Components\\");
3101 ok(
size == 10,
"Expected 10, got %d\n",
size);
3108 ok(
size == 10,
"Expected 10, got %d\n",
size);
3110 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3111 lstrcatA(keypath,
"Installer\\UserData\\S-1-5-18\\Products\\");
3113 lstrcatA(keypath,
"\\InstallProperties");
3128 ok(
size == 10,
"Expected 10, got %d\n",
size);
3135 ok(
size == 10,
"Expected 10, got %d\n",
size);
3145 ok(
size == 10,
"Expected 10, got %d\n",
size);
3152 ok(
size == 10,
"Expected 10, got %d\n",
size);
3162 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3163 lstrcatA(keypath,
"Installer\\Managed\\");
3165 lstrcatA(keypath,
"\\Installer\\Products\\");
3182 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3183 lstrcatA(keypath,
"Installer\\UserData\\");
3185 lstrcatA(keypath,
"\\Components\\");
3211 ok(
size == 10,
"Expected 10, got %d\n",
size);
3218 ok(
size == 10,
"Expected 10, got %d\n",
size);
3220 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3221 lstrcatA(keypath,
"Installer\\UserData\\S-1-5-18\\Products\\");
3223 lstrcatA(keypath,
"\\InstallProperties");
3238 ok(
size == 10,
"Expected 10, got %d\n",
size);
3245 ok(
size == 10,
"Expected 10, got %d\n",
size);
3255 ok(
size == 10,
"Expected 10, got %d\n",
size);
3262 ok(
size == 10,
"Expected 10, got %d\n",
size);
3274 lstrcpyA(keypath,
"Software\\Microsoft\\Installer\\Products\\");
3291 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3292 lstrcatA(keypath,
"Installer\\UserData\\");
3294 lstrcatA(keypath,
"\\Components\\");
3320 ok(
size == 10,
"Expected 10, got %d\n",
size);
3327 ok(
size == 10,
"Expected 10, got %d\n",
size);
3337 ok(
size == 10,
"Expected 10, got %d\n",
size);
3344 ok(
size == 10,
"Expected 10, got %d\n",
size);
3353 lstrcpyA(keypath,
"Software\\Classes\\Installer\\Products\\");
3370 lstrcpyA(keypath,
"Software\\Microsoft\\Windows\\CurrentVersion\\");
3371 lstrcatA(keypath,
"Installer\\UserData\\S-1-5-18\\Components\\");
3397 ok(
size == 10,
"Expected 10, got %d\n",
size);
3404 ok(
size == 10,
"Expected 10, got %d\n",
size);