diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index a3e54815c01..153ff214d6e 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -4216,19 +4216,9 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE *phPreview ) TRACE("%d %p\n", hdb, phPreview); - db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); - if (!db) - { - MSIHANDLE remote_database = msi_get_remote( hdb ); - if (!remote_database) - return ERROR_INVALID_HANDLE; + if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE))) + return ERROR_INVALID_HANDLE; - *phPreview = 0; - - WARN("MsiEnableUIPreview not allowed during a custom action!\n"); - - return ERROR_FUNCTION_FAILED; - } preview = MSI_EnableUIPreview( db ); if (preview) { diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index b8da55e1ce1..454966e9148 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1150,7 +1150,7 @@ static void test_invalid_functions(MSIHANDLE hinst) ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); r = MsiEnableUIPreview(db, &preview); - todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); sprintf(package_name, "#%u", db); r = MsiOpenPackageA(package_name, &package);