diff --git a/modules/rostests/winetests/msi/action.c b/modules/rostests/winetests/msi/action.c index b22462223bf..35f851f21e7 100644 --- a/modules/rostests/winetests/msi/action.c +++ b/modules/rostests/winetests/msi/action.c @@ -1457,12 +1457,25 @@ static const char ini_install_exec_seq_dat[] = "RemoveFiles\t\t1700\n" "InstallFiles\t\t2000\n" "RemoveIniValues\t\t3000\n" + "riv_immediate\tREMOVE\t3001\n" + "riv_deferred\tREMOVE\t3002\n" "WriteIniValues\t\t3100\n" + "wiv_immediate\tNOT REMOVE\t3101\n" + "wiv_deferred\tNOT REMOVE\t3102\n" "RegisterProduct\t\t5000\n" "PublishFeatures\t\t5100\n" "PublishProduct\t\t5200\n" "InstallFinalize\t\t6000\n"; +static const char ini_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "wiv_immediate\t1\tcustom.dll\tini_absent\n" + "wiv_deferred\t1025\tcustom.dll\tini_present\n" + "riv_immediate\t1\tcustom.dll\tini_present\n" + "riv_deferred\t1025\tcustom.dll\tini_absent\n"; + static const char rci_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" @@ -2260,6 +2273,7 @@ static const msi_table ini_tables[] = ADD_TABLE(ini_ini_file), ADD_TABLE(ini_remove_ini_file), ADD_TABLE(ini_install_exec_seq), + ADD_TABLE(ini_custom_action), ADD_TABLE(media), ADD_TABLE(property) }; diff --git a/modules/rostests/winetests/msi/custom.c b/modules/rostests/winetests/msi/custom.c index b1823043df2..3e742e381bc 100644 --- a/modules/rostests/winetests/msi/custom.c +++ b/modules/rostests/winetests/msi/custom.c @@ -1890,3 +1890,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { return ERROR_SUCCESS; } + +UINT WINAPI ini_present(MSIHANDLE hinst) +{ + char path[MAX_PATH], buf[10]; + DWORD len; + + if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, path))) + SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, path); + strcat(path, "\\msitest\\test.ini"); + + len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), path); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, len == 6, "got %u\n", len); + + return ERROR_SUCCESS; +} + +UINT WINAPI ini_absent(MSIHANDLE hinst) +{ + char path[MAX_PATH], buf[10]; + DWORD len; + + if (FAILED(SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILESX86, NULL, 0, path))) + SHGetFolderPathA(NULL, CSIDL_PROGRAM_FILES, NULL, 0, path); + strcat(path, "\\msitest\\test.ini"); + + len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), path); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) + ok(hinst, !len, "got %u\n", len); + + return ERROR_SUCCESS; +} diff --git a/modules/rostests/winetests/msi/custom.spec b/modules/rostests/winetests/msi/custom.spec index 8b3c2fbf389..bfd83928e44 100644 --- a/modules/rostests/winetests/msi/custom.spec +++ b/modules/rostests/winetests/msi/custom.spec @@ -13,6 +13,8 @@ @ stdcall file_absent(long) @ stdcall font_present(long) @ stdcall font_absent(long) +@ stdcall ini_present(long) +@ stdcall ini_absent(long) @ stdcall mov_present(long) @ stdcall mov_absent(long) @ stdcall odbc_present(long)