Skip to content

Commit 29e57f7

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of ProcessComponents.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 5e0e25d4b4eb2ebd0a97bbbe02bf9a5d1ece7ff8 by Zebediah Figura <[email protected]>
1 parent ef7637b commit 29e57f7

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,8 @@ static const char pp_install_exec_seq_dat[] =
396396
"InstallValidate\t\t1400\n"
397397
"InstallInitialize\t\t1500\n"
398398
"ProcessComponents\tPROCESS_COMPONENTS=1 Or FULL=1\t1600\n"
399+
"ppc_immediate\tPROCESS_COMPONENTS AND ALLUSERS\t1601\n"
400+
"ppc_deferred\tPROCESS_COMPONENTS AND ALLUSERS\t1602\n"
399401
"UnpublishFeatures\tUNPUBLISH_FEATURES=1 Or FULL=1\t1800\n"
400402
"RemoveFiles\t\t3500\n"
401403
"InstallFiles\t\t4000\n"
@@ -405,6 +407,13 @@ static const char pp_install_exec_seq_dat[] =
405407
"PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
406408
"InstallFinalize\t\t6600";
407409

410+
static const char pp_custom_action_dat[] =
411+
"Action\tType\tSource\tTarget\n"
412+
"s72\ti2\tS64\tS0\n"
413+
"CustomAction\tAction\n"
414+
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
415+
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
416+
408417
static const char pp_component_dat[] =
409418
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
410419
"s72\tS38\ts72\ti2\tS255\tS72\n"
@@ -1855,6 +1864,7 @@ static const msi_table ppc_tables[] =
18551864
ADD_TABLE(ppc_feature_comp),
18561865
ADD_TABLE(ppc_file),
18571866
ADD_TABLE(pp_install_exec_seq),
1867+
ADD_TABLE(pp_custom_action),
18581868
ADD_TABLE(ppc_media),
18591869
ADD_TABLE(property),
18601870
};

modules/rostests/winetests/msi/custom.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,3 +1434,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
14341434
}
14351435
return ERROR_SUCCESS;
14361436
}
1437+
1438+
static const char ppc_key[] = "Software\\Microsoft\\Windows\\CurrentVersion\\"
1439+
"Installer\\UserData\\S-1-5-18\\Components\\CBABC2FDCCB35E749A8944D8C1C098B5";
1440+
1441+
UINT WINAPI ppc_present(MSIHANDLE hinst)
1442+
{
1443+
char expect[MAX_PATH];
1444+
HKEY key;
1445+
UINT r;
1446+
1447+
r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
1448+
ok(hinst, !r, "got %u\n", r);
1449+
1450+
if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, expect)))
1451+
SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, expect);
1452+
strcat(expect, "\\msitest\\maximus");
1453+
check_reg_str(hinst, key, "84A88FD7F6998CE40A22FB59F6B9C2BB", expect);
1454+
1455+
RegCloseKey(key);
1456+
return ERROR_SUCCESS;
1457+
}
1458+
1459+
UINT WINAPI ppc_absent(MSIHANDLE hinst)
1460+
{
1461+
HKEY key;
1462+
UINT r;
1463+
1464+
r = RegOpenKeyExA(HKEY_LOCAL_MACHINE, ppc_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
1465+
todo_wine
1466+
ok(hinst, r == ERROR_FILE_NOT_FOUND, "got %u\n", r);
1467+
return ERROR_SUCCESS;
1468+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
@ stdcall odbc_absent(long)
1616
@ stdcall pa_present(long)
1717
@ stdcall pa_absent(long)
18+
@ stdcall ppc_present(long)
19+
@ stdcall ppc_absent(long)
1820
@ stdcall rd_present(long)
1921
@ stdcall rd_absent(long)
2022
@ stdcall sds_present(long)

0 commit comments

Comments
 (0)