* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define _WIN32_MSI 300
-#define COBJMACROS
-
-#include <stdio.h>
-
-#include <windows.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <msi.h>
-#include <fci.h>
-#include <objidl.h>
-#include <srrestoreptapi.h>
-#include <shlobj.h>
-
-#include "wine/test.h"
+#include "precomp.h"
static UINT (WINAPI *pMsiQueryComponentStateA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*);
"PublishProduct\t\t1400\n"
"InstallFinalize\t\t1500\n";
+static const char da_custom_action_dat[] =
+ "Action\tType\tSource\tTarget\tISComments\n"
+ "s72\ti2\tS64\tS0\tS255\n"
+ "CustomAction\tAction\n"
+ "deferred\t1074\tCMDEXE\t/c if exist msitest (exit 0) else (exit 1)\t\n"
+ "immediate\t50\tCMDEXE\t/c mkdir msitest\t\n"
+ "cleanup\t50\tCMDEXE\t/c rmdir msitest\t\n";
+
+static const char da_install_exec_seq_dat[] =
+ "Action\tCondition\tSequence\n"
+ "s72\tS255\tI2\n"
+ "InstallExecuteSequence\tAction\n"
+ "CostInitialize\t\t200\n"
+ "FileCost\t\t300\n"
+ "CostFinalize\t\t400\n"
+ "InstallInitialize\t\t500\n"
+ "deferred\t\t600\n"
+ "immediate\t\t700\n"
+ "InstallFinalize\t\t1100\n"
+ "cleanup\t\t1200\n";
+
typedef struct _msi_table
{
const CHAR *filename;
ADD_TABLE(property)
};
+static const msi_table da_tables[] =
+{
+ ADD_TABLE(media),
+ ADD_TABLE(directory),
+ ADD_TABLE(file),
+ ADD_TABLE(component),
+ ADD_TABLE(feature),
+ ADD_TABLE(feature_comp),
+ ADD_TABLE(property),
+ ADD_TABLE(da_install_exec_seq),
+ ADD_TABLE(da_custom_action),
+};
+
/* cabinet definitions */
/* make the max size large so there is only one cab file */
RemoveDirectoryA("msitest");
}
+static void delete_pf_files(void)
+{
+ ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
+ ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
+ ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
+ ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
+ ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
+ ok(delete_pf("msitest", FALSE), "Directory not created\n");
+}
+
static void write_file(const CHAR *filename, const char *data, int data_size)
{
DWORD size;
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", 0, access, &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
r = MsiInstallProductA(msifile, NULL);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
res = RegOpenKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest", &hkey);
ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
ok(!RemoveDirectoryA("c:\\msitest"), "File installed\n");
r = MsiInstallProductA(msifile, "ACTION=ADMIN");
+ todo_wine
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n");
ok(!delete_pf("msitest", FALSE), "Directory created\n");
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
error:
DeleteFileA("msifile");
CoUninitialize();
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
while (!delete_pf("msitest\\Shortcut.lnk", TRUE) && GetLastError() == ERROR_SHARING_VIOLATION) Sleep(1000);
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
error:
delete_test_files();
r = MsiConfigureProductExA(prodcode, INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, "FULL=1");
ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
r = MsiInstallProductA(msifile, "FULL=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
r = MsiInstallProductA(msifile, "FULL=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ delete_pf_files();
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
DeleteFileA( msifile );
}
+static void test_deferred_action(void)
+{
+ UINT r;
+
+ create_database(msifile, da_tables, sizeof(da_tables) / sizeof(da_tables[0]));
+
+ MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
+
+ r = MsiInstallProductA(msifile, "CMDEXE=\"cmd.exe\"");
+ if (r == ERROR_INSTALL_PACKAGE_REJECTED)
+ {
+ skip("Not enough rights to perform tests\n");
+ goto error;
+ }
+todo_wine
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+
+error:
+ DeleteFileA(msifile);
+}
+
START_TEST(install)
{
DWORD len;
test_shared_component();
test_remove_upgrade_code();
test_feature_tree();
+ test_deferred_action();
DeleteFileA(log_file);