Skip to content

Commit 22740df

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of RegisterExtensionInfo and UnregisterExtensionInfo.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 884d146b3243f01f00efb527bf3f3f578344da94 by Zebediah Figura <[email protected]>
1 parent a4c6f8f commit 22740df

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,12 +1538,25 @@ static const char rei_install_exec_seq_dat[] =
15381538
"RemoveFiles\t\t1700\n"
15391539
"InstallFiles\t\t2000\n"
15401540
"UnregisterExtensionInfo\t\t3000\n"
1541+
"uei_immediate\tREMOVE\t3001\n"
1542+
"uei_deferred\tREMOVE\t3002\n"
15411543
"RegisterExtensionInfo\t\t4000\n"
1544+
"rei_immediate\tNOT REMOVE\t4001\n"
1545+
"rei_deferred\tNOT REMOVE\t4002\n"
15421546
"RegisterProduct\t\t5000\n"
15431547
"PublishFeatures\t\t5100\n"
15441548
"PublishProduct\t\t5200\n"
15451549
"InstallFinalize\t\t6000\n";
15461550

1551+
static const char rei_custom_action_dat[] =
1552+
"Action\tType\tSource\tTarget\n"
1553+
"s72\ti2\tS64\tS0\n"
1554+
"CustomAction\tAction\n"
1555+
"rei_immediate\t1\tcustom.dll\trei_absent\n"
1556+
"rei_deferred\t1025\tcustom.dll\trei_present\n"
1557+
"uei_immediate\t1\tcustom.dll\trei_present\n"
1558+
"uei_deferred\t1025\tcustom.dll\trei_absent\n";
1559+
15471560
static const char rpi_file_dat[] =
15481561
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
15491562
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2210,6 +2223,7 @@ static const msi_table rei_tables[] =
22102223
ADD_TABLE(rei_verb),
22112224
ADD_TABLE(rei_progid),
22122225
ADD_TABLE(rei_install_exec_seq),
2226+
ADD_TABLE(rei_custom_action),
22132227
ADD_TABLE(media),
22142228
ADD_TABLE(property)
22152229
};

modules/rostests/winetests/msi/custom.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,3 +1608,37 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
16081608

16091609
return ERROR_SUCCESS;
16101610
}
1611+
1612+
UINT WINAPI rei_present(MSIHANDLE hinst)
1613+
{
1614+
HKEY key;
1615+
LONG res;
1616+
1617+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1618+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
1619+
ok(hinst, !res, "got %u\n", res);
1620+
RegCloseKey(key);
1621+
1622+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
1623+
ok(hinst, !res, "got %u\n", res);
1624+
RegCloseKey(key);
1625+
}
1626+
1627+
return ERROR_SUCCESS;
1628+
}
1629+
1630+
UINT WINAPI rei_absent(MSIHANDLE hinst)
1631+
{
1632+
HKEY key;
1633+
LONG res;
1634+
1635+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1636+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &key);
1637+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1638+
1639+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &key);
1640+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1641+
}
1642+
1643+
return ERROR_SUCCESS;
1644+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
@ stdcall pub_absent(long)
2626
@ stdcall rci_present(long)
2727
@ stdcall rci_absent(long)
28+
@ stdcall rei_present(long)
29+
@ stdcall rei_absent(long)
2830
@ stdcall rd_present(long)
2931
@ stdcall rd_absent(long)
3032
@ stdcall sds_present(long)

0 commit comments

Comments
 (0)