ReactOS 0.4.15-dev-7918-g2a2556c
action.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <msiquery.h>
#include <msidefs.h>
#include <msi.h>
#include <fci.h>
#include <srrestoreptapi.h>
#include <wtypes.h>
#include <shellapi.h>
#include <winsvc.h>
#include <odbcinst.h>
#include <sddl.h>
#include "wine/test.h"
#include "utils.h"
#include "typelib.h"
Include dependency graph for action.c:

Go to the source code of this file.

Macros

#define _WIN32_MSI   300
 
#define COBJMACROS
 
#define MEDIA_SIZE   0x7FFFFFFF
 
#define GET_PROC(mod, func)
 
#define CHECK_REG_STR(prodkey, name, expected)    check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__);
 
#define CHECK_DEL_REG_STR(prodkey, name, expected)
 
#define CHECK_DEL_REG_STR_TODO(prodkey, name, expected)
 
#define CHECK_REG_ISTR(prodkey, name, expected)    check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__);
 
#define CHECK_DEL_REG_ISTR(prodkey, name, expected)
 
#define CHECK_REG_MULTI(key, name, expect)    check_reg_multi(key, name, expect, __LINE__);
 
#define CHECK_DEL_REG_MULTI(key, name, expect)
 
#define CHECK_REG_DWORD(prodkey, name, expected)    check_reg_dword(prodkey, name, expected, FALSE, __LINE__);
 
#define CHECK_REG_DWORD_TODO(prodkey, name, expected)    check_reg_dword(prodkey, name, expected, TRUE, __LINE__);
 
#define CHECK_DEL_REG_DWORD(prodkey, name, expected)
 
#define CHECK_DEL_REG_DWORD_TODO(prodkey, name, expected)
 

Functions

static UINT (WINAPI *pMsiQueryComponentStateA)(LPCSTR
 
static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)(LPCSTR
 
static INSTALLSTATE *static LONG (WINAPI *pRegDeleteKeyExA)(HKEY
 
static BOOL (WINAPI *pIsWow64Process)(HANDLE
 
static void init_functionpointers (void)
 
static charget_user_sid (void)
 
static void create_test_files (void)
 
static void delete_test_files (void)
 
static BOOL notify_system_change (DWORD event_type, STATEMGRSTATUS *status)
 
static void remove_restore_point (DWORD seq_number)
 
static LONG delete_key (HKEY key, LPCSTR subkey, REGSAM access)
 
static void delete_pfmsitest_files (void)
 
static void check_reg_str (HKEY prodkey, LPCSTR name, LPCSTR expected, BOOL bcase, BOOL todo, DWORD line)
 
static void check_reg_multi (HKEY prodkey, const char *name, const char *expect, DWORD line)
 
static void check_reg_dword (HKEY prodkey, LPCSTR name, DWORD expected, BOOL todo, DWORD line)
 
static void get_date_str (LPSTR date)
 
static DWORD get_estimated_size (void)
 
static void extract_resource (const char *name, const char *type, const char *path)
 
static void test_register_product (void)
 
static void test_publish_product (void)
 
static void test_publish_features (void)
 
static LPSTR reg_get_val_str (HKEY hkey, LPCSTR name)
 
static void get_owner_company (LPSTR *owner, LPSTR *company)
 
static void test_register_user (void)
 
static void test_process_components (void)
 
static void test_publish (void)
 
static void test_publish_sourcelist (void)
 
static void test_remove_files (void)
 
static void test_move_files (void)
 
static void test_duplicate_files (void)
 
static void test_write_registry_values (void)
 
static void test_envvar (void)
 
static void test_create_remove_folder (void)
 
static void test_start_stop_services (void)
 
static void delete_test_service (const char *name)
 
static void test_delete_services (void)
 
static void test_install_services (void)
 
static void test_self_registration (void)
 
static void test_register_font (void)
 
static void test_validate_product_id (void)
 
static void test_install_remove_odbc (void)
 
static void test_register_typelib (void)
 
static void test_create_remove_shortcut (void)
 
static void test_publish_components (void)
 
static void test_remove_duplicate_files (void)
 
static void test_find_related_products (void)
 
static void test_ini_values (void)
 
static void test_register_class_info (void)
 
static void test_register_extension_info (void)
 
static void test_register_progid_info (void)
 
static void test_register_mime_info (void)
 
static void test_publish_assemblies (void)
 
static void test_remove_existing_products (void)
 
 START_TEST (action)
 

Variables

static LPCSTR
 
static MSIINSTALLCONTEXT
 
static INSTALLSTATE *static DWORD
 
static INSTALLSTATE *static LPSTR
 
static INSTALLSTATE *static LPDWORD
 
static INSTALLSTATE *static REGSAM
 
static PBOOL
 
static STATEMGRSTATUS *static BOOL is_wow64
 
static const BOOL is_64bit = sizeof(void *) > sizeof(int)
 
static const charmsifile = "msitest.msi"
 
static const char component_dat []
 
static const char directory_dat []
 
static const char feature_dat []
 
static const char feature_comp_dat []
 
static const char file_dat []
 
static const char install_exec_seq_dat []
 
static const char media_dat []
 
static const char property_dat []
 
static const char env_install_exec_seq_dat []
 
static const char env_custom_action_dat []
 
static const char env_environment_dat []
 
static const char service_install_dat []
 
static const char service_install2_dat []
 
static const char service_control_dat []
 
static const char sss_service_control_dat []
 
static const char sss_install_exec_seq_dat []
 
static const char sss_custom_action_dat []
 
static const char sds_install_exec_seq_dat []
 
static const char sds_custom_action_dat []
 
static const char sis_install_exec_seq_dat []
 
static const char sis_custom_action_dat []
 
static const char rof_component_dat []
 
static const char rof_feature_dat []
 
static const char rof_feature_comp_dat []
 
static const char rof_file_dat []
 
static const char rof_media_dat []
 
static const char ci2_feature_comp_dat []
 
static const char ci2_file_dat []
 
static const char pp_install_exec_seq_dat []
 
static const char pp_custom_action_dat []
 
static const char pp_component_dat []
 
static const char ppc_component_dat []
 
static const char ppc_file_dat []
 
static const char ppc_media_dat []
 
static const char ppc_feature_comp_dat []
 
static const char cwd_component_dat []
 
static const char rem_component_dat []
 
static const char rem_feature_comp_dat []
 
static const char rem_file_dat []
 
static const char rem_install_exec_seq_dat []
 
static const char rem_remove_files_dat []
 
static const char mov_move_file_dat []
 
static const char mov_install_exec_seq_dat []
 
static const char mov_custom_action_dat []
 
static const char df_directory_dat []
 
static const char df_duplicate_file_dat []
 
static const char wrv_component_dat []
 
static const char wrv_feature_dat []
 
static const char wrv_feature_comp_dat []
 
static const char wrv_registry_dat []
 
static const char wrv_remove_registry_dat []
 
static const char wrv_install_exec_seq_dat []
 
static const char wrv_custom_action_dat []
 
static const char cf_directory_dat []
 
static const char cf_component_dat []
 
static const char cf_feature_dat []
 
static const char cf_feature_comp_dat []
 
static const char cf_file_dat []
 
static const char cf_create_folders_dat []
 
static const char cf_install_exec_seq_dat []
 
static const char cf_custom_action_dat []
 
static const char sr_file_dat []
 
static const char sr_feature_dat []
 
static const char sr_feature_comp_dat []
 
static const char sr_component_dat []
 
static const char sr_selfreg_dat []
 
static const char sr_install_exec_seq_dat []
 
static const char sr_custom_action_dat []
 
static const char font_media_dat []
 
static const char font_file_dat []
 
static const char font_feature_dat []
 
static const char font_component_dat []
 
static const char font_feature_comp_dat []
 
static const char font_dat []
 
static const char font_install_exec_seq_dat []
 
static const char font_custom_action_dat []
 
static const char vp_property_dat []
 
static const char vp_custom_action_dat []
 
static const char vp_install_exec_seq_dat []
 
static const char odbc_file_dat []
 
static const char odbc_feature_dat []
 
static const char odbc_feature_comp_dat []
 
static const char odbc_component_dat []
 
static const char odbc_driver_dat []
 
static const char odbc_translator_dat []
 
static const char odbc_datasource_dat []
 
static const char odbc_install_exec_seq_dat []
 
static const char odbc_custom_action_dat []
 
static const char odbc_media_dat []
 
static const char tl_file_dat []
 
static const char tl_feature_dat []
 
static const char tl_feature_comp_dat []
 
static const char tl_component_dat []
 
static const char tl_typelib_dat []
 
static const char tl_install_exec_seq_dat []
 
static const char tl_custom_action_dat []
 
static const char crs_file_dat []
 
static const char crs_feature_dat []
 
static const char crs_feature_comp_dat []
 
static const char crs_component_dat []
 
static const char crs_shortcut_dat []
 
static const char crs_install_exec_seq_dat []
 
static const char crs_custom_action_dat []
 
static const char pub_file_dat []
 
static const char pub_feature_dat []
 
static const char pub_feature_comp_dat []
 
static const char pub_component_dat []
 
static const char pub_publish_component_dat []
 
static const char pub_install_exec_seq_dat []
 
static const char pub_custom_action_dat []
 
static const char rd_file_dat []
 
static const char rd_feature_dat []
 
static const char rd_feature_comp_dat []
 
static const char rd_component_dat []
 
static const char rd_duplicate_file_dat []
 
static const char rd_install_exec_seq_dat []
 
static const char rd_custom_action_dat []
 
static const char frp_file_dat []
 
static const char frp_feature_dat []
 
static const char frp_feature_comp_dat []
 
static const char frp_component_dat []
 
static const char frp_custom_action_dat []
 
static const char frp_upgrade_dat []
 
static const char frp_install_exec_seq_dat []
 
static const char ini_file_dat []
 
static const char ini_feature_dat []
 
static const char ini_feature_comp_dat []
 
static const char ini_component_dat []
 
static const char ini_ini_file_dat []
 
static const char ini_remove_ini_file_dat []
 
static const char ini_install_exec_seq_dat []
 
static const char ini_custom_action_dat []
 
static const char rci_file_dat []
 
static const char rci_feature_dat []
 
static const char rci_feature_comp_dat []
 
static const char rci_component_dat []
 
static const char rci_appid_dat []
 
static const char rci_class_dat []
 
static const char rci_install_exec_seq_dat []
 
static const char rci_custom_action_dat []
 
static const char rei_file_dat []
 
static const char rei_feature_dat []
 
static const char rei_feature_comp_dat []
 
static const char rei_component_dat []
 
static const char rei_extension_dat []
 
static const char rei_verb_dat []
 
static const char rei_progid_dat []
 
static const char rei_install_exec_seq_dat []
 
static const char rei_custom_action_dat []
 
static const char rpi_file_dat []
 
static const char rpi_feature_dat []
 
static const char rpi_feature_comp_dat []
 
static const char rpi_component_dat []
 
static const char rpi_appid_dat []
 
static const char rpi_class_dat []
 
static const char rpi_extension_dat []
 
static const char rpi_verb_dat []
 
static const char rpi_progid_dat []
 
static const char rpi_install_exec_seq_dat []
 
static const char rpi_custom_action_dat []
 
static const char rmi_file_dat []
 
static const char rmi_feature_dat []
 
static const char rmi_feature_comp_dat []
 
static const char rmi_component_dat []
 
static const char rmi_extension_dat []
 
static const char rmi_verb_dat []
 
static const char rmi_mime_dat []
 
static const char rmi_install_exec_seq_dat []
 
static const char rmi_custom_action_dat []
 
static const char pa_file_dat []
 
static const char pa_feature_dat []
 
static const char pa_feature_comp_dat []
 
static const char pa_component_dat []
 
static const char pa_msi_assembly_dat []
 
static const char pa_msi_assembly_name_dat []
 
static const char pa_install_exec_seq_dat []
 
static const char pa_custom_action_dat []
 
static const char rep_file_dat []
 
static const char rep_feature_dat []
 
static const char rep_feature_comp_dat []
 
static const char rep_component_dat []
 
static const char rep_upgrade_dat []
 
static const char rep_property_dat []
 
static const char rep_install_exec_seq_dat []
 
static const msi_table env_tables []
 
static const msi_table pp_tables []
 
static const msi_table ppc_tables []
 
static const msi_table rem_tables []
 
static const msi_table mov_tables []
 
static const msi_table df_tables []
 
static const msi_table wrv_tables []
 
static const msi_table cf_tables []
 
static const msi_table sss_tables []
 
static const msi_table sds_tables []
 
static const msi_table sis_tables []
 
static const msi_table sr_tables []
 
static const msi_table font_tables []
 
static const msi_table vp_tables []
 
static const msi_table odbc_tables []
 
static const msi_table tl_tables []
 
static const msi_table crs_tables []
 
static const msi_table pub_tables []
 
static const msi_table rd_tables []
 
static const msi_table frp_tables []
 
static const msi_table ini_tables []
 
static const msi_table rci_tables []
 
static const msi_table rei_tables []
 
static const msi_table rpi_tables []
 
static const msi_table rmi_tables []
 
static const msi_table pa_tables []
 
static const msi_table rep_tables []
 

Macro Definition Documentation

◆ _WIN32_MSI

#define _WIN32_MSI   300

Definition at line 22 of file action.c.

◆ CHECK_DEL_REG_DWORD

#define CHECK_DEL_REG_DWORD (   prodkey,
  name,
  expected 
)
Value:
do { \
check_reg_dword(prodkey, name, expected, FALSE, __LINE__); \
RegDeleteValueA(prodkey, name); \
} while(0)
#define FALSE
Definition: types.h:117
BOOL expected
Definition: store.c:2063
Definition: name.c:39

Definition at line 2602 of file action.c.

◆ CHECK_DEL_REG_DWORD_TODO

#define CHECK_DEL_REG_DWORD_TODO (   prodkey,
  name,
  expected 
)
Value:
do { \
check_reg_dword(prodkey, name, expected, TRUE, __LINE__); \
RegDeleteValueA(prodkey, name); \
} while(0)
#define TRUE
Definition: types.h:120

Definition at line 2608 of file action.c.

◆ CHECK_DEL_REG_ISTR

#define CHECK_DEL_REG_ISTR (   prodkey,
  name,
  expected 
)
Value:
do { \
check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__); \
RegDeleteValueA(prodkey, name); \
} while(0)

Definition at line 2581 of file action.c.

◆ CHECK_DEL_REG_MULTI

#define CHECK_DEL_REG_MULTI (   key,
  name,
  expect 
)
Value:
do { \
check_reg_multi(key, name, expect, __LINE__); \
RegDeleteValueA(key, name); \
} while(0)
#define expect(EXPECTED, GOT)
Definition: SystemMenu.c:483
Definition: copy.c:22

Definition at line 2590 of file action.c.

◆ CHECK_DEL_REG_STR

#define CHECK_DEL_REG_STR (   prodkey,
  name,
  expected 
)
Value:
do { \
check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__); \
RegDeleteValueA(prodkey, name); \
} while(0)

Definition at line 2566 of file action.c.

◆ CHECK_DEL_REG_STR_TODO

#define CHECK_DEL_REG_STR_TODO (   prodkey,
  name,
  expected 
)
Value:
do { \
check_reg_str(prodkey, name, expected, TRUE, TRUE, __LINE__); \
RegDeleteValueA(prodkey, name); \
} while(0)

Definition at line 2572 of file action.c.

◆ CHECK_REG_DWORD

#define CHECK_REG_DWORD (   prodkey,
  name,
  expected 
)     check_reg_dword(prodkey, name, expected, FALSE, __LINE__);

Definition at line 2596 of file action.c.

◆ CHECK_REG_DWORD_TODO

#define CHECK_REG_DWORD_TODO (   prodkey,
  name,
  expected 
)     check_reg_dword(prodkey, name, expected, TRUE, __LINE__);

Definition at line 2599 of file action.c.

◆ CHECK_REG_ISTR

#define CHECK_REG_ISTR (   prodkey,
  name,
  expected 
)     check_reg_str(prodkey, name, expected, FALSE, FALSE, __LINE__);

Definition at line 2578 of file action.c.

◆ CHECK_REG_MULTI

#define CHECK_REG_MULTI (   key,
  name,
  expect 
)     check_reg_multi(key, name, expect, __LINE__);

Definition at line 2587 of file action.c.

◆ CHECK_REG_STR

#define CHECK_REG_STR (   prodkey,
  name,
  expected 
)     check_reg_str(prodkey, name, expected, TRUE, FALSE, __LINE__);

Definition at line 2563 of file action.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 26 of file action.c.

◆ GET_PROC

#define GET_PROC (   mod,
  func 
)
Value:
p ## func = (void*)GetProcAddress(mod, #func); \
if(!p ## func) \
trace("GetProcAddress(%s) failed\n", #func);
#define GetProcAddress(x, y)
Definition: compat.h:753
GLenum func
Definition: glext.h:6028
GLfloat GLfloat p
Definition: glext.h:8902
static int mod
Definition: i386-dis.c:1288

◆ MEDIA_SIZE

#define MEDIA_SIZE   0x7FFFFFFF

Definition at line 2376 of file action.c.

Function Documentation

◆ BOOL()

static BOOL ( WINAPI pIsWow64Process)
static

◆ check_reg_dword()

static void check_reg_dword ( HKEY  prodkey,
LPCSTR  name,
DWORD  expected,
BOOL  todo,
DWORD  line 
)
static

Definition at line 2550 of file action.c.

2551{
2552 DWORD val, size, type;
2553 LONG res;
2554
2555 size = sizeof(DWORD);
2556 res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)&val, &size);
2557 ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
2558 ok_(__FILE__, line)(type == REG_DWORD, "Got wrong type %lu\n", type);
2560 ok_(__FILE__, line)(val == expected, "Expected %lu, got %lu\n", expected, val);
2561}
#define ok_(x1, x2)
Definition: atltest.h:61
#define NULL
Definition: types.h:112
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLuint GLfloat * val
Definition: glext.h:7180
BOOL todo
Definition: filedlg.c:313
#define todo_wine_if(is_todo)
Definition: custom.c:76
#define DWORD
Definition: nt_native.h:44
long LONG
Definition: pedump.c:60
#define REG_DWORD
Definition: sdbapi.c:596
Definition: parser.c:49
unsigned char BYTE
Definition: xxhash.c:193

◆ check_reg_multi()

static void check_reg_multi ( HKEY  prodkey,
const char name,
const char expect,
DWORD  line 
)
static

Definition at line 2530 of file action.c.

2531{
2532 char val[MAX_PATH];
2533 DWORD expect_size = 0, size, type;
2534 const char *p;
2535 LONG res;
2536
2537 for (p = expect; *p; p += strlen(p) + 1)
2538 ;
2539 expect_size = (p + 1) - expect;
2540
2541 size = MAX_PATH;
2542 val[0] = '\0';
2543 res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size);
2544 ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
2545 ok_(__FILE__, line)(type == REG_MULTI_SZ, "Got wrong type %lu\n", type);
2546 ok_(__FILE__, line)(size == expect_size, "expected size %lu, got %lu\n", expect_size, size);
2547 ok_(__FILE__, line)(!memcmp(val, expect, size), "got %s\n", debugstr_an(val, size));
2548}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
#define MAX_PATH
Definition: compat.h:34
#define REG_MULTI_SZ
Definition: nt_native.h:1501

◆ check_reg_str()

static void check_reg_str ( HKEY  prodkey,
LPCSTR  name,
LPCSTR  expected,
BOOL  bcase,
BOOL  todo,
DWORD  line 
)
static

Definition at line 2510 of file action.c.

2511{
2512 char val[MAX_PATH];
2513 DWORD size, type;
2514 LONG res;
2515
2516 size = MAX_PATH;
2517 val[0] = '\0';
2518 res = RegQueryValueExA(prodkey, name, NULL, &type, (BYTE *)val, &size);
2519 ok_(__FILE__, line)(!res, "Failed to query value, error %ld\n", res);
2520 ok_(__FILE__, line)(type == REG_SZ || type == REG_EXPAND_SZ, "Got wrong type %lu\n", type);
2522 {
2523 if (bcase)
2524 ok_(__FILE__, line)(!strcmp(val, expected), "got %s\n", debugstr_a(val));
2525 else
2526 ok_(__FILE__, line)(!strcasecmp(val, expected), "got %s\n", debugstr_a(val));
2527 }
2528}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define strcasecmp
Definition: fake.h:9
#define debugstr_a
Definition: kernel32.h:31
#define REG_SZ
Definition: layer.c:22
#define REG_EXPAND_SZ
Definition: nt_native.h:1494

◆ create_test_files()

static void create_test_files ( void  )
static

Definition at line 2424 of file action.c.

2425{
2426 CreateDirectoryA("msitest", NULL);
2427 create_file("msitest\\one.txt", 100);
2428 CreateDirectoryA("msitest\\first", NULL);
2429 create_file("msitest\\first\\two.txt", 100);
2430 CreateDirectoryA("msitest\\second", NULL);
2431 create_file("msitest\\second\\three.txt", 100);
2432
2433 create_file("four.txt", 100);
2434 create_file("five.txt", 100);
2435 create_cab_file("msitest.cab", MEDIA_SIZE, "four.txt\0five.txt\0");
2436
2437 create_file("msitest\\filename", 100);
2438 create_file("msitest\\service.exe", 100);
2439 create_file("msitest\\service2.exe", 100);
2440
2441 DeleteFileA("four.txt");
2442 DeleteFileA("five.txt");
2443}
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
static void create_cab_file(void)
Definition: files.c:356
#define create_file(name, size)
Definition: asmcache.c:813
#define MEDIA_SIZE
Definition: action.c:2376

Referenced by test_create_remove_shortcut(), test_delete_services(), test_find_related_products(), test_ini_values(), test_install_remove_odbc(), test_install_services(), test_publish_assemblies(), test_publish_components(), test_register_class_info(), test_register_extension_info(), test_register_font(), test_register_mime_info(), test_register_progid_info(), test_register_typelib(), test_remove_duplicate_files(), test_remove_existing_products(), test_self_registration(), test_start_stop_services(), and test_validate_product_id().

◆ delete_key()

static LONG delete_key ( HKEY  key,
LPCSTR  subkey,
REGSAM  access 
)
static

Definition at line 2481 of file action.c.

2482{
2483 if (pRegDeleteKeyExA)
2484 return pRegDeleteKeyExA( key, subkey, access, 0 );
2485 return RegDeleteKeyA( key, subkey );
2486}
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866

◆ delete_pfmsitest_files()

static void delete_pfmsitest_files ( void  )
static

Definition at line 2488 of file action.c.

2489{
2490 SHFILEOPSTRUCTA shfl;
2491 CHAR path[MAX_PATH+11];
2492
2494 lstrcatA(path, "\\msitest\\*");
2495 path[strlen(path) + 1] = '\0';
2496
2497 shfl.hwnd = NULL;
2498 shfl.wFunc = FO_DELETE;
2499 shfl.pFrom = path;
2500 shfl.pTo = NULL;
2502
2503 SHFileOperationA(&shfl);
2504
2506 lstrcatA(path, "\\msitest");
2508}
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
Definition: dir.c:714
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
static char PROG_FILES_DIR[MAX_PATH]
Definition: automation.c:362
#define FO_DELETE
Definition: shellapi.h:138
#define FOF_FILESONLY
Definition: shellapi.h:148
#define FOF_NOERRORUI
Definition: shellapi.h:151
#define FOF_NOCONFIRMATION
Definition: shellapi.h:145
#define FOF_SILENT
Definition: shellapi.h:143
#define FOF_NORECURSION
Definition: shlfileop.c:38
int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
Definition: shlfileop.cpp:1059
FILEOP_FLAGS fFlags
Definition: shellapi.h:349
char CHAR
Definition: xmlstorage.h:175

Referenced by test_publish(), and test_publish_sourcelist().

◆ delete_test_files()

static void delete_test_files ( void  )
static

◆ delete_test_service()

static void delete_test_service ( const char name)
static

Definition at line 5246 of file action.c.

5247{
5248 BOOL ret;
5249 SC_HANDLE manager, service;
5250
5252 ok(manager != NULL, "can't open service manager\n");
5253 if (!manager) return;
5254
5255 service = OpenServiceA(manager, name, GENERIC_ALL);
5256 if (service)
5257 {
5258 ret = DeleteService( service );
5259 ok( ret, "failed to delete service %lu\n", GetLastError() );
5260 CloseServiceHandle(service);
5261 }
5262 CloseServiceHandle(manager);
5263}
#define ok(value,...)
Definition: atltest.h:57
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GENERIC_ALL
Definition: nt_native.h:92
BOOL WINAPI DeleteService(SC_HANDLE hService)
Definition: scm.c:921
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, DWORD dwDesiredAccess)
Definition: scm.c:2112
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR lpMachineName, LPCSTR lpDatabaseName, DWORD dwDesiredAccess)
Definition: scm.c:2024
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
Definition: scm.c:580
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define SC_MANAGER_ALL_ACCESS
Definition: winsvc.h:13

Referenced by test_delete_services(), and test_install_services().

◆ extract_resource()

static void extract_resource ( const char name,
const char type,
const char path 
)
static

Definition at line 2639 of file action.c.

2640{
2641 DWORD written;
2642 HANDLE file;
2643 HRSRC res;
2644 void *ptr;
2645
2647 ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %lu\n", path, GetLastError());
2648
2650 ok( res != 0, "couldn't find resource\n" );
2653 ok( written == SizeofResource( GetModuleHandleA(NULL), res ), "couldn't write resource\n" );
2654 CloseHandle( file );
2655}
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define GENERIC_READ
Definition: compat.h:135
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
#define CREATE_ALWAYS
Definition: disk.h:72
static PVOID ptr
Definition: dispmode.c:27
#define GENERIC_WRITE
Definition: nt_native.h:90
Definition: fci.c:127

Referenced by test_register_typelib(), and test_self_registration().

◆ get_date_str()

static void get_date_str ( LPSTR  date)
static

Definition at line 2614 of file action.c.

2615{
2616 SYSTEMTIME systime;
2617
2618 static const char date_fmt[] = "%d%02d%02d";
2619 GetLocalTime(&systime);
2620 sprintf(date, date_fmt, systime.wYear, systime.wMonth, systime.wDay);
2621}
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:286
__u16 date
Definition: mkdosfs.c:8
#define sprintf(buf, format,...)
Definition: sprintf.c:55
WORD wYear
Definition: winbase.h:905
WORD wMonth
Definition: winbase.h:906
WORD wDay
Definition: winbase.h:908

Referenced by test_publish(), and test_register_product().

◆ get_estimated_size()

static DWORD get_estimated_size ( void  )
static

Definition at line 2624 of file action.c.

2625{
2626 SYSTEM_INFO si;
2627 HANDLE file;
2628 DWORD size;
2629
2630 GetSystemInfo(&si);
2631
2633 size = ((GetFileSize(file, NULL) + si.dwPageSize - 1) / si.dwPageSize + 1);
2634 size = size * si.dwPageSize / 1024;
2636 return size;
2637}
#define OPEN_EXISTING
Definition: compat.h:775
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:143
static const char * msifile
Definition: action.c:66
DWORD dwPageSize
Definition: winbase.h:1173

Referenced by test_publish(), and test_register_product().

◆ get_owner_company()

static void get_owner_company ( LPSTR owner,
LPSTR company 
)
static

Definition at line 3411 of file action.c.

3412{
3413 LONG res;
3414 HKEY hkey;
3416
3417 *owner = *company = NULL;
3418
3419 if (is_wow64)
3421
3423 "Software\\Microsoft\\MS Setup (ACME)\\User Info", &hkey);
3424 if (res == ERROR_SUCCESS)
3425 {
3426 *owner = reg_get_val_str(hkey, "DefName");
3427 *company = reg_get_val_str(hkey, "DefCompany");
3428 RegCloseKey(hkey);
3429 }
3430
3431 if (!*owner || !*company)
3432 {
3434 "Software\\Microsoft\\Windows NT\\CurrentVersion", 0, access, &hkey);
3435 if (res == ERROR_SUCCESS)
3436 {
3437 *owner = reg_get_val_str(hkey, "RegisteredOwner");
3438 *company = reg_get_val_str(hkey, "RegisteredOrganization");
3439 RegCloseKey(hkey);
3440 }
3441 }
3442
3443 if (!*owner || !*company)
3444 {
3446 "Software\\Microsoft\\Windows\\CurrentVersion", 0, access, &hkey);
3447 if (res == ERROR_SUCCESS)
3448 {
3449 *owner = reg_get_val_str(hkey, "RegisteredOwner");
3450 *company = reg_get_val_str(hkey, "RegisteredOrganization");
3451 RegCloseKey(hkey);
3452 }
3453 }
3454}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3298
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3234
BOOL is_wow64
Definition: msi.c:54
static LPSTR reg_get_val_str(HKEY hkey, LPCSTR name)
Definition: action.c:3393
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_USER
Definition: winreg.h:11
ACCESS_MASK REGSAM
Definition: winreg.h:69
#define KEY_WOW64_64KEY
Definition: cmtypes.h:46

Referenced by test_register_user().

◆ get_user_sid()

static char * get_user_sid ( void  )
static

Definition at line 2405 of file action.c.

2406{
2407 HANDLE token;
2408 DWORD size = 0;
2410 char *usersid = NULL;
2411
2414
2415 user = malloc(size);
2417 ConvertSidToStringSidA(user->User.Sid, &usersid);
2418 free(user);
2419
2421 return usersid;
2422}
void user(int argc, const char *argv[])
Definition: cmds.c:1350
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
Definition: security.c:411
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:294
BOOL WINAPI ConvertSidToStringSidA(PSID Sid, LPSTR *StringSid)
Definition: security.c:3637
#define GetCurrentProcess()
Definition: compat.h:759
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
#define TOKEN_QUERY
Definition: setypes.h:928
@ TokenUser
Definition: setypes.h:966

Referenced by test_process_components(), test_publish_features(), test_publish_product(), test_register_product(), and test_register_user().

◆ init_functionpointers()

static void init_functionpointers ( void  )
static

Definition at line 2378 of file action.c.

2379{
2380 HMODULE hmsi = GetModuleHandleA("msi.dll");
2381 HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll");
2382 HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
2383 HMODULE hsrclient = LoadLibraryA("srclient.dll");
2384
2385#define GET_PROC(mod, func) \
2386 p ## func = (void*)GetProcAddress(mod, #func); \
2387 if(!p ## func) \
2388 trace("GetProcAddress(%s) failed\n", #func);
2389
2395
2396 GET_PROC(hadvapi32, RegDeleteKeyExA)
2398
2399 GET_PROC(hsrclient, SRRemoveRestorePoint);
2400 GET_PROC(hsrclient, SRSetRestorePointA);
2401
2402#undef GET_PROC
2403}
LONG WINAPI RegDeleteKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
Definition: reg.c:1254
#define IsWow64Process
Definition: compat.h:760
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
INSTALLSTATE WINAPI MsiGetComponentPathExA(LPCSTR product, LPCSTR comp, LPCSTR usersid, MSIINSTALLCONTEXT ctx, LPSTR buf, LPDWORD buflen)
Definition: msi.c:2866
UINT WINAPI MsiQueryComponentStateA(LPCSTR szProductCode, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, LPCSTR szComponent, INSTALLSTATE *pdwState)
Definition: msi.c:2057
UINT WINAPI MsiQueryFeatureStateExA(LPCSTR product, LPCSTR usersid, MSIINSTALLCONTEXT ctx, LPCSTR feature, INSTALLSTATE *state)
Definition: msi.c:2993
UINT WINAPI MsiSourceListEnumSourcesA(const char *szProductCodeOrPatch, const char *szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, DWORD dwIndex, char *szSource, DWORD *pcchSource)
Definition: source.c:329
UINT WINAPI MsiSourceListGetInfoA(LPCSTR szProduct, LPCSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCSTR szProperty, LPSTR szValue, LPDWORD pcchValue)
Definition: source.c:470
static HINSTANCE hkernel32
Definition: process.c:66
#define GET_PROC(mod, func)
BOOL WINAPI SRSetRestorePointA(PRESTOREPOINTINFOA pRestorePtSpec, PSTATEMGRSTATUS pSMgrStatus)
Definition: sfc.c:54
DWORD WINAPI SRRemoveRestorePoint(DWORD dwNumber)
Definition: srclient_main.c:71

Referenced by START_TEST().

◆ INSTALLSTATE()

static INSTALLSTATE ( WINAPI pMsiGetComponentPathExA)
static

◆ LONG()

static INSTALLSTATE *static LONG ( WINAPI pRegDeleteKeyExA)
static

◆ notify_system_change()

static BOOL notify_system_change ( DWORD  event_type,
STATEMGRSTATUS status 
)
static

Definition at line 2460 of file action.c.

2461{
2462 RESTOREPOINTINFOA spec;
2463
2464 spec.dwEventType = event_type;
2466 spec.llSequenceNumber = status->llSequenceNumber;
2467 lstrcpyA(spec.szDescription, "msitest restore point");
2468
2469 return pSRSetRestorePointA(&spec, status);
2470}
#define APPLICATION_INSTALL
CHAR szDescription[MAX_DESC]
Definition: ps.c:97

Referenced by START_TEST().

◆ reg_get_val_str()

static LPSTR reg_get_val_str ( HKEY  hkey,
LPCSTR  name 
)
static

Definition at line 3393 of file action.c.

3394{
3395 DWORD len = 0;
3396 LPSTR val;
3397 LONG r;
3398
3399 r = RegQueryValueExA(hkey, name, NULL, NULL, NULL, &len);
3400 if (r != ERROR_SUCCESS)
3401 return NULL;
3402
3403 len += sizeof (WCHAR);
3404 val = malloc(len);
3405 if (!val) return NULL;
3406 val[0] = 0;
3408 return val;
3409}
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLenum GLsizei len
Definition: glext.h:6722
unsigned char * LPBYTE
Definition: typedefs.h:53
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by get_owner_company().

◆ remove_restore_point()

static void remove_restore_point ( DWORD  seq_number)
static

Definition at line 2472 of file action.c.

2473{
2474 DWORD res;
2475
2476 res = pSRRemoveRestorePoint(seq_number);
2477 if (res != ERROR_SUCCESS)
2478 trace("Failed to remove the restore point : %#lx\n", res);
2479}
#define trace
Definition: atltest.h:70

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( action  )

Definition at line 6533 of file action.c.

6534{
6535 DWORD len;
6536 char temp_path[MAX_PATH], prev_path[MAX_PATH], log_file[MAX_PATH];
6538 BOOL ret = FALSE;
6539
6541 subtest("custom");
6542
6543 if (pIsWow64Process)
6544 pIsWow64Process(GetCurrentProcess(), &is_wow64);
6545
6546 GetCurrentDirectoryA(MAX_PATH, prev_path);
6549
6552
6553 if(len && (CURR_DIR[len - 1] == '\\'))
6554 CURR_DIR[len - 1] = 0;
6555
6556 ok(get_system_dirs(), "failed to retrieve system dirs\n");
6557 ok(get_user_dirs(), "failed to retrieve user dirs\n");
6558
6559 /* Create a restore point ourselves so we circumvent the multitude of restore points
6560 * that would have been created by all the installation and removal tests.
6561 *
6562 * This is not needed on version 5.0 where setting MSIFASTINSTALL prevents the
6563 * creation of restore points.
6564 */
6565 if (pSRSetRestorePointA && !pMsiGetComponentPathExA)
6566 {
6567 memset(&status, 0, sizeof(status));
6569 }
6570
6571 /* Create only one log file and don't append. We have to pass something
6572 * for the log mode for this to work. The logfile needs to have an absolute
6573 * path otherwise we still end up with some extra logfiles as some tests
6574 * change the current directory.
6575 */
6577 lstrcatA(log_file, "\\msitest.log");
6579
6585 test_publish();
6591 test_envvar();
6612
6614
6615 if (pSRSetRestorePointA && !pMsiGetComponentPathExA && ret)
6616 {
6618 if (ret)
6619 remove_restore_point(status.llSequenceNumber);
6620 }
6621
6622 SetCurrentDirectoryA(prev_path);
6623}
static char CURR_DIR[MAX_PATH]
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2146
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
Definition: path.c:2206
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2054
UINT WINAPI MsiEnableLogA(DWORD dwLogMode, const char *szLogFile, DWORD attributes)
Definition: msi.c:1884
UNICODE_STRING log_file
Definition: btrfs.c:89
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
static void remove_restore_point(DWORD seq_number)
Definition: action.c:2472
static void test_remove_duplicate_files(void)
Definition: action.c:5836
static void test_register_product(void)
Definition: action.c:2657
static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status)
Definition: action.c:2460
static void test_register_font(void)
Definition: action.c:5460
static void test_delete_services(void)
Definition: action.c:5265
static void test_publish_features(void)
Definition: action.c:3268
static void test_publish_product(void)
Definition: action.c:3031
static void test_envvar(void)
Definition: action.c:4977
static void test_remove_existing_products(void)
Definition: action.c:6497
static void test_ini_values(void)
Definition: action.c:5926
static void test_publish_assemblies(void)
Definition: action.c:6277
static void test_find_related_products(void)
Definition: action.c:5886
static void test_register_mime_info(void)
Definition: action.c:6232
static void test_install_remove_odbc(void)
Definition: action.c:5567
static void init_functionpointers(void)
Definition: action.c:2378
static void test_create_remove_folder(void)
Definition: action.c:5095
static void test_start_stop_services(void)
Definition: action.c:5148
static void test_publish(void)
Definition: action.c:3688
static void test_duplicate_files(void)
Definition: action.c:4769
static void test_register_user(void)
Definition: action.c:3456
static void test_write_registry_values(void)
Definition: action.c:4808
static void test_remove_files(void)
Definition: action.c:4488
static void test_create_remove_shortcut(void)
Definition: action.c:5703
static void test_publish_components(void)
Definition: action.c:5743
static void test_process_components(void)
Definition: action.c:3553
static void test_install_services(void)
Definition: action.c:5337
static void test_register_class_info(void)
Definition: action.c:5989
static void test_move_files(void)
Definition: action.c:4622
static void test_validate_product_id(void)
Definition: action.c:5516
static void test_publish_sourcelist(void)
Definition: action.c:4281
static void test_self_registration(void)
Definition: action.c:5416
static void test_register_extension_info(void)
Definition: action.c:6054
static void test_register_typelib(void)
Definition: action.c:5651
static void test_register_progid_info(void)
Definition: action.c:6106
BOOL get_user_dirs(void)
Definition: install.c:2404
BOOL get_system_dirs(void)
Definition: install.c:2423
@ INSTALLLOGMODE_FATALEXIT
Definition: msi.h:131
char temp_path[MAX_PATH]
Definition: mspatcha.c:123
#define subtest
Definition: test.h:157
#define memset(x, y, z)
Definition: compat.h:39
#define BEGIN_NESTED_SYSTEM_CHANGE
#define END_NESTED_SYSTEM_CHANGE

◆ test_create_remove_folder()

static void test_create_remove_folder ( void  )
static

Definition at line 5095 of file action.c.

5096{
5097 UINT r;
5098
5099 if (is_process_limited())
5100 {
5101 skip("process is limited\n");
5102 return;
5103 }
5104
5105 CreateDirectoryA("msitest", NULL);
5106 CreateDirectoryA("msitest\\first", NULL);
5107 CreateDirectoryA("msitest\\second", NULL);
5108 create_file("msitest\\first\\one.txt", 1000);
5109 create_file("msitest\\second\\two.txt", 1000);
5111
5113
5116 {
5117 skip("Not enough rights to perform tests\n");
5118 goto error;
5119 }
5120 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5121
5122 ok(pf_exists("msitest\\first\\one.txt"), "file not installed\n");
5123 ok(pf_exists("msitest\\first"), "directory not created\n");
5124 ok(pf_exists("msitest\\second\\two.txt"), "file not installed\n");
5125 ok(pf_exists("msitest\\second"), "directory not created\n");
5126 ok(pf_exists("msitest\\third"), "directory not created\n");
5127 ok(pf_exists("msitest"), "directory not created\n");
5128
5129 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5130 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5131
5132 ok(!pf_exists("msitest\\first\\one.txt"), "file not removed\n");
5133 ok(!pf_exists("msitest\\first"), "directory not removed\n");
5134 ok(!pf_exists("msitest\\second\\two.txt"), "file not removed\n");
5135 ok(!pf_exists("msitest\\second"), "directory not removed\n");
5136 ok(!pf_exists("msitest\\third"), "directory not removed\n");
5137 todo_wine ok(!pf_exists("msitest"), "directory not removed\n");
5138
5139error:
5140 DeleteFileA("msitest\\first\\one.txt");
5141 DeleteFileA("msitest\\second\\two.txt");
5142 RemoveDirectoryA("msitest\\first");
5143 RemoveDirectoryA("msitest\\second");
5144 RemoveDirectoryA("msitest");
5146}
#define skip(...)
Definition: atltest.h:64
#define ARRAY_SIZE(A)
Definition: main.h:33
UINT WINAPI MsiInstallProductA(LPCSTR szPackagePath, LPCSTR szCommandLine)
Definition: msi.c:200
INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
Definition: msi.c:2284
#define error(str)
Definition: mkdosfs.c:1605
static BOOL is_process_limited(void)
Definition: atl.c:113
static const msi_table cf_tables[]
Definition: action.c:2081
static BOOL pf_exists(const char *file)
Definition: custom.c:1406
#define todo_wine
Definition: custom.c:79
#define create_database(name, tables, num_tables)
Definition: utils.h:42
@ INSTALLUILEVEL_NONE
Definition: msi.h:66
unsigned int UINT
Definition: ndis.h:50
#define ERROR_INSTALL_PACKAGE_REJECTED
Definition: winerror.h:983

Referenced by START_TEST().

◆ test_create_remove_shortcut()

static void test_create_remove_shortcut ( void  )
static

Definition at line 5703 of file action.c.

5704{
5705 UINT r;
5706
5707 if (is_process_limited())
5708 {
5709 skip("process is limited\n");
5710 return;
5711 }
5712
5714 create_file("msitest\\target.txt", 1000);
5716
5718
5721 {
5722 skip("Not enough rights to perform tests\n");
5723 goto error;
5724 }
5725 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5726
5727 ok(pf_exists("msitest\\target.txt"), "file not created\n");
5728 ok(pf_exists("msitest\\shortcut.lnk"), "file not created\n");
5729
5730 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5731 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5732
5733 ok(!delete_pf("msitest\\shortcut.lnk", TRUE), "file not removed\n");
5734 ok(!delete_pf("msitest\\target.txt", TRUE), "file not removed\n");
5735 todo_wine ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5736
5737error:
5738 DeleteFileA("msitest\\target.txt");
5741}
static void delete_test_files(void)
Definition: action.c:2445
static void create_test_files(void)
Definition: action.c:2424
static const msi_table crs_tables[]
Definition: action.c:2209
static BOOL delete_pf(const CHAR *rel_path, BOOL is_file)
Definition: automation.c:414

Referenced by START_TEST().

◆ test_delete_services()

static void test_delete_services ( void  )
static

Definition at line 5265 of file action.c.

5266{
5267 UINT r;
5268 SC_HANDLE manager, service;
5269 DWORD error;
5270
5271 if (is_process_limited())
5272 {
5273 skip("process is limited\n");
5274 return;
5275 }
5276
5278 ok(manager != NULL, "can't open service manager %lu\n", GetLastError());
5279 if (!manager) return;
5280
5281 service = CreateServiceA(manager, "TestService3", "TestService3",
5283 SERVICE_ERROR_NORMAL, "C:\\doesnt_exist.exe", NULL, NULL, NULL, NULL, NULL);
5284 ok(service != NULL, "can't create service %lu\n", GetLastError());
5285 CloseServiceHandle(service);
5286 CloseServiceHandle(manager);
5287 if (!service) return;
5288
5291
5293
5296 {
5297 skip("Not enough rights to perform tests\n");
5298 goto error;
5299 }
5300 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5301
5303 ok(manager != NULL, "can't open service manager\n");
5304 if (!manager) goto error;
5305
5306 service = OpenServiceA(manager, "TestService3", GENERIC_ALL);
5307 error = GetLastError();
5308 ok(service == NULL, "TestService3 not deleted\n");
5309 ok(error == ERROR_SERVICE_DOES_NOT_EXIST, "wrong error %lu\n", error);
5310 CloseServiceHandle(manager);
5311
5312 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5313 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5314
5315 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
5316 ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
5317 ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
5318 ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
5319 ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
5320 ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
5321 ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
5322 ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
5323 ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
5324 ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
5325 ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
5326 ok(delete_pf("msitest\\service2.exe", TRUE), "File not installed\n");
5327 ok(delete_pf("msitest", FALSE), "Directory not created\n");
5328
5329error:
5330 delete_test_service("TestService");
5331 delete_test_service("TestService2");
5332 delete_test_service("TestService3");
5335}
static void delete_test_service(const char *name)
Definition: action.c:5246
static const msi_table sds_tables[]
Definition: action.c:2109
SC_HANDLE WINAPI CreateServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, LPCSTR lpDisplayName, DWORD dwDesiredAccess, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCSTR lpBinaryPathName, LPCSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCSTR lpDependencies, LPCSTR lpServiceStartName, LPCSTR lpPassword)
Definition: scm.c:680
#define ERROR_SERVICE_DOES_NOT_EXIST
Definition: winerror.h:611
#define SERVICE_ALL_ACCESS
Definition: winsvc.h:62
#define SERVICE_DEMAND_START
Definition: cmtypes.h:978
#define SERVICE_WIN32_OWN_PROCESS
Definition: cmtypes.h:962
#define SERVICE_ERROR_NORMAL
Definition: cmtypes.h:982

Referenced by START_TEST().

◆ test_duplicate_files()

static void test_duplicate_files ( void  )
static

Definition at line 4769 of file action.c.

4770{
4771 UINT r;
4772
4773 if (is_process_limited())
4774 {
4775 skip("process is limited\n");
4776 return;
4777 }
4778
4779 CreateDirectoryA("msitest", NULL);
4780 create_file("msitest\\maximus", 500);
4782
4784
4785 /* fails if the destination folder is not a valid property */
4786
4789 {
4790 skip("Not enough rights to perform tests\n");
4791 goto error;
4792 }
4793 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4794 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
4795 ok(delete_pf("msitest\\augustus", TRUE), "File not duplicated\n");
4796 ok(delete_pf("msitest\\this\\doesnot\\exist\\maximus", TRUE), "File not duplicated\n");
4797 ok(delete_pf("msitest\\this\\doesnot\\exist", FALSE), "Directory not created\n");
4798 ok(delete_pf("msitest\\this\\doesnot", FALSE), "Directory not created\n");
4799 ok(delete_pf("msitest\\this", FALSE), "Directory not created\n");
4800 ok(delete_pf("msitest", FALSE), "Directory not created\n");
4801
4802error:
4803 DeleteFileA("msitest\\maximus");
4804 RemoveDirectoryA("msitest");
4806}
static const msi_table df_tables[]
Definition: action.c:2054

Referenced by START_TEST().

◆ test_envvar()

static void test_envvar ( void  )
static

Definition at line 4977 of file action.c.

4978{
4979 char buffer[16];
4980 UINT r, i;
4981 HKEY env, env2;
4982 LONG res;
4983
4984 if (is_process_limited())
4985 {
4986 skip("process is limited\n");
4987 return;
4988 }
4989
4991
4992 res = RegCreateKeyExA(HKEY_CURRENT_USER, "Environment", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &env, NULL);
4993 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4994
4995 res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Session Manager\\Environment",
4996 0, NULL, 0, KEY_ALL_ACCESS, NULL, &env2, NULL);
4997 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4998
4999 res = RegSetValueExA(env, "MSITESTVAR1", 0, REG_SZ, (const BYTE *)"0", 2);
5000 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
5001
5002 res = RegSetValueExA(env, "MSITESTVAR2", 0, REG_SZ, (const BYTE *)"0", 2);
5003 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
5004
5005 res = RegSetValueExA(env, "MSITESTVAR21", 0, REG_SZ, (const BYTE *)"1", 2);
5006 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
5007
5009
5012 {
5013 skip("Not enough rights to perform tests\n");
5014 goto error;
5015 }
5016 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5017
5018 CHECK_REG_STR(env, "MSITESTVAR1", "1");
5019 CHECK_REG_STR(env, "MSITESTVAR2", "1");
5020 CHECK_REG_STR(env, "MSITESTVAR3", "1");
5021 CHECK_REG_STR(env, "MSITESTVAR4", "1");
5022
5023 res = RegDeleteValueA(env, "MSITESTVAR5");
5024 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5025
5026 res = RegDeleteValueA(env, "MSITESTVAR6");
5027 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5028
5029 res = RegDeleteValueA(env, "MSITESTVAR7");
5030 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5031
5032 res = RegDeleteValueA(env, "MSITESTVAR8");
5033 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5034
5035 res = RegDeleteValueA(env, "MSITESTVAR9");
5036 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5037
5038 res = RegDeleteValueA(env, "MSITESTVAR10");
5039 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5040
5041 CHECK_REG_STR(env, "MSITESTVAR11", "1;2");
5042 CHECK_REG_STR(env, "MSITESTVAR12", "1");
5043 CHECK_REG_STR(env, "MSITESTVAR13", "1;2");
5044 CHECK_REG_STR(env, "MSITESTVAR14", ";1;");
5045 CHECK_REG_STR(env, "MSITESTVAR15", ";;1;;");
5046 CHECK_REG_STR(env, "MSITESTVAR16", " 1 ");
5047 CHECK_REG_STR(env, "MSITESTVAR17", ";;2;;1");
5048 CHECK_REG_STR(env, "MSITESTVAR18", "1;;2;;");
5049 CHECK_REG_STR(env, "MSITESTVAR19", "1");
5050 CHECK_REG_STR(env, "MSITESTVAR20", "1");
5051 CHECK_REG_STR(env, "MSITESTVAR21", "1");
5052 CHECK_REG_STR(env, "MSITESTVAR24", "TestService");
5053 CHECK_REG_STR(env2, "MSITESTVAR100", "1");
5054
5055 res = RegSetValueExA(env, "MSITESTVAR22", 0, REG_SZ, (const BYTE *)"1", 2);
5056 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
5057
5058 res = RegSetValueExA(env, "MSITESTVAR23", 0, REG_SZ, (const BYTE *)"1", 2);
5059 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
5060
5061 res = RegDeleteValueA(env, "MSITESTVAR25");
5062 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5063
5064 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5065 ok(!r, "got %u\n", r);
5066
5067 CHECK_DEL_REG_STR(env, "MSITESTVAR13", "1;2");
5068 CHECK_DEL_REG_STR(env, "MSITESTVAR14", ";1;");
5069 CHECK_DEL_REG_STR(env, "MSITESTVAR15", ";;1;;");
5070 CHECK_DEL_REG_STR(env, "MSITESTVAR16", " 1 ");
5071 CHECK_DEL_REG_STR_TODO(env, "MSITESTVAR17", "1");
5072 CHECK_DEL_REG_STR_TODO(env, "MSITESTVAR18", "1");
5073 CHECK_DEL_REG_STR(env, "MSITESTVAR23", "1");
5074
5075 for (i = 1; i <= 23; i++)
5076 {
5077 sprintf(buffer, "MSITESTVAR%i", i);
5079 ok(res == ERROR_FILE_NOT_FOUND, "[%d] got %ld\n", i, res);
5080 }
5081
5082 res = RegDeleteValueA(env2, "MSITESTVAR100");
5083 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
5084
5085error:
5086 RegDeleteValueA(env, "MSITESTVAR1");
5087 RegDeleteValueA(env, "MSITESTVAR2");
5088 RegDeleteValueA(env, "MSITESTVAR21");
5090 RegCloseKey(env2);
5091
5093}
static LPCWSTR LPCWSTR LPCWSTR env
Definition: db.cpp:170
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4799
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
Definition: reg.c:2287
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
Definition: reg.c:1034
GLuint buffer
Definition: glext.h:5915
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define CHECK_REG_STR(prodkey, name, expected)
Definition: action.c:2563
static const msi_table env_tables[]
Definition: action.c:1987
#define CHECK_DEL_REG_STR_TODO(prodkey, name, expected)
Definition: action.c:2572
#define CHECK_DEL_REG_STR(prodkey, name, expected)
Definition: action.c:2566

Referenced by START_TEST().

◆ test_find_related_products()

static void test_find_related_products ( void  )
static

Definition at line 5886 of file action.c.

5887{
5888 UINT r;
5889
5890 if (is_process_limited())
5891 {
5892 skip("process is limited\n");
5893 return;
5894 }
5895
5897 create_file("msitest\\product.txt", 1000);
5899
5901
5904 {
5905 skip("Not enough rights to perform tests\n");
5906 goto error;
5907 }
5908 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5909
5910 /* install again, so it finds the upgrade code */
5912 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5913
5914 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5915 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5916
5917 ok(!delete_pf("msitest\\product.txt", TRUE), "file not removed\n");
5918 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5919
5920error:
5921 DeleteFileA("msitest\\product.txt");
5924}
static const msi_table frp_tables[]
Definition: action.c:2251

Referenced by START_TEST().

◆ test_ini_values()

static void test_ini_values ( void  )
static

Definition at line 5926 of file action.c.

5927{
5928 UINT r;
5929 DWORD len;
5930 char inifile[MAX_PATH], buf[0x10];
5931 HANDLE file;
5932 BOOL ret;
5933
5934 if (is_process_limited())
5935 {
5936 skip("process is limited\n");
5937 return;
5938 }
5939
5941 create_file("msitest\\inifile.txt", 1000);
5943
5944 lstrcpyA(inifile, PROG_FILES_DIR);
5945 lstrcatA(inifile, "\\msitest");
5946 ret = CreateDirectoryA(inifile, NULL);
5948 {
5949 skip("Not enough rights to perform tests\n");
5950 goto error;
5951 }
5952 lstrcatA(inifile, "\\test.ini");
5955
5956 ret = WritePrivateProfileStringA("sectionA", "keyA", "valueA", inifile);
5957 ok(ret, "failed to write profile string %lu\n", GetLastError());
5958
5960
5962 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5963
5964 len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile);
5965 ok(len == 6, "got %lu expected 6\n", len);
5966
5967 len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile);
5968 ok(!len, "got %lu expected 0\n", len);
5969
5970 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5971 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5972
5973 len = GetPrivateProfileStringA("section1", "key1", NULL, buf, sizeof(buf), inifile);
5974 ok(!len, "got %lu expected 0\n", len);
5975
5976 len = GetPrivateProfileStringA("sectionA", "keyA", NULL, buf, sizeof(buf), inifile);
5977 ok(!len, "got %lu expected 0\n", len);
5978
5979 todo_wine ok(!delete_pf("msitest\\test.ini", TRUE), "file removed\n");
5980 ok(!delete_pf("msitest\\inifile.txt", TRUE), "file not removed\n");
5981 ok(delete_pf("msitest", FALSE), "directory removed\n");
5982
5983error:
5984 DeleteFileA("msitest\\inifile.txt");
5987}
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
INT WINAPI GetPrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR def_val, LPSTR buffer, UINT len, LPCSTR filename)
Definition: profile.c:1204
BOOL WINAPI DECLSPEC_HOTPATCH WritePrivateProfileStringA(LPCSTR section, LPCSTR entry, LPCSTR string, LPCSTR filename)
Definition: profile.c:1484
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static const msi_table ini_tables[]
Definition: action.c:2265

Referenced by START_TEST().

◆ test_install_remove_odbc()

static void test_install_remove_odbc ( void  )
static

Definition at line 5567 of file action.c.

5568{
5569 int gotdriver = 0, gotdriver2 = 0;
5570 char buffer[1000], *p;
5571 WORD len;
5572 UINT r;
5573
5574 if (is_process_limited())
5575 {
5576 skip("process is limited\n");
5577 return;
5578 }
5579
5581 create_file("msitest\\ODBCdriver.dll", 1000);
5582 create_file("msitest\\ODBCdriver2.dll", 1000);
5583 create_file("msitest\\ODBCtranslator.dll", 1000);
5584 create_file("msitest\\ODBCtranslator2.dll", 1000);
5585 create_file("msitest\\ODBCsetup.dll", 1000);
5587
5589
5592 {
5593 skip("Not enough rights to perform tests\n");
5594 goto error;
5595 }
5596 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5597
5598 ok(pf_exists("msitest\\ODBCdriver.dll"), "file not created\n");
5599 ok(pf_exists("msitest\\ODBCdriver2.dll"), "file not created\n");
5600 ok(pf_exists("msitest\\ODBCtranslator.dll"), "file not created\n");
5601 ok(pf_exists("msitest\\ODBCtranslator2.dll"), "file not created\n");
5602 ok(pf_exists("msitest\\ODBCsetup.dll"), "file not created\n");
5603
5605 ok(len < sizeof(buffer), "buffer too small\n");
5606 ok(r, "SQLGetInstalledDrivers failed\n");
5607 for (p = buffer; *p; p += strlen(p) + 1)
5608 {
5609 if (!strcmp(p, "ODBC test driver"))
5610 gotdriver = 1;
5611 if (!strcmp(p, "ODBC test driver2"))
5612 gotdriver2 = 1;
5613 }
5614 ok(gotdriver, "driver not installed\n");
5615 ok(gotdriver2, "driver 2 not installed\n");
5616
5617 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5618 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5619
5620 ok(!delete_pf("msitest\\ODBCdriver.dll", TRUE), "file not removed\n");
5621 ok(!delete_pf("msitest\\ODBCdriver2.dll", TRUE), "file not removed\n");
5622 ok(!delete_pf("msitest\\ODBCtranslator.dll", TRUE), "file not removed\n");
5623 ok(!delete_pf("msitest\\ODBCtranslator2.dll", TRUE), "file not removed\n");
5624 ok(!delete_pf("msitest\\ODBCsetup.dll", TRUE), "file not removed\n");
5625 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5626
5627 gotdriver = gotdriver2 = 0;
5629 ok(len < sizeof(buffer), "buffer too small\n");
5630 ok(r, "SQLGetInstalledDrivers failed\n");
5631 for (p = buffer; *p; p += strlen(p) + 1)
5632 {
5633 if (!strcmp(p, "ODBC test driver"))
5634 gotdriver = 1;
5635 if (!strcmp(p, "ODBC test driver2"))
5636 gotdriver2 = 1;
5637 }
5638 ok(!gotdriver, "driver not installed\n");
5639 ok(!gotdriver2, "driver 2 not installed\n");
5640
5641error:
5642 DeleteFileA("msitest\\ODBCdriver.dll");
5643 DeleteFileA("msitest\\ODBCdriver2.dll");
5644 DeleteFileA("msitest\\ODBCtranslator.dll");
5645 DeleteFileA("msitest\\ODBCtranslator2.dll");
5646 DeleteFileA("msitest\\ODBCsetup.dll");
5649}
unsigned short WORD
Definition: ntddk_ex.h:93
static const msi_table odbc_tables[]
Definition: action.c:2179
BOOL WINAPI SQLGetInstalledDrivers(char *buf, WORD size, WORD *sizeout)
Definition: odbccp32.c:561

Referenced by START_TEST().

◆ test_install_services()

static void test_install_services ( void  )
static

Definition at line 5337 of file action.c.

5338{
5339 UINT r;
5340 SC_HANDLE manager, service;
5341 LONG res;
5342 HKEY hKey;
5343 DWORD err_control, err_controlsize, err_controltype;
5344
5345 if (is_process_limited())
5346 {
5347 skip("process is limited\n");
5348 return;
5349 }
5350
5353
5355
5358 {
5359 skip("Not enough rights to perform tests\n");
5360 goto error;
5361 }
5362 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5363
5365 ok(manager != NULL, "can't open service manager\n");
5366 if (!manager) goto error;
5367
5368 service = OpenServiceA(manager, "TestService", GENERIC_ALL);
5369 ok(service != NULL, "TestService not installed\n");
5370 CloseServiceHandle(service);
5371
5372 service = OpenServiceA(manager, "TestService4", GENERIC_ALL);
5373 ok(service == NULL, "TestService4 installed\n");
5374
5375 res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\TestService", &hKey);
5376 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
5377
5378 if (res == ERROR_SUCCESS)
5379 {
5380 err_control = 0xBEEF;
5381 err_controltype = REG_DWORD;
5382 err_controlsize = sizeof(err_control);
5383 res = RegQueryValueExA(hKey, "ErrorControl", NULL, &err_controltype, (LPBYTE)&err_control, &err_controlsize);
5384 ok(err_control == 0, "TestService.ErrorControl wrong, expected 0, got %lu\n", err_control);
5386 }
5387
5388 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5389 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5390
5391 service = OpenServiceA(manager, "TestService", GENERIC_ALL);
5392 ok(service != NULL, "TestService deleted\n");
5393 CloseServiceHandle(service);
5394 CloseServiceHandle(manager);
5395
5396 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
5397 ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
5398 ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
5399 ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
5400 ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
5401 ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
5402 ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
5403 ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
5404 ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
5405 ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
5406 ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
5407 ok(delete_pf("msitest\\service2.exe", TRUE), "File not installed\n");
5408 ok(delete_pf("msitest", FALSE), "Directory not created\n");
5409
5410error:
5411 delete_test_service("TestService");
5414}
FxAutoRegKey hKey
static const msi_table sis_tables[]
Definition: action.c:2124

Referenced by START_TEST().

◆ test_move_files()

static void test_move_files ( void  )
static

Definition at line 4622 of file action.c.

4623{
4624 UINT r;
4625 char props[4 * MAX_PATH + 74];
4626
4627 if (is_process_limited())
4628 {
4629 skip("process is limited\n");
4630 return;
4631 }
4632
4633 CreateDirectoryA("msitest", NULL);
4634 create_file("msitest\\augustus", 100);
4635 create_file("cameroon", 100);
4636 create_file("djibouti", 100);
4637 create_file("egypt", 100);
4638 create_file("finland", 100);
4639 create_file("gambai", 100);
4640 create_file("honduras", 100);
4641 create_file("msitest\\india", 100);
4642 create_file("japan", 100);
4643 create_file("kenya", 100);
4644 CreateDirectoryA("latvia", NULL);
4645 create_file("nauru", 100);
4646 create_file("peru", 100);
4647 create_file("apple", 100);
4648 create_file("application", 100);
4649 create_file("ape", 100);
4650 create_file("foo", 100);
4651 create_file("fao", 100);
4652 create_file("fbod", 100);
4653 create_file("budding", 100);
4654 create_file("buddy", 100);
4655 create_file("bud", 100);
4656 create_file("bar", 100);
4657 create_file("bur", 100);
4658 create_file("bird", 100);
4659
4661
4663
4664 /* if the source or dest property is not a full path,
4665 * windows tries to access it as a network resource
4666 */
4667
4668 sprintf(props, "SOURCEFULL=\"%s\\\" DESTFULL=\"%s\\msitest\" "
4669 "FILEPATHBAD=\"%s\\japan\" FILEPATHGOOD=\"%s\\kenya\"",
4671
4674 {
4675 skip("Not enough rights to perform tests\n");
4676 goto error;
4677 }
4678 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4679 ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
4680 ok(!delete_pf("msitest\\dest", TRUE), "File copied\n");
4681 ok(delete_pf("msitest\\canada", TRUE), "File not copied\n");
4682 ok(delete_pf("msitest\\dominica", TRUE), "File not moved\n");
4683 ok(!delete_pf("msitest\\elsalvador", TRUE), "File moved\n");
4684 ok(!delete_pf("msitest\\france", TRUE), "File moved\n");
4685 ok(!delete_pf("msitest\\georgia", TRUE), "File moved\n");
4686 ok(delete_pf("msitest\\hungary", TRUE), "File not moved\n");
4687 ok(!delete_pf("msitest\\indonesia", TRUE), "File moved\n");
4688 ok(!delete_pf("msitest\\jordan", TRUE), "File moved\n");
4689 ok(delete_pf("msitest\\kiribati", TRUE), "File not moved\n");
4690 ok(!delete_pf("msitest\\lebanon", TRUE), "File moved\n");
4691 ok(!delete_pf("msitest\\lebanon", FALSE), "Directory moved\n");
4692 ok(delete_pf("msitest\\poland", TRUE), "File not moved\n");
4693 /* either apple or application will be moved depending on directory order */
4694 if (!delete_pf("msitest\\apple", TRUE))
4695 ok(delete_pf("msitest\\application", TRUE), "File not moved\n");
4696 else
4697 ok(!delete_pf("msitest\\application", TRUE), "File should not exist\n");
4698 ok(delete_pf("msitest\\wildcard", TRUE), "File not moved\n");
4699 ok(!delete_pf("msitest\\ape", TRUE), "File moved\n");
4700 /* either fao or foo will be moved depending on directory order */
4701 if (delete_pf("msitest\\foo", TRUE))
4702 ok(!delete_pf("msitest\\fao", TRUE), "File should not exist\n");
4703 else
4704 ok(delete_pf("msitest\\fao", TRUE), "File not moved\n");
4705 ok(delete_pf("msitest\\single", TRUE), "File not moved\n");
4706 ok(!delete_pf("msitest\\fbod", TRUE), "File moved\n");
4707 ok(delete_pf("msitest\\budding", TRUE), "File not moved\n");
4708 ok(delete_pf("msitest\\buddy", TRUE), "File not moved\n");
4709 ok(!delete_pf("msitest\\bud", TRUE), "File moved\n");
4710 ok(delete_pf("msitest\\bar", TRUE), "File not moved\n");
4711 ok(delete_pf("msitest\\bur", TRUE), "File not moved\n");
4712 ok(!delete_pf("msitest\\bird", TRUE), "File moved\n");
4713 ok(delete_pf("msitest", FALSE), "Directory not created\n");
4714 ok(DeleteFileA("cameroon"), "File moved\n");
4715 ok(!DeleteFileA("djibouti"), "File not moved\n");
4716 ok(DeleteFileA("egypt"), "File moved\n");
4717 ok(DeleteFileA("finland"), "File moved\n");
4718 ok(DeleteFileA("gambai"), "File moved\n");
4719 ok(!DeleteFileA("honduras"), "File not moved\n");
4720 ok(DeleteFileA("msitest\\india"), "File moved\n");
4721 ok(DeleteFileA("japan"), "File moved\n");
4722 ok(!DeleteFileA("kenya"), "File not moved\n");
4723 ok(RemoveDirectoryA("latvia"), "Directory moved\n");
4724 ok(!DeleteFileA("nauru"), "File not moved\n");
4725 ok(!DeleteFileA("peru"), "File not moved\n");
4726 ok(!DeleteFileA("apple"), "File not moved\n");
4727 ok(!DeleteFileA("application"), "File not moved\n");
4728 ok(DeleteFileA("ape"), "File moved\n");
4729 ok(!DeleteFileA("foo"), "File not moved\n");
4730 ok(!DeleteFileA("fao"), "File not moved\n");
4731 ok(DeleteFileA("fbod"), "File moved\n");
4732 ok(!DeleteFileA("budding"), "File not moved\n");
4733 ok(!DeleteFileA("buddy"), "File not moved\n");
4734 ok(DeleteFileA("bud"), "File moved\n");
4735 ok(!DeleteFileA("bar"), "File not moved\n");
4736 ok(!DeleteFileA("bur"), "File not moved\n");
4737 ok(DeleteFileA("bird"), "File moved\n");
4738
4739error:
4740 DeleteFileA("cameroon");
4741 DeleteFileA("djibouti");
4742 DeleteFileA("egypt");
4743 DeleteFileA("finland");
4744 DeleteFileA("gambai");
4745 DeleteFileA("honduras");
4746 DeleteFileA("japan");
4747 DeleteFileA("kenya");
4748 DeleteFileA("nauru");
4749 DeleteFileA("peru");
4750 DeleteFileA("apple");
4751 DeleteFileA("application");
4752 DeleteFileA("ape");
4753 DeleteFileA("foo");
4754 DeleteFileA("fao");
4755 DeleteFileA("fbod");
4756 DeleteFileA("budding");
4757 DeleteFileA("buddy");
4758 DeleteFileA("bud");
4759 DeleteFileA("bar");
4760 DeleteFileA("bur");
4761 DeleteFileA("bird");
4762 DeleteFileA("msitest\\india");
4763 DeleteFileA("msitest\\augustus");
4764 RemoveDirectoryA("latvia");
4765 RemoveDirectoryA("msitest");
4767}
static const msi_table mov_tables[]
Definition: action.c:2040
static const WCHAR props[]
Definition: wbemdisp.c:288

Referenced by START_TEST().

◆ test_process_components()

static void test_process_components ( void  )
static

Definition at line 3553 of file action.c.

3554{
3555 static const char keyfmt[] =
3556 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Components\\%s";
3557 static const char compkey[] =
3558 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Components";
3559 UINT r;
3560 LONG res;
3561 DWORD size;
3562 HKEY comp, hkey;
3563 LPSTR usersid;
3564 CHAR val[MAX_PATH];
3565 CHAR keypath[MAX_PATH];
3566 CHAR program_files_maximus[MAX_PATH];
3568
3569 if (is_process_limited())
3570 {
3571 skip("process is limited\n");
3572 return;
3573 }
3574
3575 if (!(usersid = get_user_sid()))
3576 return;
3577
3578 CreateDirectoryA("msitest", NULL);
3579 create_file("msitest\\maximus", 500);
3580
3582
3583 if (is_wow64)
3585
3587
3588 /* ProcessComponents, per-user */
3589 r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1");
3591 {
3592 skip("Not enough rights to perform tests\n");
3593 goto error;
3594 }
3595 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3596 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3597 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3598
3599 sprintf(keypath, keyfmt, usersid, "CBABC2FDCCB35E749A8944D8C1C098B5");
3600 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3601 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3602
3603 size = MAX_PATH;
3604 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3605 NULL, NULL, (LPBYTE)val, &size);
3606 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3607
3608 lstrcpyA(program_files_maximus,PROG_FILES_DIR);
3609 lstrcatA(program_files_maximus,"\\msitest\\maximus");
3610
3611 ok(!lstrcmpiA(val, program_files_maximus),
3612 "Expected \"%s\", got \"%s\"\n", program_files_maximus, val);
3613
3614 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3615 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3616
3617 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3618 delete_key(comp, "", access);
3619 RegCloseKey(comp);
3620
3621 sprintf(keypath, keyfmt, usersid, "241C3DA58FECD0945B9687D408766058");
3622 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3623 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3624
3625 size = MAX_PATH;
3626 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3627 NULL, NULL, (LPBYTE)val, &size);
3628 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3629 ok(!lstrcmpA(val, "01\\msitest\\augustus"),
3630 "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val);
3631
3632 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3633 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3634
3635 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3636 delete_key(comp, "", access);
3637 RegCloseKey(comp);
3638
3639 /* ProcessComponents, machine */
3640 r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1 ALLUSERS=1");
3641 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3642 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3643 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3644
3645 sprintf(keypath, keyfmt, "S-1-5-18", "CBABC2FDCCB35E749A8944D8C1C098B5");
3646 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3647 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3648
3649 size = MAX_PATH;
3650 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3651 NULL, NULL, (LPBYTE)val, &size);
3652 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3653 ok(!lstrcmpiA(val, program_files_maximus),
3654 "Expected \"%s\", got \"%s\"\n", program_files_maximus, val);
3655
3656 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3657 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3658
3659 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3660 delete_key(comp, "", access);
3661 RegCloseKey(comp);
3662
3663 sprintf(keypath, keyfmt, "S-1-5-18", "241C3DA58FECD0945B9687D408766058");
3664 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &comp);
3665 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3666
3667 size = MAX_PATH;
3668 res = RegQueryValueExA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB",
3669 NULL, NULL, (LPBYTE)val, &size);
3670 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3671 ok(!lstrcmpA(val, "01\\msitest\\augustus"),
3672 "Expected \"01\\msitest\\augustus\", got \"%s\"\n", val);
3673
3674 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, compkey, 0, access, &hkey);
3675 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3676
3677 RegDeleteValueA(comp, "84A88FD7F6998CE40A22FB59F6B9C2BB");
3678 delete_key(comp, "", access);
3679 RegCloseKey(comp);
3680
3681error:
3683 DeleteFileA("msitest\\maximus");
3684 RemoveDirectoryA("msitest");
3685 LocalFree(usersid);
3686}
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:42
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
static char * get_user_sid(void)
Definition: action.c:2405
static const msi_table ppc_tables[]
Definition: action.c:2014
#define delete_key(r, p, s)
Definition: reg_test.h:64

Referenced by START_TEST().

◆ test_publish()

static void test_publish ( void  )
static

Definition at line 3688 of file action.c.

3689{
3690 static const char subkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
3691 static const char subkey_32node[] = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
3692 UINT r;
3693 LONG res;
3694 HKEY uninstall, prodkey, uninstall_32node = NULL;
3696 char date[MAX_PATH], temp[MAX_PATH], prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
3698 DWORD error;
3699
3700 if (!pMsiQueryFeatureStateExA)
3701 {
3702 win_skip("MsiQueryFeatureStateExA is not available\n");
3703 return;
3704 }
3705 if (is_process_limited())
3706 {
3707 skip("process is limited\n");
3708 return;
3709 }
3710
3713
3714 if (is_wow64)
3716
3717 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey, 0, KEY_ALL_ACCESS, &uninstall);
3718 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3719
3720 if (is_64bit)
3721 {
3722 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, subkey_32node, 0, KEY_ALL_ACCESS, &uninstall_32node);
3723 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3724 }
3725
3726 CreateDirectoryA("msitest", NULL);
3727 create_file("msitest\\maximus", 500);
3728
3730
3732
3733 state = MsiQueryProductStateA(prodcode);
3734 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3735
3736 state = MsiQueryFeatureStateA(prodcode, "feature");
3737 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3738
3739 state = 0xdead;
3740 SetLastError(0xdeadbeef);
3741 r = pMsiQueryFeatureStateExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, "feature", &state);
3742 error = GetLastError();
3743 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3744 ok(state == 0xdead, "got %d\n", state);
3745 ok(error == 0xdeadbeef, "got %lu\n", error);
3746
3747 state = 0xdead;
3748 SetLastError(0xdeadbeef);
3749 r = pMsiQueryFeatureStateExA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, "feature", &state);
3750 error = GetLastError();
3751 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3752 ok(state == 0xdead, "got %d\n", state);
3753 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3754
3755 state = 0xdead;
3756 SetLastError(0xdeadbeef);
3757 r = pMsiQueryFeatureStateExA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "feature", &state);
3758 error = GetLastError();
3759 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3760 ok(state == 0xdead, "got %d\n", state);
3761 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3762
3763 state = MsiQueryFeatureStateA(prodcode, "feature");
3764 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3765
3766 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3767 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3768
3769 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
3770 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3771 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3772 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3773
3774 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3775 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3776
3777 /* nothing published */
3780 {
3781 skip("Not enough rights to perform tests\n");
3782 goto error;
3783 }
3784 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
3785 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3786 ok(pf_exists("msitest"), "File not installed\n");
3787
3788 state = MsiQueryProductStateA(prodcode);
3789 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3790
3791 state = MsiQueryFeatureStateA(prodcode, "feature");
3792 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3793
3794 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3795 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3796
3797 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
3798 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3799 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3800 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3801
3802 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3803 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3804
3805 /* PublishProduct and RegisterProduct */
3806 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 PUBLISH_PRODUCT=1");
3807 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3808 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3809 ok(pf_exists("msitest"), "File not installed\n");
3810
3811 state = MsiQueryProductStateA(prodcode);
3812 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
3813
3814 state = MsiQueryFeatureStateA(prodcode, "feature");
3815 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3816
3817 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3818 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3819
3820 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
3821 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3822 ok(r == ERROR_UNKNOWN_COMPONENT, "Expected ERROR_UNKNOWN_COMPONENT, got %d\n", r);
3823 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3824
3825 if (is_64bit)
3826 {
3827 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3828 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3829 }
3830 else
3831 {
3832 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3833 if (is_wow64 && res == ERROR_FILE_NOT_FOUND) /* XP - Vista, Wow64 */
3834 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3835 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3836 }
3837
3838 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
3839 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
3840 CHECK_REG_STR(prodkey, "InstallDate", date);
3841 CHECK_REG_STR(prodkey, "InstallSource", temp);
3842 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3843 CHECK_REG_STR(prodkey, "Publisher", "Wine");
3844 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3845 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
3846 CHECK_REG_STR(prodkey, "Comments", "");
3847 CHECK_REG_STR(prodkey, "Contact", "");
3848 CHECK_REG_STR(prodkey, "HelpLink", "");
3849 CHECK_REG_STR(prodkey, "HelpTelephone", "");
3850 CHECK_REG_STR(prodkey, "InstallLocation", "");
3851 CHECK_REG_DWORD(prodkey, "NoModify", 1);
3852 CHECK_REG_STR(prodkey, "Readme", "");
3853 CHECK_REG_STR(prodkey, "Size", "");
3854 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
3855 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
3856 CHECK_REG_DWORD(prodkey, "Language", 1033);
3857 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
3858 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
3859 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
3860 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
3861 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
3862
3863 RegCloseKey(prodkey);
3864
3865 r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
3866 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3867 ok(pf_exists("msitest\\maximus"), "File deleted\n");
3868 ok(pf_exists("msitest"), "File deleted\n");
3869
3870 state = MsiQueryProductStateA(prodcode);
3871 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3872
3873 state = MsiQueryFeatureStateA(prodcode, "feature");
3874 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3875
3876 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3877 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3878
3879 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
3880 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3881 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3882 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3883
3884 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3885 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3886
3887 /* complete install */
3888 r = MsiInstallProductA(msifile, "FULL=1");
3889 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3890 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3891 ok(pf_exists("msitest"), "File not installed\n");
3892
3893 state = MsiQueryProductStateA(prodcode);
3894 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
3895
3896 state = MsiQueryFeatureStateA(prodcode, "feature");
3897 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3898
3899 state = 0xdead;
3900 SetLastError(0xdeadbeef);
3901 r = pMsiQueryFeatureStateExA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, "feature", &state);
3902 error = GetLastError();
3903 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3904 ok(state == 0xdead, "got %d\n", state);
3905 ok(error == 0xdeadbeef, "got %lu\n", error);
3906
3907 state = 0xdead;
3908 SetLastError(0xdeadbeef);
3909 r = pMsiQueryFeatureStateExA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, "feature", &state);
3910 error = GetLastError();
3911 ok(r == ERROR_UNKNOWN_PRODUCT, "got %u\n", r);
3912 ok(state == 0xdead, "got %d\n", state);
3913 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3914
3915 state = 0xdead;
3916 SetLastError(0xdeadbeef);
3917 r = pMsiQueryFeatureStateExA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, "feature", &state);
3918 error = GetLastError();
3919 ok(r == ERROR_SUCCESS, "got %u\n", r);
3920 ok(state == INSTALLSTATE_LOCAL, "got %d\n", state);
3921 ok(error == ERROR_SUCCESS, "got %lu\n", error);
3922
3923 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3924 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3925
3926 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
3927 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3928 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3929 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
3930
3931 if (is_64bit)
3932 {
3933 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3934 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3935 }
3936 else
3937 {
3938 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
3939 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3940 }
3941
3942 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
3943 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
3944 CHECK_REG_STR(prodkey, "InstallDate", date);
3945 CHECK_REG_STR(prodkey, "InstallSource", temp);
3946 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3947 CHECK_REG_STR(prodkey, "Publisher", "Wine");
3948 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
3949 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
3950 CHECK_REG_STR(prodkey, "Comments", "");
3951 CHECK_REG_STR(prodkey, "Contact", "");
3952 CHECK_REG_STR(prodkey, "HelpLink", "");
3953 CHECK_REG_STR(prodkey, "HelpTelephone", "");
3954 CHECK_REG_STR(prodkey, "InstallLocation", "");
3955 CHECK_REG_DWORD(prodkey, "NoModify", 1);
3956 CHECK_REG_STR(prodkey, "Readme", "");
3957 CHECK_REG_STR(prodkey, "Size", "");
3958 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
3959 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
3960 CHECK_REG_DWORD(prodkey, "Language", 1033);
3961 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
3962 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
3963 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
3964 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
3965 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
3966
3967 RegCloseKey(prodkey);
3968
3969 /* no UnpublishFeatures */
3970 r = MsiInstallProductA(msifile, "REMOVE=ALL");
3971 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3972 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
3973 ok(!pf_exists("msitest"), "Directory not deleted\n");
3974
3975 state = MsiQueryProductStateA(prodcode);
3976 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3977
3978 state = MsiQueryFeatureStateA(prodcode, "feature");
3979 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3980
3981 state = MsiQueryFeatureStateA(prodcode, "montecristo");
3982 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3983
3984 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
3985 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
3986 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
3987 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
3988
3989 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
3990 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3991
3992 /* complete install */
3993 r = MsiInstallProductA(msifile, "FULL=1");
3994 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3995 ok(pf_exists("msitest\\maximus"), "File not installed\n");
3996 ok(pf_exists("msitest"), "File not installed\n");
3997
3998 state = MsiQueryProductStateA(prodcode);
3999 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
4000
4001 state = MsiQueryFeatureStateA(prodcode, "feature");
4002 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4003
4004 state = MsiQueryFeatureStateA(prodcode, "montecristo");
4005 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4006
4007 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4008 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
4009 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4010 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4011
4012 if (is_64bit)
4013 {
4014 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4015 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4016 }
4017 else
4018 {
4019 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4020 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4021 }
4022
4023 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
4024 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
4025 CHECK_REG_STR(prodkey, "InstallDate", date);
4026 CHECK_REG_STR(prodkey, "InstallSource", temp);
4027 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4028 CHECK_REG_STR(prodkey, "Publisher", "Wine");
4029 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4030 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
4031 CHECK_REG_STR(prodkey, "Comments", "");
4032 CHECK_REG_STR(prodkey, "Contact", "");
4033 CHECK_REG_STR(prodkey, "HelpLink", "");
4034 CHECK_REG_STR(prodkey, "HelpTelephone", "");
4035 CHECK_REG_STR(prodkey, "InstallLocation", "");
4036 CHECK_REG_DWORD(prodkey, "NoModify", 1);
4037 CHECK_REG_STR(prodkey, "Readme", "");
4038 CHECK_REG_STR(prodkey, "Size", "");
4039 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
4040 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
4041 CHECK_REG_DWORD(prodkey, "Language", 1033);
4042 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
4043 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
4044 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
4045 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
4046 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
4047
4048 RegCloseKey(prodkey);
4049
4050 /* UnpublishFeatures, only feature removed. Only works when entire product is removed */
4051 r = MsiInstallProductA(msifile, "UNPUBLISH_FEATURES=1 REMOVE=feature");
4052 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4053 ok(pf_exists("msitest\\maximus"), "File deleted\n");
4054 ok(pf_exists("msitest"), "Directory deleted\n");
4055
4056 state = MsiQueryProductStateA(prodcode);
4057 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
4058
4059 state = MsiQueryFeatureStateA(prodcode, "feature");
4060 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4061
4062 state = MsiQueryFeatureStateA(prodcode, "montecristo");
4063 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4064
4065 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4066 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
4067 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4068 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4069
4070 if (is_64bit)
4071 {
4072 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4073 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4074 }
4075 else
4076 {
4077 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4078 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4079 }
4080
4081 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
4082 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
4083 CHECK_REG_STR(prodkey, "InstallDate", date);
4084 CHECK_REG_STR(prodkey, "InstallSource", temp);
4085 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4086 CHECK_REG_STR(prodkey, "Publisher", "Wine");
4087 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4088 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
4089 CHECK_REG_STR(prodkey, "Comments", "");
4090 CHECK_REG_STR(prodkey, "Contact", "");
4091 CHECK_REG_STR(prodkey, "HelpLink", "");
4092 CHECK_REG_STR(prodkey, "HelpTelephone", "");
4093 CHECK_REG_STR(prodkey, "InstallLocation", "");
4094 CHECK_REG_DWORD(prodkey, "NoModify", 1);
4095 CHECK_REG_STR(prodkey, "Readme", "");
4096 CHECK_REG_STR(prodkey, "Size", "");
4097 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
4098 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
4099 CHECK_REG_DWORD(prodkey, "Language", 1033);
4100 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
4101 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
4102 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
4103 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
4104 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
4105
4106 RegCloseKey(prodkey);
4107
4108 /* complete install */
4109 r = MsiInstallProductA(msifile, "FULL=1");
4110 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4111 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4112 ok(pf_exists("msitest"), "File not installed\n");
4113
4114 state = MsiQueryProductStateA(prodcode);
4115 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
4116
4117 state = MsiQueryFeatureStateA(prodcode, "feature");
4118 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4119
4120 state = MsiQueryFeatureStateA(prodcode, "montecristo");
4121 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4122
4123 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4124 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
4125 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4126 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4127
4128 if (is_64bit)
4129 {
4130 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4131 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4132 }
4133 else
4134 {
4135 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4136 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4137 }
4138
4139 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
4140 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
4141 CHECK_REG_STR(prodkey, "InstallDate", date);
4142 CHECK_REG_STR(prodkey, "InstallSource", temp);
4143 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4144 CHECK_REG_STR(prodkey, "Publisher", "Wine");
4145 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4146 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
4147 CHECK_REG_STR(prodkey, "Comments", "");
4148 CHECK_REG_STR(prodkey, "Contact", "");
4149 CHECK_REG_STR(prodkey, "HelpLink", "");
4150 CHECK_REG_STR(prodkey, "HelpTelephone", "");
4151 CHECK_REG_STR(prodkey, "InstallLocation", "");
4152 CHECK_REG_DWORD(prodkey, "NoModify", 1);
4153 CHECK_REG_STR(prodkey, "Readme", "");
4154 CHECK_REG_STR(prodkey, "Size", "");
4155 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
4156 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
4157 CHECK_REG_DWORD(prodkey, "Language", 1033);
4158 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
4159 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
4160 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
4161 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
4162 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
4163
4164 RegCloseKey(prodkey);
4165
4166 /* UnpublishFeatures, both features removed */
4167 r = MsiInstallProductA(msifile, "UNPUBLISH_FEATURES=1 REMOVE=feature,montecristo");
4168 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4169 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
4170 ok(!pf_exists("msitest"), "Directory not deleted\n");
4171
4172 state = MsiQueryProductStateA(prodcode);
4173 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4174
4175 state = MsiQueryFeatureStateA(prodcode, "feature");
4176 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4177
4178 state = MsiQueryFeatureStateA(prodcode, "montecristo");
4179 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4180
4181 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4182 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
4183 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4184 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4185
4186 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
4187 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
4188
4189 /* complete install */
4190 r = MsiInstallProductA(msifile, "FULL=1");
4191 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4192 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4193 ok(pf_exists("msitest"), "File not installed\n");
4194
4195 state = MsiQueryProductStateA(prodcode);
4196 ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state);
4197
4198 state = MsiQueryFeatureStateA(prodcode, "feature");
4199 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4200
4201 state = MsiQueryFeatureStateA(prodcode, "montecristo");
4202 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4203
4204 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4205 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
4206 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4207 ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
4208
4209 if (is_64bit)
4210 {
4211 res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4212 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4213 }
4214 else
4215 {
4216 res = RegOpenKeyExA(uninstall, prodcode, 0, KEY_ALL_ACCESS, &prodkey);
4217 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4218 }
4219
4220 CHECK_REG_STR(prodkey, "DisplayName", "MSITEST");
4221 CHECK_REG_STR(prodkey, "DisplayVersion", "1.1.1");
4222 CHECK_REG_STR(prodkey, "InstallDate", date);
4223 CHECK_REG_STR(prodkey, "InstallSource", temp);
4224 CHECK_REG_ISTR(prodkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4225 CHECK_REG_STR(prodkey, "Publisher", "Wine");
4226 CHECK_REG_STR(prodkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
4227 CHECK_REG_STR(prodkey, "AuthorizedCDFPrefix", "");
4228 CHECK_REG_STR(prodkey, "Comments", "");
4229 CHECK_REG_STR(prodkey, "Contact", "");
4230 CHECK_REG_STR(prodkey, "HelpLink", "");
4231 CHECK_REG_STR(prodkey, "HelpTelephone", "");
4232 CHECK_REG_STR(prodkey, "InstallLocation", "");
4233 CHECK_REG_DWORD(prodkey, "NoModify", 1);
4234 CHECK_REG_STR(prodkey, "Readme", "");
4235 CHECK_REG_STR(prodkey, "Size", "");
4236 CHECK_REG_STR(prodkey, "URLInfoAbout", "");
4237 CHECK_REG_STR(prodkey, "URLUpdateInfo", "");
4238 CHECK_REG_DWORD(prodkey, "Language", 1033);
4239 CHECK_REG_DWORD(prodkey, "Version", 0x1010001);
4240 CHECK_REG_DWORD(prodkey, "VersionMajor", 1);
4241 CHECK_REG_DWORD(prodkey, "VersionMinor", 1);
4242 CHECK_REG_DWORD(prodkey, "WindowsInstaller", 1);
4243 CHECK_REG_DWORD_TODO(prodkey, "EstimatedSize", get_estimated_size());
4244
4245 RegCloseKey(prodkey);
4246
4247 /* complete uninstall */
4248 r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
4249 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4250 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
4251 ok(!pf_exists("msitest"), "Directory not deleted\n");
4252
4253 state = MsiQueryProductStateA(prodcode);
4254 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4255
4256 state = MsiQueryFeatureStateA(prodcode, "feature");
4257 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4258
4259 state = MsiQueryFeatureStateA(prodcode, "montecristo");
4260 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4261
4262 r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4263 "{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}", &state);
4264 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4265 ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
4266
4267 res = RegOpenKeyExA(uninstall, prodcode, 0, access, &prodkey);
4268 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
4269
4270 /* make sure 'Program Files\msitest' is removed */
4272
4273error:
4274 RegCloseKey(uninstall);
4275 RegCloseKey(uninstall_32node);
4277 DeleteFileA("msitest\\maximus");
4278 RemoveDirectoryA("msitest");
4279}
static int state
Definition: maze.c:121
#define SetLastError(x)
Definition: compat.h:752
INSTALLSTATE WINAPI MsiQueryProductStateA(LPCSTR szProduct)
Definition: msi.c:2210
INSTALLSTATE WINAPI MsiQueryFeatureStateA(LPCSTR szProduct, LPCSTR szFeature)
Definition: msi.c:3029
#define CHECK_REG_DWORD_TODO(prodkey, name, expected)
Definition: action.c:2599
#define CHECK_REG_ISTR(prodkey, name, expected)
Definition: action.c:2578
#define CHECK_REG_DWORD(prodkey, name, expected)
Definition: action.c:2596
static const msi_table pp_tables[]
Definition: action.c:2001
static DWORD get_estimated_size(void)
Definition: action.c:2624
static void delete_pfmsitest_files(void)
Definition: action.c:2488
static void get_date_str(LPSTR date)
Definition: action.c:2614
@ INSTALLSTATE_UNKNOWN
Definition: msi.h:42
@ INSTALLSTATE_LOCAL
Definition: msi.h:46
@ INSTALLSTATE_DEFAULT
Definition: msi.h:48
@ MSIINSTALLCONTEXT_MACHINE
Definition: msi.h:200
@ MSIINSTALLCONTEXT_USERUNMANAGED
Definition: msi.h:199
@ MSIINSTALLCONTEXT_USERMANAGED
Definition: msi.h:198
static const BOOL is_64bit
Definition: msipriv.h:44
static calc_node_t temp
Definition: rpn_ieee.c:38
#define win_skip
Definition: test.h:160
int INSTALLSTATE
Definition: winemsi.idl:31
#define ERROR_UNKNOWN_PRODUCT
Definition: winerror.h:963
#define ERROR_UNKNOWN_COMPONENT
Definition: winerror.h:965

Referenced by START_TEST().

◆ test_publish_assemblies()

static void test_publish_assemblies ( void  )
static

Definition at line 6277 of file action.c.

6278{
6279 static const char manifest[] =
6280 "<assemblyIdentity type=\"win32\" name=\"Wine.Win32.Assembly\" "
6281 "version=\"1.0.0.0\" publicKeyToken=\"abcdef0123456789\" "
6282 "processorArchitecture=\"x86\"/>";
6283 static const char manifest_local[] =
6284 "<assemblyIdentity type=\"win32\" name=\"Wine.Win32.Local.Assembly\" "
6285 "version=\"1.0.0.0\" publicKeyToken=\"abcdef0123456789\" "
6286 "processorArchitecture=\"x86\"/>";
6287 static const char classes_path_dotnet[] =
6288 "Installer\\Assemblies\\Global";
6289 static const char classes_path_dotnet_local[] =
6290 "Installer\\Assemblies\\C:|Program Files|msitest|application_dotnet.txt";
6291 static const char classes_path_dotnet_local_wow64[] =
6292 "Installer\\Assemblies\\C:|Program Files (x86)|msitest|application_dotnet.txt";
6293 static const char classes_path_fake_local[] =
6294 "Installer\\Assemblies\\C:|Program Files|msitest|nonexistent.txt";
6295 static const char classes_path_fake_local_wow64[] =
6296 "Installer\\Assemblies\\C:|Program Files (x86)|msitest|nonexistent.txt";
6297 static const char classes_path_win32[] =
6298 "Installer\\Win32Assemblies\\Global";
6299 static const char classes_path_win32_local[] =
6300 "Installer\\Win32Assemblies\\C:|Program Files|msitest|application_win32.txt";
6301 static const char classes_path_win32_local_wow64[] =
6302 "Installer\\Win32Assemblies\\C:|Program Files (x86)|msitest|application_win32.txt";
6303 static const char path_dotnet[] =
6304 "Software\\Microsoft\\Installer\\Assemblies\\Global";
6305 static const char path_dotnet_local[] =
6306 "Software\\Microsoft\\Installer\\Assemblies\\C:|Program Files|msitest|application_dotnet.txt";
6307 static const char path_dotnet_local_wow64[] =
6308 "Software\\Microsoft\\Installer\\Assemblies\\C:|Program Files (x86)|msitest|application_dotnet.txt";
6309 static const char path_fake_local[] =
6310 "Software\\Microsoft\\Installer\\Assemblies\\C:|Program Files|msitest|nonexistent.txt";
6311 static const char path_fake_local_wow64[] =
6312 "Software\\Microsoft\\Installer\\Assemblies\\C:|Program Files (x86)|msitest|nonexistent.txt";
6313 static const char path_win32[] =
6314 "Software\\Microsoft\\Installer\\Win32Assemblies\\Global";
6315 static const char path_win32_local[] =
6316 "Software\\Microsoft\\Installer\\Win32Assemblies\\C:|Program Files|msitest|application_win32.txt";
6317 static const char path_win32_local_wow64[] =
6318 "Software\\Microsoft\\Installer\\Win32Assemblies\\C:|Program Files (x86)|msitest|application_win32.txt";
6319 static const char name_dotnet[] =
6320 "Wine.Dotnet.Assembly,processorArchitecture=\"MSIL\",publicKeyToken=\"abcdef0123456789\","
6321 "version=\"1.0.0.0\",culture=\"neutral\"";
6322 static const char name_dotnet_local[] =
6323 "Wine.Dotnet.Local.Assembly,processorArchitecture=\"MSIL\",publicKeyToken=\"abcdef0123456789\","
6324 "version=\"1.0.0.0\",culture=\"neutral\"";
6325 static const char name_win32[] =
6326 "Wine.Win32.Assembly,processorArchitecture=\"x86\",publicKeyToken=\"abcdef0123456789\","
6327 "type=\"win32\",version=\"1.0.0.0\"";
6328 static const char name_win32_local[] =
6329 "Wine.Win32.Local.Assembly,processorArchitecture=\"x86\",publicKeyToken=\"abcdef0123456789\","
6330 "type=\"win32\",version=\"1.0.0.0\"";
6331 UINT r;
6332 LONG res;
6333 HKEY hkey;
6334 const char *path;
6335 int access;
6336
6337 if (is_process_limited())
6338 {
6339 skip("process is limited\n");
6340 return;
6341 }
6342
6344 create_file("msitest\\win32.txt", 1000);
6345 create_file("msitest\\win32_local.txt", 1000);
6346 create_file("msitest\\dotnet.txt", 1000);
6347 create_file("msitest\\dotnet_local.txt", 1000);
6348 create_file_data("msitest\\manifest.txt", manifest, 0);
6349 create_file_data("msitest\\manifest_local.txt", manifest_local, 0);
6350 create_file("msitest\\application_win32.txt", 1000);
6351 create_file("msitest\\application_dotnet.txt", 1000);
6352 create_file("msitest\\fake_local.txt", 1000);
6354
6356
6359 {
6360 skip("Not enough rights to perform tests\n");
6361 goto done;
6362 }
6363 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6364
6366 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6367 CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0");
6368 RegCloseKey(hkey);
6369
6370 path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local;
6372 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6373 CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox\0");
6374 RegCloseKey(hkey);
6375
6376 res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey);
6377 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6378 CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0");
6379 RegCloseKey(hkey);
6380
6381 path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local;
6383 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6384 CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0");
6385 RegCloseKey(hkey);
6386
6387 /* No registration is done for a local assembly with no matching file */
6388 path = (is_wow64 || is_64bit) ? path_fake_local_wow64 : path_fake_local;
6390 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
6391
6392 r = MsiInstallProductA(msifile, "REMOVE=ALL");
6393 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6394
6396 if (res == ERROR_SUCCESS)
6397 {
6399 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6400 RegCloseKey(hkey);
6401 }
6402
6403 path = (is_wow64 || is_64bit) ? path_dotnet_local_wow64 : path_dotnet_local;
6405 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6406
6407 res = RegOpenKeyA(HKEY_CURRENT_USER, path_win32, &hkey);
6408 if (res == ERROR_SUCCESS)
6409 {
6410 res = RegDeleteValueA(hkey, name_win32);
6411 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6412 RegCloseKey(hkey);
6413 }
6414
6415 path = (is_wow64 || is_64bit) ? path_win32_local_wow64 : path_win32_local;
6417 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6418
6419 r = MsiInstallProductA(msifile, "ALLUSERS=1");
6420 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6421
6423 res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey);
6424 if (res == ERROR_FILE_NOT_FOUND && is_wow64) /* Vista WOW64 */
6425 {
6426 trace("Using 64-bit registry view for HKCR\\Installer\n");
6428 res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey);
6429 }
6430 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6431 CHECK_REG_MULTI(hkey, name_dotnet, "rcHQPHq?CA@Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]\0");
6432 RegCloseKey(hkey);
6433
6434 path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local;
6436 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6437 CHECK_REG_MULTI(hkey, name_dotnet_local, "rcHQPHq?CA@Uv-XqMI1e>LF,8A?0d.AW@vcZ$Cgox\0");
6438 RegCloseKey(hkey);
6439
6440 res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_win32, 0, access, &hkey);
6441 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6442 CHECK_REG_MULTI(hkey, name_win32, "rcHQPHq?CA@Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%\0");
6443 RegCloseKey(hkey);
6444
6445 path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local;
6447 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
6448 CHECK_REG_MULTI(hkey, name_win32_local, "rcHQPHq?CA@Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!\0");
6449 RegCloseKey(hkey);
6450
6451 /* No registration is done for a local assembly with no matching file */
6452 path = (is_wow64 || is_64bit) ? classes_path_fake_local_wow64 : classes_path_fake_local;
6454 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
6455
6456 r = MsiInstallProductA(msifile, "REMOVE=ALL ALLUSERS=1");
6457 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6458
6459 res = RegOpenKeyA(HKEY_CLASSES_ROOT, classes_path_dotnet, &hkey);
6460 if (res == ERROR_SUCCESS)
6461 {
6463 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6464 RegCloseKey(hkey);
6465 }
6466
6467 path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local;
6469 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6470
6471 res = RegOpenKeyA(HKEY_CLASSES_ROOT, classes_path_win32, &hkey);
6472 if (res == ERROR_SUCCESS)
6473 {
6474 res = RegDeleteValueA(hkey, name_win32);
6475 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6476 RegCloseKey(hkey);
6477 }
6478
6479 path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local;
6481 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
6482
6483done:
6484 DeleteFileA("msitest\\win32.txt");
6485 DeleteFileA("msitest\\win32_local.txt");
6486 DeleteFileA("msitest\\dotnet.txt");
6487 DeleteFileA("msitest\\dotnet_local.txt");
6488 DeleteFileA("msitest\\manifest.txt");
6489 DeleteFileA("msitest\\manifest_local.txt");
6490 DeleteFileA("msitest\\application_win32.txt");
6491 DeleteFileA("msitest\\application_dotnet.txt");
6492 DeleteFileA("msitest\\fake_local.txt");
6495}
static void create_file_data(LPCSTR name, LPCSTR data, DWORD size)
Definition: asmcache.c:795
#define CHECK_REG_MULTI(key, name, expect)
Definition: action.c:2587
static const msi_table pa_tables[]
Definition: action.c:2345
static const char name_dotnet[]
Definition: custom.c:1635
static const char path_dotnet[]
Definition: custom.c:1634
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
static const CHAR manifest[]
Definition: v6util.h:39
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by START_TEST().

◆ test_publish_components()

static void test_publish_components ( void  )
static

Definition at line 5743 of file action.c.

5744{
5745 static const char keypath[] =
5746 "Software\\Microsoft\\Installer\\Components\\0CBCFA296AC907244845745CEEB2F8AA";
5747 static const char keypath2[] =
5748 "Software\\Classes\\Installer\\Components\\0CBCFA296AC907244845745CEEB2F8AA";
5749
5750 UINT r;
5751 LONG res;
5752 HKEY key;
5753 BYTE *data;
5754 DWORD size;
5755
5756 if (is_process_limited())
5757 {
5758 skip("process is limited\n");
5759 return;
5760 }
5761
5763 create_file("msitest\\english.txt", 1000);
5765
5767
5770 {
5771 skip("Not enough rights to perform tests\n");
5772 goto error;
5773 }
5774 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5775
5776 size = 0;
5777 r = MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
5778 "english.txt", INSTALLMODE_DEFAULT, NULL, &size);
5779 ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
5780
5781 res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
5782 ok(res == ERROR_SUCCESS, "components key not created %ld\n", res);
5783
5784 res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, &size);
5785 ok(res == ERROR_SUCCESS, "value not found %ld\n", res);
5786
5787 data = malloc(size);
5788 res = RegQueryValueExA(key, "english.txt", NULL, NULL, data, &size);
5789 ok(res == ERROR_SUCCESS, "value not found %ld\n", res);
5791
5793 ok(res == ERROR_SUCCESS, "RegDeleteKey failed %ld\n", res);
5794
5797 ok(res == ERROR_SUCCESS, "RegCreateKeyEx failed %ld\n", res);
5798 res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
5799 ok(res == ERROR_SUCCESS, "RegSetValueEx failed %ld\n", res);
5801
5802 size = 0;
5803 r = MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
5804 "english.txt", INSTALLMODE_DEFAULT, NULL, &size);
5805 ok(r == ERROR_SUCCESS, "MsiProvideQualifiedComponent returned %d\n", r);
5806
5807 if (pRegDeleteKeyExA)
5808 res = pRegDeleteKeyExA(HKEY_LOCAL_MACHINE, keypath2, KEY_WOW64_64KEY, 0);
5809 else
5811 ok(res == ERROR_SUCCESS, "RegDeleteKey failed %ld\n", res);
5812
5813 res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &key);
5814 ok(res == ERROR_SUCCESS, "RegCreateKey failed %ld\n", res);
5815
5816 res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
5817 ok(res == ERROR_SUCCESS, "RegSetValueEx failed %ld\n", res);
5818 free(data);
5820
5821 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5822 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5823
5824 res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
5825 ok(res == ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", res);
5826
5827 ok(!delete_pf("msitest\\english.txt", TRUE), "file not removed\n");
5828 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5829
5830error:
5831 DeleteFileA("msitest\\english.txt");
5834}
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1179
UINT WINAPI MsiProvideQualifiedComponentA(LPCSTR szComponent, LPCSTR szQualifier, DWORD dwInstallMode, LPSTR lpPathBuf, LPDWORD pcchPathBuf)
Definition: msi.c:3502
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static const msi_table pub_tables[]
Definition: action.c:2223
@ INSTALLMODE_DEFAULT
Definition: msi.h:166
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83

Referenced by START_TEST().

◆ test_publish_features()

static void test_publish_features ( void  )
static

Definition at line 3268 of file action.c.

3269{
3270 static const char cupath[] =
3271 "Software\\Microsoft\\Installer\\Features\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3272 static const char udfeatpath[] =
3273 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
3274 "\\84A88FD7F6998CE40A22FB59F6B9C2BB\\Features";
3275 static const char udpridpath[] =
3276 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
3277 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3278 static const char featkey[] =
3279 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Features";
3280 static const char classfeat[] =
3281 "Software\\Classes\\Installer\\Features\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3282 UINT r;
3283 LONG res;
3284 HKEY hkey;
3285 LPSTR usersid;
3286 CHAR keypath[MAX_PATH];
3288
3289 if (is_process_limited())
3290 {
3291 skip("process is limited\n");
3292 return;
3293 }
3294
3295 if (!(usersid = get_user_sid()))
3296 return;
3297
3298 CreateDirectoryA("msitest", NULL);
3299 create_file("msitest\\maximus", 500);
3300
3302
3303 if (is_wow64)
3305
3307
3308 /* PublishFeatures, current user */
3309 r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1");
3311 {
3312 skip("Not enough rights to perform tests\n");
3313 goto error;
3314 }
3315 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3316 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3317 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3318
3319 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey);
3320 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3321
3322 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey);
3323 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3324
3325 res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
3326 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3327
3328 CHECK_REG_STR(hkey, "feature", "");
3329 CHECK_REG_STR(hkey, "montecristo", "");
3330
3331 RegDeleteValueA(hkey, "feature");
3332 RegDeleteValueA(hkey, "montecristo");
3333 delete_key(hkey, "", access);
3334 RegCloseKey(hkey);
3335
3336 sprintf(keypath, udfeatpath, usersid);
3337 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3338 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3339
3340 CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE");
3341 CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE");
3342
3343 RegDeleteValueA(hkey, "feature");
3344 RegDeleteValueA(hkey, "montecristo");
3345 delete_key(hkey, "", access);
3346 RegCloseKey(hkey);
3347 sprintf(keypath, udpridpath, usersid);
3349
3350 /* PublishFeatures, machine */
3351 r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1 ALLUSERS=1");
3352 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3353 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3354 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3355
3356 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, featkey, 0, access, &hkey);
3357 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3358
3359 res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
3360 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3361 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, classfeat, 0, access, &hkey);
3362 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3363
3364 CHECK_REG_STR(hkey, "feature", "");
3365 CHECK_REG_STR(hkey, "montecristo", "");
3366
3367 RegDeleteValueA(hkey, "feature");
3368 RegDeleteValueA(hkey, "montecristo");
3369 delete_key(hkey, "", access);
3370 RegCloseKey(hkey);
3371
3372 sprintf(keypath, udfeatpath, "S-1-5-18");
3373 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3374 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3375
3376 CHECK_REG_STR(hkey, "feature", "VGtfp^p+,?82@JU1j_KE");
3377 CHECK_REG_STR(hkey, "montecristo", "VGtfp^p+,?82@JU1j_KE");
3378
3379 RegDeleteValueA(hkey, "feature");
3380 RegDeleteValueA(hkey, "montecristo");
3381 delete_key(hkey, "", access);
3382 RegCloseKey(hkey);
3383 sprintf(keypath, udpridpath, "S-1-5-18");
3385
3386error:
3388 DeleteFileA("msitest\\maximus");
3389 RemoveDirectoryA("msitest");
3390 LocalFree(usersid);
3391}
@ INSTALLUILEVEL_FULL
Definition: msi.h:69

Referenced by START_TEST().

◆ test_publish_product()

static void test_publish_product ( void  )
static

Definition at line 3031 of file action.c.

3032{
3033 static const char prodpath[] =
3034 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\%s\\Products"
3035 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3036 static const char cuprodpath[] =
3037 "Software\\Microsoft\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3038 static const char cuupgrades[] =
3039 "Software\\Microsoft\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
3040 static const char badprod[] =
3041 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\Products"
3042 "\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3043 static const char machprod[] =
3044 "Software\\Classes\\Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3045 static const char machup[] =
3046 "Software\\Classes\\Installer\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
3047 UINT r;
3048 LONG res;
3049 LPSTR usersid;
3050 HKEY sourcelist, net, props;
3051 HKEY hkey, patches, media;
3052 CHAR keypath[MAX_PATH];
3055 BOOL old_installer = FALSE;
3057
3058 if (is_process_limited())
3059 {
3060 skip("process is limited\n");
3061 return;
3062 }
3063
3064 if (!(usersid = get_user_sid()))
3065 return;
3066
3068
3069 CreateDirectoryA("msitest", NULL);
3070 create_file("msitest\\maximus", 500);
3071
3073
3074 if (is_wow64)
3076
3078
3079 /* PublishProduct, current user */
3080 r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1");
3082 {
3083 skip("Not enough rights to perform tests\n");
3084 goto error;
3085 }
3086 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3087 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3088 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3089
3090 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey);
3091 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3092
3093 sprintf(keypath, prodpath, usersid);
3094 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3096 {
3097 res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey);
3098 if (res == ERROR_SUCCESS)
3099 {
3100 win_skip("Windows Installer < 3.0 detected\n");
3101 RegCloseKey(hkey);
3102 old_installer = TRUE;
3103 goto currentuser;
3104 }
3105 else
3106 {
3107 win_skip("Install failed, no need to continue\n");
3108 return;
3109 }
3110 }
3111 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3112
3113 res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
3114 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3115
3116 res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches);
3117 todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res);
3118 if (!res)
3119 CHECK_DEL_REG_STR(patches, "AllPatches", "");
3120
3121 delete_key(patches, "", access);
3122 RegCloseKey(patches);
3123 delete_key(hkey, "", access);
3124 RegCloseKey(hkey);
3125
3126currentuser:
3127 res = RegOpenKeyA(HKEY_CURRENT_USER, cuprodpath, &hkey);
3128 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3129
3130 CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
3131 CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
3132 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
3133 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
3134 if (!old_installer)
3135 CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0);
3136 CHECK_DEL_REG_DWORD(hkey, "Assignment", 0);
3137 CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184);
3138 CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0);
3139 CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
3140
3141 res = RegOpenKeyA(hkey, "SourceList", &sourcelist);
3142 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3143
3144 lstrcpyA(path, "n;1;");
3145 lstrcatA(path, temp);
3146 CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path);
3147 CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
3148
3149 res = RegOpenKeyA(sourcelist, "Net", &net);
3150 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3151
3152 CHECK_DEL_REG_STR(net, "1", temp);
3153
3154 RegDeleteKeyA(net, "");
3156
3157 res = RegOpenKeyA(sourcelist, "Media", &media);
3158 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3159
3160 CHECK_DEL_REG_STR(media, "1", "DISK1;");
3161
3162 RegDeleteKeyA(media, "");
3164 RegDeleteKeyA(sourcelist, "");
3165 RegCloseKey(sourcelist);
3166 RegDeleteKeyA(hkey, "");
3167 RegCloseKey(hkey);
3168
3169 res = RegOpenKeyA(HKEY_CURRENT_USER, cuupgrades, &hkey);
3170 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3171
3172 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
3173
3174 RegDeleteKeyA(hkey, "");
3175 RegCloseKey(hkey);
3176
3177 /* PublishProduct, machine */
3178 r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1");
3179 if (old_installer)
3180 goto machprod;
3181 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3182 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3183 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3184
3185 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, badprod, 0, access, &hkey);
3186 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3187
3188 sprintf(keypath, prodpath, "S-1-5-18");
3189 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, keypath, 0, access, &hkey);
3190 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3191
3192 res = RegOpenKeyExA(hkey, "InstallProperties", 0, access, &props);
3193 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
3194
3195 res = RegOpenKeyExA(hkey, "Patches", 0, access, &patches);
3196 todo_wine ok(!res, "Expected ERROR_SUCCESS, got %ld\n", res);
3197 if (!res)
3198 CHECK_DEL_REG_STR(patches, "AllPatches", "");
3199
3200 delete_key(patches, "", access);
3201 RegCloseKey(patches);
3202 delete_key(hkey, "", access);
3203 RegCloseKey(hkey);
3204
3205machprod:
3206 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machprod, 0, access, &hkey);
3207 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3208
3209 CHECK_DEL_REG_STR(hkey, "ProductName", "MSITEST");
3210 CHECK_DEL_REG_STR(hkey, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
3211 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
3212 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
3213 if (!old_installer)
3214 CHECK_DEL_REG_DWORD(hkey, "AuthorizedLUAApp", 0);
3215 CHECK_DEL_REG_DWORD_TODO(hkey, "Assignment", 1);
3216 CHECK_DEL_REG_DWORD(hkey, "AdvertiseFlags", 0x184);
3217 CHECK_DEL_REG_DWORD(hkey, "InstanceType", 0);
3218 CHECK_DEL_REG_MULTI(hkey, "Clients", ":\0");
3219
3220 res = RegOpenKeyExA(hkey, "SourceList", 0, access, &sourcelist);
3221 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3222
3223 lstrcpyA(path, "n;1;");
3224 lstrcatA(path, temp);
3225 CHECK_DEL_REG_STR(sourcelist, "LastUsedSource", path);
3226 CHECK_DEL_REG_STR(sourcelist, "PackageName", "msitest.msi");
3227
3228 res = RegOpenKeyExA(sourcelist, "Net", 0, access, &net);
3229 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3230
3231 CHECK_DEL_REG_STR(net, "1", temp);
3232
3233 res = delete_key(net, "", access);
3234 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3236
3237 res = RegOpenKeyExA(sourcelist, "Media", 0, access, &media);
3238 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3239
3240 CHECK_DEL_REG_STR(media, "1", "DISK1;");
3241
3242 res = delete_key(media, "", access);
3243 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3245 res = delete_key(sourcelist, "", access);
3246 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3247 RegCloseKey(sourcelist);
3248 res = delete_key(hkey, "", access);
3249 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3250 RegCloseKey(hkey);
3251
3252 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, machup, 0, access, &hkey);
3253 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3254
3255 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
3256
3257 res = delete_key(hkey, "", access);
3258 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3259 RegCloseKey(hkey);
3260
3261error:
3263 DeleteFileA("msitest\\maximus");
3264 RemoveDirectoryA("msitest");
3265 LocalFree(usersid);
3266}
__u8 media
Definition: mkdosfs.c:9
#define CHECK_DEL_REG_DWORD_TODO(prodkey, name, expected)
Definition: action.c:2608
#define CHECK_DEL_REG_MULTI(key, name, expect)
Definition: action.c:2590
#define CHECK_DEL_REG_DWORD(prodkey, name, expected)
Definition: action.c:2602
static TNetwork net
Definition: tncon.cpp:351

Referenced by START_TEST().

◆ test_publish_sourcelist()

static void test_publish_sourcelist ( void  )
static

Definition at line 4281 of file action.c.

4282{
4283 UINT r;
4284 DWORD size;
4287 CHAR prodcode[] = "{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
4288
4289 if (!pMsiSourceListEnumSourcesA || !pMsiSourceListGetInfoA)
4290 {
4291 win_skip("MsiSourceListEnumSourcesA and/or MsiSourceListGetInfoA are not available\n");
4292 return;
4293 }
4294 if (is_process_limited())
4295 {
4296 skip("process is limited\n");
4297 return;
4298 }
4299
4300 CreateDirectoryA("msitest", NULL);
4301 create_file("msitest\\maximus", 500);
4302
4304
4306
4309 {
4310 skip("Not enough rights to perform tests\n");
4311 goto error;
4312 }
4313 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4314 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4315 ok(pf_exists("msitest"), "File not installed\n");
4316
4317 /* nothing published */
4318 size = MAX_PATH;
4319 lstrcpyA(value, "aaa");
4320 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4322 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4323 ok(size == MAX_PATH, "got %lu\n", size);
4324 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4325
4326 size = MAX_PATH;
4327 lstrcpyA(value, "aaa");
4328 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4330 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4331 ok(size == MAX_PATH, "got %lu\n", size);
4332 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4333
4334 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1");
4335 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4336 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4337 ok(pf_exists("msitest"), "File not installed\n");
4338
4339 /* after RegisterProduct */
4340 size = MAX_PATH;
4341 lstrcpyA(value, "aaa");
4342 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4344 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4345 ok(size == MAX_PATH, "got %lu\n", size);
4346 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4347
4348 size = MAX_PATH;
4349 lstrcpyA(value, "aaa");
4350 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4352 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4353 ok(size == MAX_PATH, "got %lu\n", size);
4354 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4355
4356 r = MsiInstallProductA(msifile, "PROCESS_COMPONENTS=1");
4357 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4358 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4359 ok(pf_exists("msitest"), "File not installed\n");
4360
4361 /* after ProcessComponents */
4362 size = MAX_PATH;
4363 lstrcpyA(value, "aaa");
4364 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4366 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4367 ok(size == MAX_PATH, "got %lu\n", size);
4368 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4369
4370 size = MAX_PATH;
4371 lstrcpyA(value, "aaa");
4372 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4374 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4375 ok(size == MAX_PATH, "got %lu\n", size);
4376 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4377
4378 r = MsiInstallProductA(msifile, "PUBLISH_FEATURES=1");
4379 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4380 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4381 ok(pf_exists("msitest"), "File not installed\n");
4382
4383 /* after PublishFeatures */
4384 size = MAX_PATH;
4385 lstrcpyA(value, "aaa");
4386 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4388 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4389 ok(size == MAX_PATH, "got %lu\n", size);
4390 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4391
4392 size = MAX_PATH;
4393 lstrcpyA(value, "aaa");
4394 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4396 ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
4397 ok(size == MAX_PATH, "got %lu\n", size);
4398 ok(!lstrcmpA(value, "aaa"), "Expected \"aaa\", got \"%s\"\n", value);
4399
4400 r = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1");
4401 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4402 ok(pf_exists("msitest\\maximus"), "File not installed\n");
4403 ok(pf_exists("msitest"), "File not installed\n");
4404
4405 /* after PublishProduct */
4406 size = MAX_PATH;
4407 lstrcpyA(value, "aaa");
4408 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4410 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4411 ok(!lstrcmpA(value, "msitest.msi"), "Expected 'msitest.msi', got %s\n", value);
4412 ok(size == 11, "Expected 11, got %lu\n", size);
4413
4414 size = MAX_PATH;
4415 lstrcpyA(value, "aaa");
4416 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4418 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4419 ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
4420 ok(size == 0, "Expected 0, got %lu\n", size);
4421
4422 size = MAX_PATH;
4423 lstrcpyA(value, "aaa");
4424 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4426 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4427 ok(!lstrcmpA(value, ""), "Expected \"\", got \"%s\"\n", value);
4428 ok(size == 0, "Expected 0, got %lu\n", size);
4429
4431 lstrcatA(path, "\\");
4432
4433 size = MAX_PATH;
4434 lstrcpyA(value, "aaa");
4435 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4437 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4438 ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value);
4439 ok(size == lstrlenA(path), "Expected %d, got %lu\n", lstrlenA(path), size);
4440
4441 size = MAX_PATH;
4442 lstrcpyA(value, "aaa");
4443 r = pMsiSourceListGetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4445 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4446 ok(!lstrcmpA(value, "n"), "Expected \"n\", got \"%s\"\n", value);
4447 ok(size == 1, "Expected 1, got %lu\n", size);
4448
4449 size = MAX_PATH;
4450 lstrcpyA(value, "aaa");
4451 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4453 ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
4454 ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
4455 ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
4456
4457 size = MAX_PATH;
4458 lstrcpyA(value, "aaa");
4459 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4461 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4462 ok(!lstrcmpA(value, path), "Expected \"%s\", got \"%s\"\n", path, value);
4463 ok(size == lstrlenA(path), "Expected %d, got %lu\n", lstrlenA(path), size);
4464
4465 size = MAX_PATH;
4466 lstrcpyA(value, "aaa");
4467 r = pMsiSourceListEnumSourcesA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
4469 ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
4470 ok(!lstrcmpA(value, "aaa"), "Expected value to be unchanged, got %s\n", value);
4471 ok(size == MAX_PATH, "Expected MAX_PATH, got %lu\n", size);
4472
4473 /* complete uninstall */
4474 r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
4475 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
4476 ok(!pf_exists("msitest\\maximus"), "File not deleted\n");
4477 ok(!pf_exists("msitest"), "Directory not deleted\n");
4478
4479 /* make sure 'Program Files\msitest' is removed */
4481
4482error:
4484 DeleteFileA("msitest\\maximus");
4485 RemoveDirectoryA("msitest");
4486}
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define INSTALLPROPERTY_LASTUSEDTYPEA
Definition: msi.h:408
#define INSTALLPROPERTY_MEDIAPACKAGEPATHA
Definition: msi.h:412
#define INSTALLPROPERTY_LASTUSEDSOURCEA
Definition: msi.h:404
@ MSICODE_PRODUCT
Definition: msi.h:215
#define INSTALLPROPERTY_DISKPROMPTA
Definition: msi.h:416
@ MSISOURCETYPE_URL
Definition: msi.h:209
@ MSISOURCETYPE_NETWORK
Definition: msi.h:208
#define INSTALLPROPERTY_PACKAGENAMEA
Definition: msi.h:264
Definition: pdh_main.c:94

Referenced by START_TEST().

◆ test_register_class_info()

static void test_register_class_info ( void  )
static

Definition at line 5989 of file action.c.

5990{
5991 UINT r;
5992 LONG res;
5993 HKEY hkey;
5994
5995 if (is_process_limited())
5996 {
5997 skip("process is limited\n");
5998 return;
5999 }
6000
6002 create_file("msitest\\class.txt", 1000);
6004
6006
6009 {
6010 skip("Not enough rights to perform tests\n");
6011 goto error;
6012 }
6013 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6014
6015 if (is_64bit)
6016 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6017 else
6018 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6019 ok(res == ERROR_SUCCESS, "key not created\n");
6020 RegCloseKey(hkey);
6021
6022 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6023 ok(res == ERROR_SUCCESS, "key not created\n");
6024 RegCloseKey(hkey);
6025
6026 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey);
6027 ok(res == ERROR_SUCCESS, "key not created\n");
6028 RegCloseKey(hkey);
6029
6030 r = MsiInstallProductA(msifile, "REMOVE=ALL");
6031 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6032
6033 if (is_64bit)
6034 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6035 else
6036 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6037 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6038
6039 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "FileType\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6040 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6041
6042 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "AppID\\{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}", &hkey);
6043 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6044
6045 ok(!delete_pf("msitest\\class.txt", TRUE), "file not removed\n");
6046 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
6047
6048error:
6049 DeleteFileA("msitest\\class.txt");
6052}
static const msi_table rci_tables[]
Definition: action.c:2280

Referenced by START_TEST().

◆ test_register_extension_info()

static void test_register_extension_info ( void  )
static

Definition at line 6054 of file action.c.

6055{
6056 UINT r;
6057 LONG res;
6058 HKEY hkey;
6059
6060 if (is_process_limited())
6061 {
6062 skip("process is limited\n");
6063 return;
6064 }
6065
6067 create_file("msitest\\extension.txt", 1000);
6069
6071
6074 {
6075 skip("Not enough rights to perform tests\n");
6076 goto error;
6077 }
6078 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6079
6080 res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &hkey);
6081 ok(res == ERROR_SUCCESS, "key not created\n");
6082 RegCloseKey(hkey);
6083
6084 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1\\shell\\Open\\command", &hkey);
6085 ok(res == ERROR_SUCCESS, "key not created\n");
6086 RegCloseKey(hkey);
6087
6088 r = MsiInstallProductA(msifile, "REMOVE=ALL");
6089 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6090
6091 res = RegOpenKeyA(HKEY_CLASSES_ROOT, ".extension", &hkey);
6092 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6093
6094 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Prog.Id.1", &hkey);
6095 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6096
6097 ok(!delete_pf("msitest\\extension.txt", TRUE), "file not removed\n");
6098 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
6099
6100error:
6101 DeleteFileA("msitest\\extension.txt");
6104}
static const msi_table rei_tables[]
Definition: action.c:2295

Referenced by START_TEST().

◆ test_register_font()

static void test_register_font ( void  )
static

Definition at line 5460 of file action.c.

5461{
5462 static const char regfont1[] = "Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts";
5463 static const char regfont2[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Fonts";
5464 LONG ret;
5465 HKEY key;
5466 UINT r;
5468
5469 if (is_process_limited())
5470 {
5471 skip("process is limited\n");
5472 return;
5473 }
5474
5476 create_file("msitest\\font.ttf", 1000);
5478
5479 if (is_wow64)
5481
5483
5486 {
5487 skip("Not enough rights to perform tests\n");
5488 goto error;
5489 }
5490 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5491
5492 ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, regfont1, 0, access, &key);
5493 if (ret)
5494 RegOpenKeyExA(HKEY_LOCAL_MACHINE, regfont2, 0, access, &key);
5495
5496 ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
5497 ok(ret != ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", ret);
5498
5499 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5500 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5501
5502 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5503
5504 ret = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
5505 ok(ret == ERROR_FILE_NOT_FOUND, "unexpected result %ld\n", ret);
5506
5507 RegDeleteValueA(key, "msi test font");
5509
5510error:
5511 DeleteFileA("msitest\\font.ttf");
5514}
static const msi_table font_tables[]
Definition: action.c:2152

Referenced by START_TEST().

◆ test_register_mime_info()

static void test_register_mime_info ( void  )
static

Definition at line 6232 of file action.c.

6233{
6234 UINT r;
6235 LONG res;
6236 HKEY hkey;
6237
6238 if (is_process_limited())
6239 {
6240 skip("process is limited\n");
6241 return;
6242 }
6243
6245 create_file("msitest\\mime.txt", 1000);
6247
6249
6252 {
6253 skip("Not enough rights to perform tests\n");
6254 goto error;
6255 }
6256 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6257
6258 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &hkey);
6259 ok(res == ERROR_SUCCESS, "key not created\n");
6260 RegCloseKey(hkey);
6261
6262 r = MsiInstallProductA(msifile, "REMOVE=ALL");
6263 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6264
6265 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &hkey);
6266 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6267
6268 ok(!delete_pf("msitest\\mime.txt", TRUE), "file not removed\n");
6269 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
6270
6271error:
6272 DeleteFileA("msitest\\mime.txt");
6275}
static const msi_table rmi_tables[]
Definition: action.c:2329

Referenced by START_TEST().

◆ test_register_product()

static void test_register_product ( void  )
static

Definition at line 2657 of file action.c.

2658{
2659 UINT r;
2660 LONG res;
2661 HKEY hkey, props, usage;
2662 LPSTR usersid;
2663 char date[MAX_PATH], temp[MAX_PATH], keypath[MAX_PATH], path[MAX_PATH];
2664 DWORD size, type;
2665
2666 static const CHAR uninstall[] = "Software\\Microsoft\\Windows\\CurrentVersion"
2667 "\\Uninstall\\{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}";
2668 static const CHAR userdata[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
2669 "\\UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
2670 static const CHAR ugkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Installer"
2671 "\\UpgradeCodes\\51AAE0C44620A5E4788506E91F249BD2";
2672 static const CHAR userugkey[] = "Software\\Microsoft\\Installer\\UpgradeCodes"
2673 "\\51AAE0C44620A5E4788506E91F249BD2";
2674
2675 if (is_process_limited())
2676 {
2677 skip("process is limited\n");
2678 return;
2679 }
2680
2681 if (!(usersid = get_user_sid()))
2682 return;
2683
2686
2687 CreateDirectoryA("msitest", NULL);
2688 create_file("msitest\\maximus", 500);
2689
2691
2693
2694 /* RegisterProduct */
2695 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1");
2697 {
2698 skip("Not enough rights to perform tests\n");
2699 goto error;
2700 }
2701 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
2702 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2703 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2704
2705 res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey);
2706 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
2707
2708 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
2709 ok(!res, "got %ld\n", res);
2710
2711 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2712 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2713 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2714 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2715 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2716 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2717 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2718 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", "");
2719 CHECK_DEL_REG_STR(hkey, "Comments", "");
2720 CHECK_DEL_REG_STR(hkey, "Contact", "");
2721 CHECK_DEL_REG_STR(hkey, "HelpLink", "");
2722 CHECK_DEL_REG_STR(hkey, "HelpTelephone", "");
2723 CHECK_DEL_REG_STR(hkey, "InstallLocation", "");
2724 CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
2725 CHECK_DEL_REG_STR(hkey, "Readme", "");
2726 CHECK_DEL_REG_STR(hkey, "Size", "");
2727 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", "");
2728 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", "");
2729 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2730 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2731 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2732 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2733 CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1);
2734 CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
2735
2736 res = RegDeleteKeyA(hkey, "");
2737 ok(!res, "got %ld\n", res);
2738 RegCloseKey(hkey);
2739
2740 sprintf(keypath, userdata, usersid);
2742 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2743
2744 res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
2745 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2746
2747 size = sizeof(path);
2748 RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
2750 RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
2751
2752 CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
2753 CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
2754 CHECK_DEL_REG_STR(props, "InstallDate", date);
2755 CHECK_DEL_REG_STR(props, "InstallSource", temp);
2756 CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2757 CHECK_DEL_REG_STR(props, "Publisher", "Wine");
2758 CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2759 CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", "");
2760 CHECK_DEL_REG_STR(props, "Comments", "");
2761 CHECK_DEL_REG_STR(props, "Contact", "");
2762 CHECK_DEL_REG_STR(props, "HelpLink", "");
2763 CHECK_DEL_REG_STR(props, "HelpTelephone", "");
2764 CHECK_DEL_REG_STR(props, "InstallLocation", "");
2765 CHECK_DEL_REG_DWORD(props, "NoModify", 1);
2766 CHECK_DEL_REG_STR(props, "Readme", "");
2767 CHECK_DEL_REG_STR(props, "Size", "");
2768 CHECK_DEL_REG_STR(props, "URLInfoAbout", "");
2769 CHECK_DEL_REG_STR(props, "URLUpdateInfo", "");
2770 CHECK_DEL_REG_DWORD(props, "Language", 1033);
2771 CHECK_DEL_REG_DWORD(props, "Version", 0x1010001);
2772 CHECK_DEL_REG_DWORD(props, "VersionMajor", 1);
2773 CHECK_DEL_REG_DWORD(props, "VersionMinor", 1);
2774 CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1);
2776
2777 res = RegDeleteKeyA(props, "");
2778 ok(!res, "got %ld\n", res);
2780
2781 res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
2782 todo_wine
2783 {
2784 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2785 }
2786
2787 res = RegDeleteKeyA(usage, "");
2788 todo_wine
2789 ok(!res, "got %ld\n", res);
2791 res = RegDeleteKeyA(hkey, "");
2792 ok(!res, "got %ld\n", res);
2793 RegCloseKey(hkey);
2794
2796 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2797
2798 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
2799
2800 res = RegDeleteKeyA(hkey, "");
2801 ok(!res, "got %ld\n", res);
2802 RegCloseKey(hkey);
2803
2804 /* RegisterProduct, machine */
2805 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1");
2806 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
2807 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2808 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2809
2810 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
2811 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
2812
2813 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
2814 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2815
2816 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2817 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2818 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2819 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2820 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2821 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2822 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2823 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", "");
2824 CHECK_DEL_REG_STR(hkey, "Comments", "");
2825 CHECK_DEL_REG_STR(hkey, "Contact", "");
2826 CHECK_DEL_REG_STR(hkey, "HelpLink", "");
2827 CHECK_DEL_REG_STR(hkey, "HelpTelephone", "");
2828 CHECK_DEL_REG_STR(hkey, "InstallLocation", "");
2829 CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
2830 CHECK_DEL_REG_STR(hkey, "Readme", "");
2831 CHECK_DEL_REG_STR(hkey, "Size", "");
2832 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", "");
2833 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", "");
2834 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2835 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2836 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2837 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2838 CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1);
2839 CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
2840
2841 res = RegDeleteKeyA(hkey, "");
2842 ok(!res, "got %ld\n", res);
2843 RegCloseKey(hkey);
2844
2845 sprintf(keypath, userdata, "S-1-5-18");
2847 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2848
2849 res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
2850 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2851
2852 size = sizeof(path);
2853 RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
2855 RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
2856
2857 CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
2858 CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
2859 CHECK_DEL_REG_STR(props, "InstallDate", date);
2860 CHECK_DEL_REG_STR(props, "InstallSource", temp);
2861 CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2862 CHECK_DEL_REG_STR(props, "Publisher", "Wine");
2863 CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2864 CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", "");
2865 CHECK_DEL_REG_STR(props, "Comments", "");
2866 CHECK_DEL_REG_STR(props, "Contact", "");
2867 CHECK_DEL_REG_STR(props, "HelpLink", "");
2868 CHECK_DEL_REG_STR(props, "HelpTelephone", "");
2869 CHECK_DEL_REG_STR(props, "InstallLocation", "");
2870 CHECK_DEL_REG_DWORD(props, "NoModify", 1);
2871 CHECK_DEL_REG_STR(props, "Readme", "");
2872 CHECK_DEL_REG_STR(props, "Size", "");
2873 CHECK_DEL_REG_STR(props, "URLInfoAbout", "");
2874 CHECK_DEL_REG_STR(props, "URLUpdateInfo", "");
2875 CHECK_DEL_REG_DWORD(props, "Language", 1033);
2876 CHECK_DEL_REG_DWORD(props, "Version", 0x1010001);
2877 CHECK_DEL_REG_DWORD(props, "VersionMajor", 1);
2878 CHECK_DEL_REG_DWORD(props, "VersionMinor", 1);
2879 CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1);
2881
2882 res = RegDeleteKeyA(props, "");
2883 ok(!res, "got %ld\n", res);
2885
2886 res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
2887 todo_wine
2888 {
2889 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2890 }
2891
2892 res = RegDeleteKeyA(usage, "");
2893 todo_wine
2894 ok(!res, "got %ld\n", res);
2896 res = RegDeleteKeyA(hkey, "");
2897 ok(!res, "got %ld\n", res);
2898 RegCloseKey(hkey);
2899
2901 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2902
2903 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
2904
2905 res = RegDeleteKeyA(hkey, "");
2906 ok(!res, "got %ld\n", res);
2907 RegCloseKey(hkey);
2908
2909 if (is_wow64 || is_64bit)
2910 {
2913
2914 r = MsiInstallProductA(msifile, "REGISTER_PRODUCT=1 ALLUSERS=1 RP_TEST64=1");
2915 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
2916 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
2917 ok(delete_pf("msitest", FALSE), "Directory not created\n");
2918
2919 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
2920 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", res);
2921
2922 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_32KEY, &hkey);
2923 ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_SUCCESS, got %ld\n", res);
2924
2925 res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
2926 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2927
2928 CHECK_DEL_REG_STR(hkey, "DisplayName", "MSITEST");
2929 CHECK_DEL_REG_STR(hkey, "DisplayVersion", "1.1.1");
2930 CHECK_DEL_REG_STR(hkey, "InstallDate", date);
2931 CHECK_DEL_REG_STR(hkey, "InstallSource", temp);
2932 CHECK_DEL_REG_ISTR(hkey, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2933 CHECK_DEL_REG_STR(hkey, "Publisher", "Wine");
2934 CHECK_DEL_REG_STR(hkey, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2935 CHECK_DEL_REG_STR(hkey, "AuthorizedCDFPrefix", "");
2936 CHECK_DEL_REG_STR(hkey, "Comments", "");
2937 CHECK_DEL_REG_STR(hkey, "Contact", "");
2938 CHECK_DEL_REG_STR(hkey, "HelpLink", "");
2939 CHECK_DEL_REG_STR(hkey, "HelpTelephone", "");
2940 CHECK_DEL_REG_STR(hkey, "InstallLocation", "");
2941 CHECK_DEL_REG_DWORD(hkey, "NoModify", 1);
2942 CHECK_DEL_REG_STR(hkey, "Readme", "");
2943 CHECK_DEL_REG_STR(hkey, "Size", "");
2944 CHECK_DEL_REG_STR(hkey, "URLInfoAbout", "");
2945 CHECK_DEL_REG_STR(hkey, "URLUpdateInfo", "");
2946 CHECK_DEL_REG_DWORD(hkey, "Language", 1033);
2947 CHECK_DEL_REG_DWORD(hkey, "Version", 0x1010001);
2948 CHECK_DEL_REG_DWORD(hkey, "VersionMajor", 1);
2949 CHECK_DEL_REG_DWORD(hkey, "VersionMinor", 1);
2950 CHECK_DEL_REG_DWORD(hkey, "WindowsInstaller", 1);
2951 CHECK_DEL_REG_DWORD_TODO(hkey, "EstimatedSize", get_estimated_size());
2952
2953 res = RegDeleteKeyA(hkey, "");
2954 ok(!res, "got %ld\n", res);
2955 RegCloseKey(hkey);
2956
2957 sprintf(keypath, userdata, "S-1-5-18");
2959 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2960
2961 res = RegOpenKeyExA(hkey, "InstallProperties", 0, KEY_READ, &props);
2962 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
2963
2964 size = sizeof(path);
2965 RegQueryValueExA(props, "LocalPackage", NULL, &type, (LPBYTE)path, &size);
2967 RegDeleteValueA(props, "LocalPackage"); /* LocalPackage is nondeterministic */
2968
2969 CHECK_DEL_REG_STR(props, "DisplayName", "MSITEST");
2970 CHECK_DEL_REG_STR(props, "DisplayVersion", "1.1.1");
2971 CHECK_DEL_REG_STR(props, "InstallDate", date);
2972 CHECK_DEL_REG_STR(props, "InstallSource", temp);
2973 CHECK_DEL_REG_ISTR(props, "ModifyPath", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2974 CHECK_DEL_REG_STR(props, "Publisher", "Wine");
2975 CHECK_DEL_REG_STR(props, "UninstallString", "MsiExec.exe /X{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
2976 CHECK_DEL_REG_STR(props, "AuthorizedCDFPrefix", "");
2977 CHECK_DEL_REG_STR(props, "Comments", "");
2978 CHECK_DEL_REG_STR(props, "Contact", "");
2979 CHECK_DEL_REG_STR(props, "HelpLink", "");
2980 CHECK_DEL_REG_STR(props, "HelpTelephone", "");
2981 CHECK_DEL_REG_STR(props, "InstallLocation", "");
2982 CHECK_DEL_REG_DWORD(props, "NoModify", 1);
2983 CHECK_DEL_REG_STR(props, "Readme", "");
2984 CHECK_DEL_REG_STR(props, "Size", "");
2985 CHECK_DEL_REG_STR(props, "URLInfoAbout", "");
2986 CHECK_DEL_REG_STR(props, "URLUpdateInfo", "");
2987 CHECK_DEL_REG_DWORD(props, "Language", 1033);
2988 CHECK_DEL_REG_DWORD(props, "Version", 0x1010001);
2989 CHECK_DEL_REG_DWORD(props, "VersionMajor", 1);
2990 CHECK_DEL_REG_DWORD(props, "VersionMinor", 1);
2991 CHECK_DEL_REG_DWORD(props, "WindowsInstaller", 1);
2993
2994 res = RegDeleteKeyA(props, "");
2995 ok(!res, "got %ld\n", res);
2997
2998 res = RegOpenKeyExA(hkey, "Usage", 0, KEY_READ, &usage);
2999 todo_wine
3000 {
3001 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3002 }
3003
3004 res = RegDeleteKeyA(usage, "");
3005 todo_wine
3006 ok(!res, "got %ld\n", res);
3008 res = RegDeleteKeyA(hkey, "");
3009 ok(!res, "got %ld\n", res);
3010 RegCloseKey(hkey);
3011
3013 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3014
3015 CHECK_DEL_REG_STR(hkey, "84A88FD7F6998CE40A22FB59F6B9C2BB", "");
3016
3017 res = RegDeleteKeyA(hkey, "");
3018 ok(!res, "got %ld\n", res);
3019 RegCloseKey(hkey);
3020 }
3021 else
3022 skip("64-bit RegisterProduct tests\n");
3023
3024error:
3026 DeleteFileA("msitest\\maximus");
3027 RemoveDirectoryA("msitest");
3028 LocalFree(usersid);
3029}
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
#define CHECK_DEL_REG_ISTR(prodkey, name, expected)
Definition: action.c:2581
#define create_database_template(name, tables, num_tables, version, template)
Definition: utils.h:46
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WOW64_32KEY
Definition: cmtypes.h:45

Referenced by START_TEST().

◆ test_register_progid_info()

static void test_register_progid_info ( void  )
static

Definition at line 6106 of file action.c.

6107{
6108 UINT r;
6109 LONG res;
6110 HKEY hkey;
6111
6112 if (is_process_limited())
6113 {
6114 skip("process is limited\n");
6115 return;
6116 }
6117
6119 create_file("msitest\\progid.txt", 1000);
6121
6122 res = RegCreateKeyExA(HKEY_CLASSES_ROOT, "Winetest.Orphaned", 0, NULL, 0,
6123 KEY_ALL_ACCESS, NULL, &hkey, NULL);
6124 ok(res == ERROR_SUCCESS, "key not created\n");
6125 RegCloseKey(hkey);
6126
6128
6131 {
6132 skip("Not enough rights to perform tests\n");
6133 goto error;
6134 }
6135 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6136
6137 if (is_64bit)
6138 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6139 else
6140 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6141 ok(res == ERROR_SUCCESS, "key not created\n");
6142 RegCloseKey(hkey);
6143
6144 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.1", &hkey);
6145 ok(res == ERROR_SUCCESS, "key not created\n");
6146 RegCloseKey(hkey);
6147
6148 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class", &hkey);
6149 ok(res == ERROR_SUCCESS, "key not created\n");
6150 RegCloseKey(hkey);
6151
6152 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &hkey);
6153 ok(res == ERROR_SUCCESS, "key not created\n");
6154 RegCloseKey(hkey);
6155
6156 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.VerClass.1", &hkey);
6157 ok(res == ERROR_SUCCESS, "key not created\n");
6158 RegCloseKey(hkey);
6159
6160 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.VerClass", &hkey);
6161 ok(res == ERROR_SUCCESS, "key not created\n");
6162 RegCloseKey(hkey);
6163
6164 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.NoProgIdClass.1", &hkey);
6165 ok(res == ERROR_FILE_NOT_FOUND, "key created\n");
6166 if (res == ERROR_SUCCESS) RegCloseKey(hkey);
6167
6168 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.NoProgIdClass", &hkey);
6169 ok(res == ERROR_FILE_NOT_FOUND, "key created\n");
6170
6171 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Orphaned", &hkey);
6172 ok(res == ERROR_SUCCESS, "key deleted\n");
6173 if (res == ERROR_SUCCESS) RegCloseKey(hkey);
6174
6175 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Orphaned2", &hkey);
6176 ok(res == ERROR_FILE_NOT_FOUND, "key created\n");
6177
6178 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Extension", &hkey);
6179 ok(res == ERROR_SUCCESS, "key not created\n");
6180 RegCloseKey(hkey);
6181
6182 r = MsiInstallProductA(msifile, "REMOVE=ALL");
6183 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6184
6185 if (is_64bit)
6186 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6187 else
6188 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
6189 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6190
6191 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.1", &hkey);
6192 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6193
6194 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class", &hkey);
6195 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6196
6197 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Class.2", &hkey);
6198 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6199
6200 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.VerClass.1", &hkey);
6201 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6202
6203 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.VerClass", &hkey);
6204 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6205
6206 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.NoProgIdClass.1", &hkey);
6207 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6208
6209 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.NoProgIdClass", &hkey);
6210 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6211
6212 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Orphaned", &hkey);
6213 ok(res == ERROR_SUCCESS, "key deleted\n");
6214 if (res == ERROR_SUCCESS) RegCloseKey(hkey);
6215
6216 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Orphaned2", &hkey);
6217 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6218
6219 res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Winetest.Extension", &hkey);
6220 ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n");
6221
6222 ok(!delete_pf("msitest\\progid.txt", TRUE), "file not removed\n");
6223 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
6224
6225error:
6226 DeleteFileA("msitest\\progid.txt");
6229 RegDeleteKeyA(HKEY_CLASSES_ROOT, "Winetest.Orphaned");
6230}
static const msi_table rpi_tables[]
Definition: action.c:2311

Referenced by START_TEST().

◆ test_register_typelib()

static void test_register_typelib ( void  )
static

Definition at line 5651 of file action.c.

5652{
5653 ITypeLib *tlb;
5654 HRESULT hr;
5655 UINT r;
5656
5657 if (is_process_limited())
5658 {
5659 skip("process is limited\n");
5660 return;
5661 }
5662
5663 /* UnregisterTypeLibraries action fails in 64-bit Windows <= 7 */
5664 if (sizeof(void *) == 8 && strcmp( winetest_platform, "wine" ))
5665 {
5666 win_skip("broken on 64-bit Windows\n");
5667 return;
5668 }
5669
5671 extract_resource(MAKEINTRESOURCEA(1), "TYPELIB", "msitest\\typelib.dll");
5673
5675
5678 {
5679 skip("Not enough rights to perform tests\n");
5680 goto error;
5681 }
5682 ok(r == ERROR_SUCCESS, "got %u\n", r);
5683
5684 hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
5685 ok(hr == S_OK, "got %#lx\n", hr);
5686 ITypeLib_Release(tlb);
5687
5688 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5689 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5690
5691 hr = LoadRegTypeLib(&LIBID_register_test, 7, 1, 0, &tlb);
5692 ok(hr == TYPE_E_LIBNOTREGISTERED, "got %#lx\n", hr);
5693
5694 ok(!delete_pf("msitest\\typelib.dll", TRUE), "file not removed\n");
5695 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5696
5697error:
5698 DeleteFileA("msitest\\typelib.dll");
5701}
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
#define S_OK
Definition: intsafe.h:52
static const msi_table tl_tables[]
Definition: action.c:2195
static void extract_resource(const char *name, const char *type, const char *path)
Definition: action.c:2639
static const GUID LIBID_register_test
Definition: custom.c:2008
const char * winetest_platform
HRESULT hr
Definition: shlfolder.c:183
#define TYPE_E_LIBNOTREGISTERED
Definition: winerror.h:2534
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581

Referenced by START_TEST().

◆ test_register_user()

static void test_register_user ( void  )
static

Definition at line 3456 of file action.c.

3457{
3458 UINT r;
3459 LONG res;
3460 HKEY props;
3461 LPSTR usersid;
3462 LPSTR owner, company;
3463 CHAR keypath[MAX_PATH];
3465
3466 static const CHAR keypropsfmt[] =
3467 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
3468 "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB\\InstallProperties";
3469 static const CHAR keypridfmt[] =
3470 "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\"
3471 "UserData\\%s\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
3472
3473 if (is_process_limited())
3474 {
3475 skip("process is limited\n");
3476 return;
3477 }
3478
3479 if (!(usersid = get_user_sid()))
3480 return;
3481
3482 get_owner_company(&owner, &company);
3483
3484 CreateDirectoryA("msitest", NULL);
3485 create_file("msitest\\maximus", 500);
3486
3488
3489 if (is_wow64)
3491
3493
3494 /* RegisterUser, per-user */
3495 r = MsiInstallProductA(msifile, "REGISTER_USER=1");
3497 {
3498 skip("Not enough rights to perform tests\n");
3499 goto error;
3500 }
3501 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3502 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3503 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3504
3505 sprintf(keypath, keypropsfmt, usersid);
3507 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3508
3509 CHECK_REG_STR(props, "ProductID", "none");
3510 CHECK_REG_STR(props, "RegCompany", company);
3511 CHECK_REG_STR(props, "RegOwner", owner);
3512
3513 RegDeleteValueA(props, "ProductID");
3514 RegDeleteValueA(props, "RegCompany");
3515 RegDeleteValueA(props, "RegOwner");
3516 delete_key(props, "", access);
3518 sprintf(keypath, keypridfmt, usersid);
3520
3521 /* RegisterUser, machine */
3522 r = MsiInstallProductA(msifile, "REGISTER_USER=1 ALLUSERS=1");
3523 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3524 ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
3525 ok(delete_pf("msitest", FALSE), "Directory not created\n");
3526
3527 sprintf(keypath, keypropsfmt, "S-1-5-18");
3529 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
3530
3531 CHECK_REG_STR(props, "ProductID", "none");
3532 CHECK_REG_STR(props, "RegCompany", company);
3533 CHECK_REG_STR(props, "RegOwner", owner);
3534
3535 RegDeleteValueA(props, "ProductID");
3536 RegDeleteValueA(props, "RegCompany");
3537 RegDeleteValueA(props, "RegOwner");
3538 delete_key(props, "", access);
3540 sprintf(keypath, keypridfmt, "S-1-5-18");
3542
3543error:
3544 free(company);
3545 free(owner);
3546
3548 DeleteFileA("msitest\\maximus");
3549 RemoveDirectoryA("msitest");
3550 LocalFree(usersid);
3551}
static void get_owner_company(LPSTR *owner, LPSTR *company)
Definition: action.c:3411

Referenced by START_TEST().

◆ test_remove_duplicate_files()

static void test_remove_duplicate_files ( void  )
static

Definition at line 5836 of file action.c.

5837{
5838 UINT r;
5839
5840 if (is_process_limited())
5841 {
5842 skip("process is limited\n");
5843 return;
5844 }
5845
5847 create_file("msitest\\original.txt", 1000);
5848 create_file("msitest\\original2.txt", 1000);
5849 create_file("msitest\\original3.txt", 1000);
5851
5853
5856 {
5857 skip("Not enough rights to perform tests\n");
5858 goto error;
5859 }
5860 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5861
5862 ok(pf_exists("msitest\\original.txt"), "file not created\n");
5863 ok(pf_exists("msitest\\original2.txt"), "file not created\n");
5864 ok(!pf_exists("msitest\\original3.txt"), "file created\n");
5865 ok(pf_exists("msitest\\duplicate.txt"), "file not created\n");
5866 ok(!pf_exists("msitest\\duplicate2.txt"), "file created\n");
5867
5868 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5869 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5870
5871 ok(delete_pf("msitest\\original.txt", TRUE), "file removed\n");
5872 ok(!delete_pf("msitest\\original2.txt", TRUE), "file not removed\n");
5873 ok(!delete_pf("msitest\\original3.txt", TRUE), "file not removed\n");
5874 ok(!delete_pf("msitest\\duplicate.txt", TRUE), "file not removed\n");
5875 ok(!delete_pf("msitest\\duplicate2.txt", TRUE), "file not removed\n");
5876 ok(delete_pf("msitest", FALSE), "directory removed\n");
5877
5878error:
5879 DeleteFileA("msitest\\original.txt");
5880 DeleteFileA("msitest\\original2.txt");
5881 DeleteFileA("msitest\\original3.txt");
5884}
static const msi_table rd_tables[]
Definition: action.c:2237

Referenced by START_TEST().

◆ test_remove_existing_products()

static void test_remove_existing_products ( void  )
static

Definition at line 6497 of file action.c.

6498{
6499 UINT r;
6500
6501 if (is_process_limited())
6502 {
6503 skip("process is limited\n");
6504 return;
6505 }
6506
6508 create_file("msitest\\rep.txt", 1000);
6510
6512
6515 {
6516 skip("Not enough rights to perform tests\n");
6517 goto error;
6518 }
6519 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6520
6521 r = MsiInstallProductA(msifile, "REMOVE=ALL");
6522 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
6523
6524 ok(!delete_pf("msitest\\rep.txt", TRUE), "file not removed\n");
6525 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
6526
6527error:
6528 DeleteFileA("msitest\\rep.txt");
6531}
static const msi_table rep_tables[]
Definition: action.c:2360

Referenced by START_TEST().

◆ test_remove_files()

static void test_remove_files ( void  )
static

Definition at line 4488 of file action.c.

4489{
4490 UINT r;
4491
4492 if (is_process_limited())
4493 {
4494 skip("process is limited\n");
4495 return;
4496 }
4497
4498 CreateDirectoryA("msitest", NULL);
4499 create_file("msitest\\hydrogen", 500);
4500 create_file("msitest\\helium", 500);
4501 create_file("msitest\\lithium", 500);
4502
4504
4506
4509 {
4510 skip("Not enough rights to perform tests\n");
4511 goto error;
4512 }
4513 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4514 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
4515 ok(!pf_exists("msitest\\helium"), "File installed\n");
4516 ok(pf_exists("msitest\\lithium"), "File not installed\n");
4517 ok(pf_exists("msitest"), "File not installed\n");
4518
4519 r = MsiInstallProductA(msifile, "REMOVE=ALL");
4520 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4521 ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
4522 ok(!pf_exists("msitest\\helium"), "File not deleted\n");
4523 ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
4524 ok(delete_pf("msitest", FALSE), "Directory deleted\n");
4525
4526 create_pf("msitest", FALSE);
4527 create_pf("msitest\\hydrogen", TRUE);
4528 create_pf("msitest\\helium", TRUE);
4529 create_pf("msitest\\lithium", TRUE);
4530
4532 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4533 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
4534 ok(pf_exists("msitest\\helium"), "File not installed\n");
4535 ok(pf_exists("msitest\\lithium"), "File not installed\n");
4536 ok(pf_exists("msitest"), "File not installed\n");
4537
4538 r = MsiInstallProductA(msifile, "REMOVE=ALL");
4539 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4540 ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
4541 ok(delete_pf("msitest\\helium", TRUE), "File deleted\n");
4542 ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
4543 ok(delete_pf("msitest", FALSE), "Directory deleted\n");
4544
4545 create_pf("msitest", FALSE);
4546 create_pf("msitest\\furlong", TRUE);
4547 create_pf("msitest\\firkin", TRUE);
4548 create_pf("msitest\\fortnight", TRUE);
4549 create_pf("msitest\\becquerel", TRUE);
4550 create_pf("msitest\\dioptre", TRUE);
4551 create_pf("msitest\\attoparsec", TRUE);
4552 create_pf("msitest\\storeys", TRUE);
4553 create_pf("msitest\\block", TRUE);
4554 create_pf("msitest\\siriometer", TRUE);
4555 create_pf("msitest\\cabout", FALSE);
4556 create_pf("msitest\\cabout\\blocker", TRUE);
4557
4559 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4560 ok(pf_exists("msitest\\hydrogen"), "File not installed\n");
4561 ok(!pf_exists("msitest\\helium"), "File installed\n");
4562 ok(pf_exists("msitest\\lithium"), "File not installed\n");
4563 ok(!pf_exists("msitest\\furlong"), "File not deleted\n");
4564 ok(!pf_exists("msitest\\firkin"), "File not deleted\n");
4565 ok(!pf_exists("msitest\\fortnight"), "File not deleted\n");
4566 ok(pf_exists("msitest\\becquerel"), "File not installed\n");
4567 ok(pf_exists("msitest\\dioptre"), "File not installed\n");
4568 ok(pf_exists("msitest\\attoparsec"), "File not installed\n");
4569 ok(!pf_exists("msitest\\storeys"), "File not deleted\n");
4570 ok(!pf_exists("msitest\\block"), "File not deleted\n");
4571 ok(!pf_exists("msitest\\siriometer"), "File not deleted\n");
4572 ok(pf_exists("msitest\\cabout"), "Directory removed\n");
4573 ok(pf_exists("msitest"), "File not installed\n");
4574
4575 create_pf("msitest\\furlong", TRUE);
4576 create_pf("msitest\\firkin", TRUE);
4577 create_pf("msitest\\fortnight", TRUE);
4578 create_pf("msitest\\storeys", TRUE);
4579 create_pf("msitest\\block", TRUE);
4580 create_pf("msitest\\siriometer", TRUE);
4581
4582 r = MsiInstallProductA(msifile, "REMOVE=ALL");
4583 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4584 ok(!delete_pf("msitest\\hydrogen", TRUE), "File not deleted\n");
4585 ok(!delete_pf("msitest\\helium", TRUE), "File not deleted\n");
4586 ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
4587 ok(delete_pf("msitest\\furlong", TRUE), "File deleted\n");
4588 ok(delete_pf("msitest\\firkin", TRUE), "File deleted\n");
4589 ok(delete_pf("msitest\\fortnight", TRUE), "File deleted\n");
4590 ok(!delete_pf("msitest\\becquerel", TRUE), "File not deleted\n");
4591 ok(!delete_pf("msitest\\dioptre", TRUE), "File not deleted\n");
4592 ok(delete_pf("msitest\\attoparsec", TRUE), "File deleted\n");
4593 ok(!delete_pf("msitest\\storeys", TRUE), "File not deleted\n");
4594 ok(!delete_pf("msitest\\block", TRUE), "File not deleted\n");
4595 ok(delete_pf("msitest\\siriometer", TRUE), "File deleted\n");
4596 ok(pf_exists("msitest\\cabout"), "Directory deleted\n");
4597 ok(pf_exists("msitest"), "Directory deleted\n");
4598
4600 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4601 ok(delete_pf("msitest\\hydrogen", TRUE), "File not installed\n");
4602 ok(!delete_pf("msitest\\helium", TRUE), "File installed\n");
4603 ok(delete_pf("msitest\\lithium", TRUE), "File not installed\n");
4604 ok(pf_exists("msitest\\cabout"), "Directory deleted\n");
4605 ok(pf_exists("msitest"), "Directory deleted\n");
4606
4607 delete_pf("msitest\\cabout\\blocker", TRUE);
4608
4609 r = MsiInstallProductA(msifile, "REMOVE=ALL");
4610 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4611 ok(!delete_pf("msitest\\cabout", FALSE), "Directory not deleted\n");
4612 delete_pf("msitest", FALSE);
4613
4614error:
4616 DeleteFileA("msitest\\hydrogen");
4617 DeleteFileA("msitest\\helium");
4618 DeleteFileA("msitest\\lithium");
4619 RemoveDirectoryA("msitest");
4620}
static const msi_table rem_tables[]
Definition: action.c:2027
#define create_pf(file, is_file)
Definition: install.c:4063

Referenced by START_TEST().

◆ test_self_registration()

static void test_self_registration ( void  )
static

Definition at line 5416 of file action.c.

5417{
5418 HKEY key;
5419 UINT r;
5420
5421 if (is_process_limited())
5422 {
5423 skip("process is limited\n");
5424 return;
5425 }
5426
5428 extract_resource("selfreg.dll", "TESTDLL", "msitest\\selfreg.dll");
5430
5432
5435 {
5436 skip("Not enough rights to perform tests\n");
5437 goto error;
5438 }
5439 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5440
5441 r = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
5442 ok(!r, "got %u\n", r);
5444
5445 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5446 ok(!r, "got %u\n", r);
5447
5448 r = RegOpenKeyA(HKEY_CLASSES_ROOT, "selfreg_test", &key);
5449 ok(r == ERROR_FILE_NOT_FOUND, "got %u\n", r);
5450
5451 ok(!delete_pf("msitest\\selfreg.dll", TRUE), "file not removed\n");
5452 ok(!delete_pf("msitest", FALSE), "directory not removed\n");
5453
5454error:
5455 DeleteFileA("msitest\\selfreg.dll");
5458}
static const msi_table sr_tables[]
Definition: action.c:2138

Referenced by START_TEST().

◆ test_start_stop_services()

static void test_start_stop_services ( void  )
static

Definition at line 5148 of file action.c.

5149{
5150 UINT r;
5151 SC_HANDLE scm, service;
5152 BOOL ret;
5154
5156 if (!scm && GetLastError() == ERROR_ACCESS_DENIED)
5157 {
5158 skip("Not enough rights to perform tests\n");
5159 return;
5160 }
5161 ok(scm != NULL, "Failed to open the SC Manager\n");
5162 if (!scm) return;
5163
5164 service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
5165 if (!service && GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST)
5166 {
5167 win_skip("The 'Spooler' service does not exist\n");
5168 CloseServiceHandle(scm);
5169 return;
5170 }
5171 ok(service != NULL, "Failed to open Spooler, error %lu\n", GetLastError());
5172 if (!service) {
5173 CloseServiceHandle(scm);
5174 return;
5175 }
5176
5177 ret = StartServiceA(service, 0, NULL);
5179 {
5180 skip("Spooler service not available, skipping test\n");
5181 CloseServiceHandle(service);
5182 CloseServiceHandle(scm);
5183 return;
5184 }
5185
5186 CloseServiceHandle(service);
5187 CloseServiceHandle(scm);
5188
5191
5193
5195 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5196
5197 if (error == ERROR_SUCCESS)
5198 {
5200
5202 service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
5203
5205 ok(ret, "ControlService failed %lu\n", GetLastError());
5206
5207 CloseServiceHandle(service);
5208 CloseServiceHandle(scm);
5209 }
5210
5211 r = MsiInstallProductA(msifile, "REMOVE=ALL");
5212 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5213
5214 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
5215 ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
5216 ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
5217 ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
5218 ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
5219 ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
5220 ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
5221 ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
5222 ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
5223 ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
5224 ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
5225 ok(delete_pf("msitest\\service2.exe", TRUE), "File not installed\n");
5226 ok(delete_pf("msitest", FALSE), "Directory not created\n");
5227
5228 if (error == ERROR_SUCCESS)
5229 {
5231
5233 service = OpenServiceA(scm, "Spooler", SC_MANAGER_ALL_ACCESS);
5234
5236 ok(ret, "ControlService failed %lu\n", GetLastError());
5237
5238 CloseServiceHandle(service);
5239 CloseServiceHandle(scm);
5240 }
5241
5244}
static const msi_table sss_tables[]
Definition: action.c:2095
BOOL WINAPI StartServiceA(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCSTR *lpServiceArgVectors)
Definition: scm.c:2942
BOOL WINAPI ControlService(SC_HANDLE hService, DWORD dwControl, LPSERVICE_STATUS lpServiceStatus)
Definition: scm.c:622
#define ERROR_SERVICE_ALREADY_RUNNING
Definition: winerror.h:607
#define SERVICE_CONTROL_STOP
Definition: winsvc.h:36

Referenced by START_TEST().

◆ test_validate_product_id()

static void test_validate_product_id ( void  )
static

Definition at line 5516 of file action.c.

5517{
5518 UINT r;
5519
5520 if (is_process_limited())
5521 {
5522 skip("process is limited\n");
5523 return;
5524 }
5525
5528
5530
5533 {
5534 skip("Not enough rights to perform tests\n");
5535 goto error;
5536 }
5537 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5538
5539 r = MsiInstallProductA(msifile, "SET_PRODUCT_ID=1");
5540 ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
5541
5542 r = MsiInstallProductA(msifile, "SET_PRODUCT_ID=2");
5543 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
5544
5545 r = MsiInstallProductA(msifile, "PIDKEY=123-1234567");
5546 ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
5547
5548 ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
5549 ok(delete_pf("msitest\\cabout\\new", FALSE), "Directory not created\n");
5550 ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
5551 ok(delete_pf("msitest\\cabout", FALSE), "Directory not created\n");
5552 ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
5553 ok(delete_pf("msitest\\changed", FALSE), "Directory not created\n");
5554 ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
5555 ok(delete_pf("msitest\\first", FALSE), "Directory not created\n");
5556 ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
5557 ok(delete_pf("msitest\\one.txt", TRUE), "File not installed\n");
5558 ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
5559 ok(delete_pf("msitest\\service2.exe", TRUE), "File not installed\n");
5560 ok(delete_pf("msitest", FALSE), "Directory not created\n");
5561
5562error:
5565}
static const msi_table vp_tables[]
Definition: action.c:2166
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961

Referenced by START_TEST().

◆ test_write_registry_values()

static void test_write_registry_values ( void  )
static

Definition at line 4808 of file action.c.

4809{
4810 HKEY hkey, subkey;
4811 DWORD type, size;
4812 char buf[20];
4813 LONG res;
4814 UINT r;
4815
4816 if (is_process_limited())
4817 {
4818 skip("process is limited\n");
4819 return;
4820 }
4821
4822 CreateDirectoryA("msitest", NULL);
4823
4825
4827
4828 res = RegCreateKeyA(HKEY_CURRENT_USER, "msitest", &hkey);
4829 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4830
4831 res = RegSetValueExA(hkey, "Value1", 0, REG_MULTI_SZ, (const BYTE *)"two\0", 5);
4832 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4833 res = RegSetValueExA(hkey, "Value2", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5);
4834 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4835 res = RegSetValueExA(hkey, "Value3", 0, REG_MULTI_SZ, (const BYTE *)"two\0", 5);
4836 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4837 res = RegSetValueExA(hkey, "Value4", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5);
4838 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4839 res = RegSetValueExA(hkey, "Value5", 0, REG_MULTI_SZ, (const BYTE *)"one\0two\0", 9);
4840 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4841 res = RegSetValueExA(hkey, "Value6", 0, REG_MULTI_SZ, (const BYTE *)"one\0", 5);
4842 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4843 res = RegSetValueExA(hkey, "Value7", 0, REG_SZ, (const BYTE *)"one", 4);
4844 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4845
4846 res = RegSetValueExA(hkey, "instremove", 0, REG_SZ, (const BYTE *)"val", 3);
4847 ok(!res, "got %ld\n", res);
4848
4849 res = RegCreateKeyA(hkey, "instremove", &subkey);
4850 ok(!res, "got %ld\n", res);
4851 RegCloseKey(subkey);
4852
4855 {
4856 skip("Not enough rights to perform tests\n");
4857 goto error;
4858 }
4859 ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
4860
4861 CHECK_REG_STR(hkey, "sz", "string");
4862 CHECK_REG_MULTI(hkey, "multisz", "one\0two\0three\0");
4863 CHECK_REG_DWORD(hkey, "dword", 123);
4864
4865 size = sizeof(buf);
4866 res = RegQueryValueExA(hkey, "expandsz", NULL, &type, (BYTE *)buf, &size);
4867 ok(!res, "got %ld\n", res);
4868 ok(type == REG_EXPAND_SZ, "got %ld\n", type);
4869 ok(!strcmp(buf, "string"), "got %s\n", buf);
4870
4871 size = sizeof(buf);
4872 res = RegQueryValueExA(hkey, "binary", NULL, &type, (BYTE *)buf, &size);
4873 ok(!res, "got %ld\n", res);
4874 ok(type == REG_BINARY, "got %ld\n", type);
4875 ok(size == 4, "got size %lu\n", size);
4876 ok(!memcmp(buf, "\x01\x23\x45\x67", 4), "wrong data\n");
4877
4878 CHECK_REG_STR(hkey, "", "default");
4879
4880 res = RegOpenKeyA(hkey, "VisualStudio", &subkey);
4881 ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", res);
4882 RegCloseKey(subkey);
4883
4884 CHECK_REG_MULTI(hkey, "Value1", "one\0");
4885 CHECK_REG_MULTI(hkey, "Value2", "one\0two\0");
4886 CHECK_REG_MULTI(hkey, "Value3", "one\0two\0");
4887 CHECK_REG_MULTI(hkey, "Value4", "one\0two\0");
4888 CHECK_REG_MULTI(hkey, "Value5", "one\0two\0three\0");
4889 CHECK_REG_MULTI(hkey, "Value6", "");
4890 CHECK_REG_MULTI(hkey, "Value7", "two\0");
4891
4892 CHECK_REG_DWORD(hkey, "format", 1);
4893 CHECK_REG_DWORD(hkey, "source", 1);
4894
4895 res = RegOpenKeyA(hkey, "subkey", &subkey);
4896 ok(!res, "got %ld\n", res);
4897 res = RegQueryValueExA(subkey, "", NULL, NULL, NULL, NULL);
4898 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4899 RegCloseKey(subkey);
4900
4901 res = RegOpenKeyA(hkey, "create", &subkey);
4902 ok(!res, "got %ld\n", res);
4903 RegCloseKey(subkey);
4904
4905 res = RegOpenKeyA(hkey, "delete", &subkey);
4906 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4907 res = RegCreateKeyA(hkey, "delete", &subkey);
4908 ok(!res, "got %ld\n", res);
4909 RegCloseKey(subkey);
4910
4911 res = RegQueryValueExA(hkey, "instremove", NULL, NULL, NULL, NULL);
4912 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4913 res = RegOpenKeyA(hkey, "instremove", &subkey);
4914 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4915
4916 r = MsiInstallProductA(msifile, "REMOVE=ALL");
4917 ok(!r, "got %u\n", r);
4918
4919 res = RegQueryValueExA(hkey, "sz", NULL, NULL, NULL, NULL);
4920 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4921 res = RegQueryValueExA(hkey, "multisz", NULL, NULL, NULL, NULL);
4922 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4923 res = RegQueryValueExA(hkey, "dword", NULL, NULL, NULL, NULL);
4924 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4925 res = RegQueryValueExA(hkey, "expandsz", NULL, NULL, NULL, NULL);
4926 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4927 res = RegQueryValueExA(hkey, "binary", NULL, NULL, NULL, NULL);
4928 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4929 res = RegQueryValueExA(hkey, "", NULL, NULL, NULL, NULL);
4930 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4931
4932 res = RegOpenKeyA(hkey, "VisualStudio", &subkey);
4933 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4934
4935 res = RegQueryValueExA(hkey, "Value1", NULL, NULL, NULL, NULL);
4936 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4937 res = RegQueryValueExA(hkey, "Value4", NULL, NULL, NULL, NULL);
4938 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4939 res = RegQueryValueExA(hkey, "Value5", NULL, NULL, NULL, NULL);
4940 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4941 res = RegQueryValueExA(hkey, "Value6", NULL, NULL, NULL, NULL);
4942 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4943 res = RegQueryValueExA(hkey, "Value7", NULL, NULL, NULL, NULL);
4944 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4945
4946todo_wine {
4947 CHECK_REG_MULTI(hkey, "Value2", "one\0");
4948 CHECK_REG_MULTI(hkey, "Value3", "two\0");
4949}
4950
4951 res = RegQueryValueExA(hkey, "format", NULL, NULL, NULL, NULL);
4952 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4953 res = RegQueryValueExA(hkey, "source", NULL, NULL, NULL, NULL);
4954 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4955
4956 res = RegOpenKeyA(hkey, "subkey", &subkey);
4957 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4958
4959 res = RegOpenKeyA(hkey, "create", &subkey);
4960 ok(!res, "got %ld\n", res);
4961 RegCloseKey(subkey);
4962 res = RegDeleteKeyA(hkey, "create");
4963 ok(!res, "got %ld\n", res);
4964
4965 res = RegOpenKeyA(hkey, "delete", &subkey);
4966 ok(res == ERROR_FILE_NOT_FOUND, "got %ld\n", res);
4967
4968 RegCloseKey(hkey);
4969 res = RegDeleteKeyA(HKEY_CURRENT_USER, "msitest");
4970 ok(!res, "got %ld\n", res);
4971
4972error:
4974 RemoveDirectoryA("msitest");
4975}
static const msi_table wrv_tables[]
Definition: action.c:2067
#define REG_BINARY
Definition: nt_native.h:1496

Referenced by START_TEST().

◆ UINT()

static UINT ( WINAPI pMsiQueryComponentStateA)
static

Variable Documentation

◆ cf_component_dat

const char cf_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"One\t{F8CD42AC-9C38-48FE-8664-B35FD121012A}\tFIRSTDIR\t0\t\tone.txt\n"
"Two\t{DE2DB02E-2DDF-4E34-8CF6-DCA13E29DF52}\tSECONDDIR\t0\t\ttwo.txt\n"

Definition at line 739 of file action.c.

◆ cf_create_folders_dat

const char cf_create_folders_dat[]
static
Initial value:
=
"Directory_\tComponent_\n"
"s72\ts72\n"
"CreateFolder\tDirectory_\tComponent_\n"
"FIRSTDIR\tOne\n"
"SECONDDIR\tTwo\n"
"THIRDDIR\tTwo\n"

Definition at line 767 of file action.c.

◆ cf_custom_action_dat

const char cf_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"ifi_immediate\t1\tcustom.dll\tfile_absent\n"
"ifi_deferred\t1025\tcustom.dll\tfile_present\n"
"rfi_immediate\t1\tcustom.dll\tfile_present\n"
"rfi_deferred\t1025\tcustom.dll\tfile_absent\n"
"cf_immediate\t1\tcustom.dll\tcf_absent\n"
"cf_deferred\t1025\tcustom.dll\tcf_present\n"
"rf_immediate\t1\tcustom.dll\tcf_present\n"
"rf_deferred\t1025\tcustom.dll\tcf_absent\n"

Definition at line 806 of file action.c.

◆ cf_directory_dat

const char cf_directory_dat[]
static
Initial value:
=
"Directory\tDirectory_Parent\tDefaultDir\n"
"s72\tS72\tl255\n"
"Directory\tDirectory\n"
"FIRSTDIR\tMSITESTDIR\tfirst\n"
"SECONDDIR\tMSITESTDIR\tsecond\n"
"THIRDDIR\tMSITESTDIR\tthird\n"
"MSITESTDIR\tProgramFilesFolder\tmsitest\n"
"ProgramFilesFolder\tTARGETDIR\t.\n"
"TARGETDIR\t\tSourceDir"

Definition at line 728 of file action.c.

◆ cf_feature_comp_dat

const char cf_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"One\tOne\n"
"Two\tTwo\n"

Definition at line 753 of file action.c.

◆ cf_feature_dat

const char cf_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"One\t\tOne\tThe One Feature\t1\t3\tFIRSTDIR\t0\n"
"Two\t\tTwo\tThe Two Feature\t1\t3\tSECONDDIR\t0\n"

Definition at line 746 of file action.c.

◆ cf_file_dat

const char cf_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"one.txt\tOne\tone.txt\t0\t\t\t0\t1\n"
"two.txt\tTwo\ttwo.txt\t0\t\t\t0\t2\n"

Definition at line 760 of file action.c.

◆ cf_install_exec_seq_dat

const char cf_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"CostFinalize\t\t1000\n"
"ValidateProductID\t\t700\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"RemoveFiles\t\t3500\n"
"rfi_immediate\tREMOVE\t3501\n"
"rfi_deferred\tREMOVE\t3502\n"
"CreateFolders\t\t3700\n"
"cf_immediate\tNOT REMOVE\t3701\n"
"cf_deferred\tNOT REMOVE\t3702\n"
"RemoveFolders\t\t3800\n"
"rf_immediate\tREMOVE\t3801\n"
"rf_deferred\tREMOVE\t3802\n"
"InstallFiles\t\t4000\n"
"ifi_immediate\tNOT REMOVE\t4001\n"
"ifi_deferred\tNOT REMOVE\t4002\n"
"RegisterUser\t\t6000\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6300\n"
"PublishProduct\t\t6400\n"
"InstallFinalize\t\t6600\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"UnpublishFeatures\t\t1800\n"
"InstallValidate\t\t1400\n"
"LaunchConditions\t\t100\n"

Definition at line 775 of file action.c.

◆ cf_tables

const msi_table cf_tables[]
static
Initial value:
=
{
ADD_TABLE(cf_component),
ADD_TABLE(cf_directory),
ADD_TABLE(cf_feature),
ADD_TABLE(cf_feature_comp),
ADD_TABLE(cf_file),
ADD_TABLE(cf_create_folders),
ADD_TABLE(cf_install_exec_seq),
ADD_TABLE(cf_custom_action),
}
#define ADD_TABLE(x)
Definition: automation.c:166

Definition at line 2081 of file action.c.

Referenced by test_create_remove_folder().

◆ ci2_feature_comp_dat

const char ci2_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"feature\taugustus"

Definition at line 419 of file action.c.

◆ ci2_file_dat

const char ci2_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"augustus\taugustus\taugustus\t500\t\t\t8192\t1"

Definition at line 425 of file action.c.

◆ component_dat

const char component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"Five\t{8CC92E9D-14B2-4CA4-B2AA-B11D02078087}\tNEWDIR\t2\t\tfive.txt\n"
"Four\t{FD37B4EA-7209-45C0-8917-535F35A2F080}\tCABOUTDIR\t2\t\tfour.txt\n"
"One\t{783B242E-E185-4A56-AF86-C09815EC053C}\tMSITESTDIR\t2\tNOT REINSTALL\tone.txt\n"
"Three\t{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}\tCHANGEDDIR\t2\t\tthree.txt\n"
"Two\t{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}\tFIRSTDIR\t2\t\ttwo.txt\n"
"dangler\t{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}\tTARGETDIR\t4\t\tregdata\n"
"component\t\tMSITESTDIR\t0\t1\tfile\n"
"service_comp\t{935A0A91-22A3-4F87-BCA8-928FFDFE2353}\tMSITESTDIR\t0\t\tservice_file\n"
"service_comp2\t{3F7B04A4-9521-4649-BDC9-0C8722740A49}\tMSITESTDIR\t0\t\tservice_file2\n"
"service_comp3\t{DBCD1502-20E3-423F-B53E-F37E263CDC7E}\tMSITESTDIR\t0\t\t\n"

Definition at line 70 of file action.c.

◆ crs_component_dat

const char crs_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"shortcut\t{5D20E3C6-7206-498F-AC28-87AF2F9AD4CC}\tMSITESTDIR\t0\t\ttarget.txt\n"

Definition at line 1172 of file action.c.

◆ crs_custom_action_dat

const char crs_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"cs_immediate\t1\tcustom.dll\tcrs_absent\n"
"cs_deferred\t1025\tcustom.dll\tcrs_present\n"
"rs_immediate\t1\tcustom.dll\tcrs_present\n"
"rs_deferred\t1025\tcustom.dll\tcrs_absent\n"

Definition at line 1209 of file action.c.

◆ crs_feature_comp_dat

const char crs_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"shortcut\tshortcut\n"

Definition at line 1166 of file action.c.

◆ crs_feature_dat

const char crs_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"shortcut\t\t\tshortcut feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1160 of file action.c.

◆ crs_file_dat

const char crs_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"target.txt\tshortcut\ttarget.txt\t1000\t\t\t8192\t1\n"

Definition at line 1154 of file action.c.

◆ crs_install_exec_seq_dat

const char crs_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"RemoveShortcuts\t\t3000\n"
"rs_immediate\tREMOVE\t3001\n"
"rs_deferred\tREMOVE\t3002\n"
"CreateShortcuts\t\t3100\n"
"cs_immediate\tNOT REMOVE\t3101\n"
"cs_deferred\tNOT REMOVE\t3102\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1184 of file action.c.

◆ crs_shortcut_dat

const char crs_shortcut_dat[]
static
Initial value:
=
"Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
"s72\ts72\tl128\ts72\ts72\tL255\tL255\tI2\tS72\tI2\tI2\tS72\n"
"Shortcut\tShortcut\n"
"shortcut\tMSITESTDIR\tshortcut\tshortcut\t[MSITESTDIR]target.txt\t\t\t\t\t\t\t\n"

Definition at line 1178 of file action.c.

◆ crs_tables

const msi_table crs_tables[]
static
Initial value:
=
{
ADD_TABLE(crs_component),
ADD_TABLE(crs_feature),
ADD_TABLE(crs_feature_comp),
ADD_TABLE(crs_file),
ADD_TABLE(crs_shortcut),
ADD_TABLE(crs_install_exec_seq),
ADD_TABLE(crs_custom_action),
}

Definition at line 2209 of file action.c.

Referenced by test_create_remove_shortcut().

◆ cwd_component_dat

const char cwd_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"augustus\t\tMSITESTDIR\t0\t\taugustus\n"

Definition at line 514 of file action.c.

◆ df_directory_dat

const char df_directory_dat[]
static
Initial value:
=
"Directory\tDirectory_Parent\tDefaultDir\n"
"s72\tS72\tl255\n"
"Directory\tDirectory\n"
"THIS\tMSITESTDIR\tthis\n"
"DOESNOT\tTHIS\tdoesnot\n"
"NONEXISTENT\tDOESNOT\texist\n"
"MSITESTDIR\tProgramFilesFolder\tmsitest\n"
"ProgramFilesFolder\tTARGETDIR\t.\n"
"TARGETDIR\t\tSourceDir"

Definition at line 624 of file action.c.

◆ df_duplicate_file_dat

const char df_duplicate_file_dat[]
static
Initial value:
=
"FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
"s72\ts72\ts72\tS255\tS72\n"
"DuplicateFile\tFileKey\n"
"maximus\tmaximus\tmaximus\taugustus\t\n"
"caesar\tmaximus\tmaximus\t\tNONEXISTENT\n"
"augustus\tnosuchcomponent\tmaximus\t\tMSITESTDIR\n"

Definition at line 635 of file action.c.

◆ df_tables

const msi_table df_tables[]
static
Initial value:
=
{
ADD_TABLE(rof_component),
ADD_TABLE(df_directory),
ADD_TABLE(rof_feature),
ADD_TABLE(rof_feature_comp),
ADD_TABLE(rof_file),
ADD_TABLE(install_exec_seq),
ADD_TABLE(rof_media),
ADD_TABLE(df_duplicate_file),
}

Definition at line 2054 of file action.c.

Referenced by test_duplicate_files().

◆ directory_dat

const char directory_dat[]
static
Initial value:
=
"Directory\tDirectory_Parent\tDefaultDir\n"
"s72\tS72\tl255\n"
"Directory\tDirectory\n"
"CABOUTDIR\tMSITESTDIR\tcabout\n"
"CHANGEDDIR\tMSITESTDIR\tchanged:second\n"
"FIRSTDIR\tMSITESTDIR\tfirst\n"
"MSITESTDIR\tProgramFilesFolder\tmsitest\n"
"NEWDIR\tCABOUTDIR\tnew\n"
"ProgramFilesFolder\tTARGETDIR\t.\n"
"TARGETDIR\t\tSourceDir"

Definition at line 85 of file action.c.

◆ DWORD

Definition at line 49 of file action.c.

◆ env_custom_action_dat

const char env_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"wes_immediate\t1\tcustom.dll\tenv_absent\n"
"wes_deferred\t1025\tcustom.dll\tenv_present\n"
"res_immediate\t1\tcustom.dll\tenv_present\n"
"res_deferred\t1025\tcustom.dll\tenv_absent\n"

Definition at line 213 of file action.c.

◆ env_environment_dat

const char env_environment_dat[]
static

Definition at line 222 of file action.c.

◆ env_install_exec_seq_dat

const char env_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"CostInitialize\t\t100\n"
"FileCost\t\t200\n"
"CostFinalize\t\t300\n"
"InstallValidate\t\t400\n"
"InstallInitialize\t\t500\n"
"ProcessComponents\t\t600\n"
"WriteEnvironmentStrings\t\t700\n"
"wes_immediate\tNOT REMOVE\t701\n"
"wes_deferred\tNOT REMOVE\t702\n"
"RemoveEnvironmentStrings\t\t800\n"
"res_immediate\tREMOVE\t801\n"
"res_deferred\tREMOVE\t802\n"
"RegisterProduct\t\t900\n"
"PublishFeatures\t\t1000\n"
"PublishProduct\t\t1100\n"
"UnpublishFeatures\t\t1150\n"
"InstallFinalize\t\t1200\n"

Definition at line 191 of file action.c.

◆ env_tables

const msi_table env_tables[]
static
Initial value:
=
{
ADD_TABLE(component),
ADD_TABLE(feature_comp),
ADD_TABLE(env_install_exec_seq),
ADD_TABLE(env_custom_action),
}
INTERNETFEATURELIST feature
Definition: misc.c:1719

Definition at line 1987 of file action.c.

Referenced by test_envvar().

◆ feature_comp_dat

const char feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"Five\tFive\n"
"Four\tFour\n"
"One\tOne\n"
"Three\tThree\n"
"Two\tTwo\n"
"feature\tcomponent\n"
"service_feature\tservice_comp\n"
"service_feature\tservice_comp2\n"
"service_feature\tservice_comp3"

Definition at line 109 of file action.c.

◆ feature_dat

const char feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"Five\t\tFive\tThe Five Feature\t5\t3\tNEWDIR\t0\n"
"Four\t\tFour\tThe Four Feature\t4\t3\tCABOUTDIR\t0\n"
"One\t\tOne\tThe One Feature\t1\t3\tMSITESTDIR\t0\n"
"Three\t\tThree\tThe Three Feature\t3\t3\tCHANGEDDIR\t0\n"
"Two\t\tTwo\tThe Two Feature\t2\t3\tFIRSTDIR\t0\n"
"feature\t\t\t\t2\t1\tTARGETDIR\t0\n"
"service_feature\t\t\t\t2\t1\tTARGETDIR\t0"

Definition at line 97 of file action.c.

◆ file_dat

const char file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"five.txt\tFive\tfive.txt\t1000\t\t\t16384\t5\n"
"four.txt\tFour\tfour.txt\t1000\t\t\t16384\t4\n"
"one.txt\tOne\tone.txt\t1000\t\t\t0\t1\n"
"three.txt\tThree\tthree.txt\t1000\t\t\t0\t3\n"
"two.txt\tTwo\ttwo.txt\t1000\t\t\t0\t2\n"
"file\tcomponent\tfilename\t100\t\t\t8192\t1\n"
"service_file\tservice_comp\tservice.exe\t100\t\t\t8192\t6\n"
"service_file2\tservice_comp2\tservice2.exe\t100\t\t\t8192\t7"

Definition at line 123 of file action.c.

◆ font_component_dat

const char font_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"fonts\t{F5920ED0-1183-4B8F-9330-86CE56557C05}\tMSITESTDIR\t0\t\tfont.ttf\n"

Definition at line 901 of file action.c.

◆ font_custom_action_dat

const char font_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rf_immediate\t1\tcustom.dll\tfont_absent\n"
"rf_deferred\t1025\tcustom.dll\tfont_present\n"
"uf_immediate\t1\tcustom.dll\tfont_present\n"
"uf_deferred\t1025\tcustom.dll\tfont_absent\n"

Definition at line 945 of file action.c.

◆ font_dat

const char font_dat[]
static
Initial value:
=
"File_\tFontTitle\n"
"s72\tS128\n"
"Font\tFile_\n"
"font.ttf\tmsi test font\n"

Definition at line 913 of file action.c.

◆ font_feature_comp_dat

const char font_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"fonts\tfonts\n"

Definition at line 907 of file action.c.

◆ font_feature_dat

const char font_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"fonts\t\t\tfont feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 895 of file action.c.

◆ font_file_dat

const char font_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"font.ttf\tfonts\tfont.ttf\t1000\t\t\t8192\t1\n"

Definition at line 889 of file action.c.

◆ font_install_exec_seq_dat

const char font_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"ValidateProductID\t\t700\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t3500\n"
"InstallFiles\t\t4000\n"
"RegisterFonts\t\t4100\n"
"rf_immediate\tNOT REMOVE\t4101\n"
"rf_deferred\tNOT REMOVE\t4102\n"
"UnregisterFonts\t\t4200\n"
"uf_immediate\tREMOVE\t4201\n"
"uf_deferred\tREMOVE\t4202\n"
"RegisterUser\t\t6000\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6300\n"
"PublishProduct\t\t6400\n"
"UnpublishFeatures\t\t6500\n"
"InstallFinalize\t\t6600"

Definition at line 919 of file action.c.

◆ font_media_dat

const char font_media_dat[]
static
Initial value:
=
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
"i2\ti4\tL64\tS255\tS32\tS72\n"
"Media\tDiskId\n"
"1\t3\t\t\tDISK1\t\n"

Definition at line 883 of file action.c.

◆ font_tables

const msi_table font_tables[]
static
Initial value:
=
{
ADD_TABLE(font_component),
ADD_TABLE(font_feature),
ADD_TABLE(font_feature_comp),
ADD_TABLE(font_file),
ADD_TABLE(font_install_exec_seq),
ADD_TABLE(font_custom_action),
ADD_TABLE(font_media),
}
Definition: mk_font.cpp:20

Definition at line 2152 of file action.c.

Referenced by test_register_font().

◆ frp_component_dat

const char frp_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"product\t{44725EE0-EEA8-40BD-8162-A48224A2FEA1}\tMSITESTDIR\t0\t\tproduct.txt\n"

Definition at line 1368 of file action.c.

◆ frp_custom_action_dat

const char frp_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\tISComments\n"
"s72\ti2\tS64\tS0\tS255\n"
"CustomAction\tAction\n"
"TestProp\t19\t\t\tPROP set\n"

Definition at line 1374 of file action.c.

◆ frp_feature_comp_dat

const char frp_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"product\tproduct\n"

Definition at line 1362 of file action.c.

◆ frp_feature_dat

const char frp_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"product\t\t\tproduct feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1356 of file action.c.

◆ frp_file_dat

const char frp_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"product.txt\tproduct\tproduct.txt\t1000\t\t\t8192\t1\n"

Definition at line 1350 of file action.c.

◆ frp_install_exec_seq_dat

const char frp_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"FindRelatedProducts\t\t50\n"
"TestProp\tPROP AND NOT REMOVE\t51\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1386 of file action.c.

◆ frp_tables

const msi_table frp_tables[]
static
Initial value:
=
{
ADD_TABLE(frp_component),
ADD_TABLE(frp_feature),
ADD_TABLE(frp_feature_comp),
ADD_TABLE(frp_file),
ADD_TABLE(frp_upgrade),
ADD_TABLE(frp_custom_action),
ADD_TABLE(frp_install_exec_seq),
}

Definition at line 2251 of file action.c.

Referenced by test_find_related_products().

◆ frp_upgrade_dat

const char frp_upgrade_dat[]
static
Initial value:
=
"UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
"s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
"Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
"{4C0EAA15-0264-4E5A-8758-609EF142B92D}\t1.1.1\t2.2.2\t\t768\t\tPROP\n"

Definition at line 1380 of file action.c.

◆ ini_component_dat

const char ini_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"inifile\t{A0F15705-4F57-4437-88C4-6C8B37ACC6DE}\tMSITESTDIR\t0\t\tinifile.txt\n"

Definition at line 1425 of file action.c.

◆ ini_custom_action_dat

const char ini_custom_action_dat[]
static
Initial value:
=
"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"

Definition at line 1468 of file action.c.

◆ ini_feature_comp_dat

const char ini_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"inifile\tinifile\n"

Definition at line 1419 of file action.c.

◆ ini_feature_dat

const char ini_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"inifile\t\t\tinifile feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1413 of file action.c.

◆ ini_file_dat

const char ini_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"inifile.txt\tinifile\tinifile.txt\t1000\t\t\t8192\t1\n"

Definition at line 1407 of file action.c.

◆ ini_ini_file_dat

const char ini_ini_file_dat[]
static
Initial value:
=
"IniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
"s72\tl255\tS72\tl96\tl128\tl255\ti2\ts72\n"
"IniFile\tIniFile\n"
"inifile1\ttest.ini\tMSITESTDIR\tsection1\tkey1\tvalue1\t0\tinifile\n"

Definition at line 1431 of file action.c.

◆ ini_install_exec_seq_dat

const char ini_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"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"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1443 of file action.c.

◆ ini_remove_ini_file_dat

const char ini_remove_ini_file_dat[]
static
Initial value:
=
"RemoveIniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_\n"
"s72\tl255\tS72\tl96\tl128\tL255\ti2\ts72\n"
"RemoveIniFile\tRemoveIniFile\n"
"inifile1\ttest.ini\tMSITESTDIR\tsectionA\tkeyA\tvalueA\t2\tinifile\n"

Definition at line 1437 of file action.c.

◆ ini_tables

const msi_table ini_tables[]
static
Initial value:
=
{
ADD_TABLE(ini_component),
ADD_TABLE(ini_feature),
ADD_TABLE(ini_feature_comp),
ADD_TABLE(ini_file),
ADD_TABLE(ini_ini_file),
ADD_TABLE(ini_remove_ini_file),
ADD_TABLE(ini_install_exec_seq),
ADD_TABLE(ini_custom_action),
}

Definition at line 2265 of file action.c.

Referenced by test_ini_values().

◆ install_exec_seq_dat

const char install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"AllocateRegistrySpace\tNOT Installed\t1550\n"
"CostFinalize\t\t1000\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"ResolveSource\t\t950\n"
"MoveFiles\t\t1700\n"
"InstallFiles\t\t4000\n"
"DuplicateFiles\t\t4500\n"
"CreateShortcuts\t\t4600\n"
"InstallServices\t\t5000\n"
"InstallFinalize\t\t6600\n"
"InstallInitialize\t\t1500\n"
"InstallValidate\t\t1400\n"
"LaunchConditions\t\t100\n"
"WriteRegistryValues\tSourceDir And SOURCEDIR\t5000"

Definition at line 136 of file action.c.

◆ is_64bit

const BOOL is_64bit = sizeof(void *) > sizeof(int)
static

Definition at line 64 of file action.c.

◆ is_wow64

STATEMGRSTATUS* static BOOL is_wow64
static

Definition at line 63 of file action.c.

◆ LPCSTR

Definition at line 47 of file action.c.

◆ LPDWORD

Definition at line 49 of file action.c.

◆ LPSTR

Definition at line 49 of file action.c.

◆ media_dat

const char media_dat[]
static
Initial value:
=
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
"i2\ti4\tL64\tS255\tS32\tS72\n"
"Media\tDiskId\n"
"1\t3\t\t\tDISK1\t\n"
"2\t7\t\tmsitest.cab\tDISK2\t\n"

Definition at line 156 of file action.c.

◆ mov_custom_action_dat

const char mov_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"mov_immediate\t1\tcustom.dll\tmov_absent\n"
"mov_deferred\t1025\tcustom.dll\tmov_present\n"

Definition at line 617 of file action.c.

◆ mov_install_exec_seq_dat

const char mov_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"CostInitialize\t\t100\n"
"FileCost\t\t200\n"
"ResolveSource\t\t300\n"
"CostFinalize\t\t400\n"
"InstallValidate\t\t500\n"
"InstallInitialize\t\t600\n"
"MoveFiles\t\t700\n"
"mov_immediate\t\t701\n"
"mov_deferred\t\t702\n"
"InstallFiles\t\t800\n"
"InstallFinalize\t\t900\n"

Definition at line 601 of file action.c.

◆ mov_move_file_dat

const char mov_move_file_dat[]
static
Initial value:
=
"FileKey\tComponent_\tSourceName\tDestName\tSourceFolder\tDestFolder\tOptions\n"
"s72\ts72\tS255\tS255\tS72\ts72\ti2\n"
"MoveFile\tFileKey\n"
"abkhazia\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t0\n"
"bahamas\taugustus\tnonexistent\tdest\tSourceDir\tMSITESTDIR\t1\n"
"cambodia\taugustus\tcameroon\tcanada\tSourceDir\tMSITESTDIR\t0\n"
"denmark\taugustus\tdjibouti\tdominica\tSourceDir\tMSITESTDIR\t1\n"
"ecuador\taugustus\tegypt\telsalvador\tNotAProp\tMSITESTDIR\t1\n"
"fiji\taugustus\tfinland\tfrance\tSourceDir\tNotAProp\t1\n"
"gabon\taugustus\tgambia\tgeorgia\tSOURCEFULL\tMSITESTDIR\t1\n"
"haiti\taugustus\thonduras\thungary\tSourceDir\tDESTFULL\t1\n"
"iceland\taugustus\tindia\tindonesia\tMSITESTDIR\tMSITESTDIR\t1\n"
"jamaica\taugustus\tjapan\tjordan\tFILEPATHBAD\tMSITESTDIR\t1\n"
"kazakhstan\taugustus\t\tkiribati\tFILEPATHGOOD\tMSITESTDIR\t1\n"
"laos\taugustus\tlatvia\tlebanon\tSourceDir\tMSITESTDIR\t1\n"
"namibia\taugustus\tnauru\tkiribati\tSourceDir\tMSITESTDIR\t1\n"
"pakistan\taugustus\tperu\tsfn|poland\tSourceDir\tMSITESTDIR\t1\n"
"wildcard\taugustus\tapp*\twildcard\tSourceDir\tMSITESTDIR\t1\n"
"single\taugustus\tf?o\tsingle\tSourceDir\tMSITESTDIR\t1\n"
"wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
"singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n"

Definition at line 578 of file action.c.

◆ mov_tables

const msi_table mov_tables[]
static
Initial value:
=
{
ADD_TABLE(cwd_component),
ADD_TABLE(rof_feature),
ADD_TABLE(ci2_feature_comp),
ADD_TABLE(ci2_file),
ADD_TABLE(mov_install_exec_seq),
ADD_TABLE(mov_custom_action),
ADD_TABLE(rof_media),
ADD_TABLE(mov_move_file),
}

Definition at line 2040 of file action.c.

Referenced by test_move_files().

◆ msifile

◆ MSIINSTALLCONTEXT

Definition at line 47 of file action.c.

◆ odbc_component_dat

const char odbc_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"odbc64\t{B6F3E4AF-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t256\tMsix64\tODBCdriver.dll\n"
"odbc\t{B6F3E4AE-35D1-4B72-9044-989F03E20A43}\tMSITESTDIR\t0\t\tODBCdriver.dll\n"

Definition at line 1021 of file action.c.

◆ odbc_custom_action_dat

const char odbc_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"io_immediate\t1\tcustom.dll\todbc_absent\n"
"io_deferred\t1025\tcustom.dll\todbc_present\n"
"ro_immediate\t1\tcustom.dll\todbc_present\n"
"ro_deferred\t1025\tcustom.dll\todbc_absent\n"

Definition at line 1075 of file action.c.

◆ odbc_datasource_dat

const char odbc_datasource_dat[]
static
Initial value:
=
"DataSource\tComponent_\tDescription\tDriverDescription\tRegistration\n"
"s72\ts72\ts255\ts255\ti2\n"
"ODBCDataSource\tDataSource\n"
"ODBC data source\todbc\tODBC data source\tODBC driver\t0\n"

Definition at line 1044 of file action.c.

◆ odbc_driver_dat

const char odbc_driver_dat[]
static
Initial value:
=
"Driver\tComponent_\tDescription\tFile_\tFile_Setup\n"
"s72\ts72\ts255\ts72\tS72\n"
"ODBCDriver\tDriver\n"
"64-bit driver\todbc64\tODBC test driver\tODBCdriver.dll\t\n"
"64-bit driver2\todbc64\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n"
"ODBC test driver\todbc\tODBC test driver\tODBCdriver.dll\t\n"
"ODBC test driver2\todbc\tODBC test driver2\tODBCdriver2.dll\tODBCsetup.dll\n"

Definition at line 1028 of file action.c.

◆ odbc_feature_comp_dat

const char odbc_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"odbc\todbc64\n"
"odbc\todbc\n"

Definition at line 1014 of file action.c.

◆ odbc_feature_dat

const char odbc_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"odbc\t\t\todbc feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1008 of file action.c.

◆ odbc_file_dat

const char odbc_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"ODBCdriver.dll\todbc\tODBCdriver.dll\t1000\t\t\t8192\t1\n"
"ODBCdriver2.dll\todbc\tODBCdriver2.dll\t1000\t\t\t8192\t2\n"
"ODBCtranslator.dll\todbc\tODBCtranslator.dll\t1000\t\t\t8192\t3\n"
"ODBCtranslator2.dll\todbc\tODBCtranslator2.dll\t1000\t\t\t8192\t4\n"
"ODBCsetup.dll\todbc\tODBCsetup.dll\t1000\t\t\t8192\t5\n"

Definition at line 998 of file action.c.

◆ odbc_install_exec_seq_dat

const char odbc_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"InstallODBC\t\t3000\n"
"io_immediate\tNOT REMOVE\t3001\n"
"io_deferred\tNOT REMOVE\t3002\n"
"RemoveODBC\t\t3100\n"
"ro_immediate\tREMOVE\t3101\n"
"ro_deferred\tREMOVE\t3102\n"
"RemoveFiles\t\t3900\n"
"InstallFiles\t\t4000\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1050 of file action.c.

◆ odbc_media_dat

const char odbc_media_dat[]
static
Initial value:
=
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
"i2\ti4\tL64\tS255\tS32\tS72\n"
"Media\tDiskId\n"
"1\t5\t\t\tDISK1\t\n"

Definition at line 1084 of file action.c.

◆ odbc_tables

const msi_table odbc_tables[]
static
Initial value:
=
{
ADD_TABLE(odbc_component),
ADD_TABLE(odbc_feature),
ADD_TABLE(odbc_feature_comp),
ADD_TABLE(odbc_file),
ADD_TABLE(odbc_driver),
ADD_TABLE(odbc_translator),
ADD_TABLE(odbc_datasource),
ADD_TABLE(odbc_install_exec_seq),
ADD_TABLE(odbc_custom_action),
ADD_TABLE(odbc_media),
}

Definition at line 2179 of file action.c.

Referenced by test_install_remove_odbc().

◆ odbc_translator_dat

const char odbc_translator_dat[]
static
Initial value:
=
"Translator\tComponent_\tDescription\tFile_\tFile_Setup\n"
"s72\ts72\ts255\ts72\tS72\n"
"ODBCTranslator\tTranslator\n"
"ODBC test translator\todbc\tODBC test translator\tODBCtranslator.dll\t\n"
"ODBC test translator2\todbc\tODBC test translator2\tODBCtranslator2.dll\tODBCsetup.dll\n"

Definition at line 1037 of file action.c.

◆ pa_component_dat

const char pa_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"fake_local\t{F515549D-7E61-425D-AAC1-9BEF2E066D06}\tMSITESTDIR\t0\t\tfake_local.txt\n"
"win32\t{F515549E-7E61-425D-AAC1-9BEF2E066D06}\tMSITESTDIR\t0\t\twin32.txt\n"
"win32_local\t{D34D3FBA-6789-4E57-AD1A-1281297DC201}\tMSITESTDIR\t0\t\twin32_local.txt\n"
"dotnet\t{8943164F-2B31-4C09-A894-493A8CBDE0A4}\tMSITESTDIR\t0\t\tdotnet.txt\n"
"dotnet_local\t{4E8567E8-8EAE-4E36-90F1-B99D33C663F8}\tMSITESTDIR\t0\t\tdotnet_local.txt\n"

Definition at line 1834 of file action.c.

◆ pa_custom_action_dat

const char pa_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"pa_immediate\t1\tcustom.dll\tpa_absent\n"
"pa_deferred\t1025\tcustom.dll\tpa_present\n"
"ua_immediate\t1\tcustom.dll\tpa_present\n"
"ua_deferred\t1025\tcustom.dll\tpa_absent\n"

Definition at line 1907 of file action.c.

◆ pa_feature_comp_dat

const char pa_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"assembly\tfake_local\n"
"assembly\twin32\n"
"assembly\twin32_local\n"
"assembly\tdotnet\n"
"assembly\tdotnet_local\n"

Definition at line 1824 of file action.c.

◆ pa_feature_dat

const char pa_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"assembly\t\t\tassembly feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1818 of file action.c.

◆ pa_file_dat

const char pa_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"fake_local.txt\tfake_local\tfake_local.txt\t1000\t\t\t8192\t1\n"
"win32.txt\twin32\twin32.txt\t1000\t\t\t8192\t1\n"
"manifest.txt\twin32\tmanifest.txt\t1000\t\t\t8192\t1\n"
"win32_local.txt\twin32_local\twin32_local.txt\t1000\t\t\t8192\t1\n"
"manifest_local.txt\twin32_local\tmanifest_local.txt\t1000\t\t\t8192\t1\n"
"dotnet.txt\tdotnet\tdotnet.txt\t1000\t\t\t8192\t1\n"
"dotnet_local.txt\tdotnet_local\tdotnet_local.txt\t1000\t\t\t8192\t1\n"
"application_win32.txt\twin32_local\tapplication_win32.txt\t1000\t\t\t8192\t1\n"
"application_dotnet.txt\tdotnet_local\tapplication_dotnet.txt\t1000\t\t\t8192\t1\n"

Definition at line 1804 of file action.c.

◆ pa_install_exec_seq_dat

const char pa_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"MsiPublishAssemblies\t\t3000\n"
"pa_immediate\tNOT REMOVE AND NOT ALLUSERS\t3001\n"
"pa_deferred\tNOT REMOVE AND NOT ALLUSERS\t3002\n"
"MsiUnpublishAssemblies\t\t4000\n"
"ua_immediate\tREMOVE AND NOT ALLUSERS\t4001\n"
"ua_deferred\tREMOVE AND NOT ALLUSERS\t4002\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1884 of file action.c.

◆ pa_msi_assembly_dat

const char pa_msi_assembly_dat[]
static
Initial value:
=
"Component_\tFeature_\tFile_Manifest\tFile_Application\tAttributes\n"
"s72\ts38\tS72\tS72\tI2\n"
"MsiAssembly\tComponent_\n"
"fake_local\tassembly\t\tnonexistent.txt\t0\n"
"win32\tassembly\tmanifest.txt\t\t1\n"
"win32_local\tassembly\tmanifest_local.txt\tapplication_win32.txt\t1\n"
"dotnet\tassembly\t\t\t0\n"
"dotnet_local\tassembly\t\tapplication_dotnet.txt\t0\n"

Definition at line 1844 of file action.c.

◆ pa_msi_assembly_name_dat

const char pa_msi_assembly_name_dat[]
static
Initial value:
=
"Component_\tName\tValue\n"
"s72\ts255\ts255\n"
"MsiAssemblyName\tComponent_\tName\n"
"fake_local\tName\tWine.Fake.Application.Assembly\n"
"fake_local\tprocessorArchitecture\tx86\n"
"fake_local\tpublicKeyToken\tabcdef0123456789\n"
"fake_local\ttype\twin32\n"
"fake_local\tversion\t1.0.0.0\n"
"win32\tName\tWine.Win32.Assembly\n"
"win32\tprocessorArchitecture\tx86\n"
"win32\tpublicKeyToken\tabcdef0123456789\n"
"win32\ttype\twin32\n"
"win32\tversion\t1.0.0.0\n"
"win32_local\tName\tWine.Win32.Local.Assembly\n"
"win32_local\tprocessorArchitecture\tx86\n"
"win32_local\tpublicKeyToken\tabcdef0123456789\n"
"win32_local\ttype\twin32\n"
"win32_local\tversion\t1.0.0.0\n"
"dotnet\tName\tWine.Dotnet.Assembly\n"
"dotnet\tprocessorArchitecture\tMSIL\n"
"dotnet\tpublicKeyToken\tabcdef0123456789\n"
"dotnet\tculture\tneutral\n"
"dotnet\tversion\t1.0.0.0\n"
"dotnet_local\tName\tWine.Dotnet.Local.Assembly\n"
"dotnet_local\tprocessorArchitecture\tMSIL\n"
"dotnet_local\tpublicKeyToken\tabcdef0123456789\n"
"dotnet_local\tculture\tneutral\n"
"dotnet_local\tversion\t1.0.0.0\n"

Definition at line 1854 of file action.c.

◆ pa_tables

const msi_table pa_tables[]
static
Initial value:
=
{
ADD_TABLE(pa_component),
ADD_TABLE(pa_feature),
ADD_TABLE(pa_feature_comp),
ADD_TABLE(pa_file),
ADD_TABLE(pa_msi_assembly),
ADD_TABLE(pa_msi_assembly_name),
ADD_TABLE(pa_install_exec_seq),
ADD_TABLE(pa_custom_action),
}

Definition at line 2345 of file action.c.

Referenced by test_publish_assemblies().

◆ PBOOL

Definition at line 58 of file action.c.

◆ pp_component_dat

const char pp_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\t\tmaximus\n"

Definition at line 480 of file action.c.

◆ pp_custom_action_dat

const char pp_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"pf_immediate\t1\tcustom.dll\tpf_absent\n"
"pf_deferred\t1025\tcustom.dll\tpf_present\n"
"uf_immediate\t1\tcustom.dll\tpf_present\n"
"uf_deferred\t1025\tcustom.dll\tpf_absent\n"
"pp_immediate\t1\tcustom.dll\tpp_absent\n"
"pp_deferred\t1025\tcustom.dll\tpp_present\n"
"rp_immediate\t1\tcustom.dll\trp_absent\n"
"rp_deferred\t1025\tcustom.dll\trp_present\n"
"ru_immediate\t1\tcustom.dll\tru_absent\n"
"ru_deferred\t1025\tcustom.dll\tru_present\n"
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
"ppc_deferred\t1025\tcustom.dll\tppc_present\n"

Definition at line 463 of file action.c.

◆ pp_install_exec_seq_dat

const char pp_install_exec_seq_dat[]
static

Definition at line 431 of file action.c.

◆ pp_tables

const msi_table pp_tables[]
static
Initial value:
=
{
ADD_TABLE(pp_component),
ADD_TABLE(rof_feature),
ADD_TABLE(rof_feature_comp),
ADD_TABLE(rof_file),
ADD_TABLE(pp_install_exec_seq),
ADD_TABLE(pp_custom_action),
ADD_TABLE(rof_media),
}

Definition at line 2001 of file action.c.

Referenced by test_publish(), test_publish_features(), test_publish_product(), test_publish_sourcelist(), test_register_product(), and test_register_user().

◆ ppc_component_dat

const char ppc_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"maximus\t{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}\tMSITESTDIR\t0\t\tmaximus\n"
"augustus\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\taugustus\n"

Definition at line 486 of file action.c.

◆ ppc_feature_comp_dat

const char ppc_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"feature\tmaximus\n"
"feature\taugustus\n"
"montecristo\tmaximus"

Definition at line 506 of file action.c.

◆ ppc_file_dat

const char ppc_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"maximus\tmaximus\tmaximus\t500\t\t\t8192\t1\n"
"augustus\taugustus\taugustus\t500\t\t\t8192\t2"

Definition at line 493 of file action.c.

◆ ppc_media_dat

const char ppc_media_dat[]
static
Initial value:
=
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
"i2\ti4\tL64\tS255\tS32\tS72\n"
"Media\tDiskId\n"
"1\t2\t\t\tDISK1\t\n"

Definition at line 500 of file action.c.

◆ ppc_tables

const msi_table ppc_tables[]
static
Initial value:
=
{
ADD_TABLE(ppc_component),
ADD_TABLE(rof_feature),
ADD_TABLE(ppc_feature_comp),
ADD_TABLE(ppc_file),
ADD_TABLE(pp_install_exec_seq),
ADD_TABLE(pp_custom_action),
ADD_TABLE(ppc_media),
}

Definition at line 2014 of file action.c.

Referenced by test_process_components().

◆ property_dat

const char property_dat[]
static
Initial value:
=
"Property\tValue\n"
"s72\tl0\n"
"Property\tProperty\n"
"DefaultUIFont\tDlgFont8\n"
"HASUIRUN\t0\n"
"INSTALLLEVEL\t3\n"
"InstallMode\tTypical\n"
"Manufacturer\tWine\n"
"PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
"ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
"ProductID\tnone\n"
"ProductLanguage\t1033\n"
"ProductName\tMSITEST\n"
"ProductVersion\t1.1.1\n"
"PROMPTROLLBACKCOST\tP\n"
"Setup\tSetup\n"
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
"AdminProperties\tPOSTADMIN\n"
"ROOTDRIVE\tC:\\\n"
"SERVNAME\tTestService\n"
"SERVNAME2\tTestService2\n"
"SERVDISP\tTestServiceDisp\n"
"SERVDISP2\tTestServiceDisp2\n"
"MSIFASTINSTALL\t1\n"
"ARPNOMODIFY\t1\n"
"regdata17\t#1\n"

Definition at line 163 of file action.c.

◆ pub_component_dat

const char pub_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"publish\t{B4EA0ACF-6238-426E-9C6D-7869F0F9C768}\tMSITESTDIR\t0\t\tenglish.txt\n"

Definition at line 1236 of file action.c.

◆ pub_custom_action_dat

const char pub_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"pub_immediate\t1\tcustom.dll\tpub_absent\n"
"pub_deferred\t1025\tcustom.dll\tpub_present\n"
"unp_immediate\t1\tcustom.dll\tpub_present\n"
"unp_deferred\t1025\tcustom.dll\tpub_absent\n"

Definition at line 1273 of file action.c.

◆ pub_feature_comp_dat

const char pub_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"publish\tpublish\n"

Definition at line 1230 of file action.c.

◆ pub_feature_dat

const char pub_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"publish\t\t\tpublish feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1224 of file action.c.

◆ pub_file_dat

const char pub_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"english.txt\tpublish\tenglish.txt\t1000\t\t\t8192\t1\n"

Definition at line 1218 of file action.c.

◆ pub_install_exec_seq_dat

const char pub_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"PublishComponents\t\t3000\n"
"pub_immediate\tNOT REMOVE\t3001\n"
"pub_deferred\tNOT REMOVE\t3002\n"
"UnpublishComponents\t\t3100\n"
"unp_immediate\tREMOVE\t3101\n"
"unp_deferred\tREMOVE\t3102\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1248 of file action.c.

◆ pub_publish_component_dat

const char pub_publish_component_dat[]
static
Initial value:
=
"ComponentId\tQualifier\tComponent_\tAppData\tFeature_\n"
"s38\ts255\ts72\tL255\ts38\n"
"PublishComponent\tComponentId\tQualifier\tComponent_\n"
"{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}\tenglish.txt\tpublish\t\tpublish\n"

Definition at line 1242 of file action.c.

◆ pub_tables

const msi_table pub_tables[]
static
Initial value:
=
{
ADD_TABLE(pub_component),
ADD_TABLE(pub_feature),
ADD_TABLE(pub_feature_comp),
ADD_TABLE(pub_file),
ADD_TABLE(pub_publish_component),
ADD_TABLE(pub_install_exec_seq),
ADD_TABLE(pub_custom_action),
}

Definition at line 2223 of file action.c.

Referenced by test_publish_components().

◆ rci_appid_dat

const char rci_appid_dat[]
static
Initial value:
=
"AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
"s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
"AppId\tAppId\n"
"{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n"

Definition at line 1501 of file action.c.

◆ rci_class_dat

const char rci_class_dat[]
static
Initial value:
=
"CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
"s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
"Class\tCLSID\tContext\tComponent_\n"
"{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tclass\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tclass\t\n"

Definition at line 1507 of file action.c.

◆ rci_component_dat

const char rci_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"class\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tclass.txt\n"

Definition at line 1495 of file action.c.

◆ rci_custom_action_dat

const char rci_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rci_immediate\t1\tcustom.dll\trci_absent\n"
"rci_deferred\t1025\tcustom.dll\trci_present\n"
"uci_immediate\t1\tcustom.dll\trci_present\n"
"uci_deferred\t1025\tcustom.dll\trci_absent\n"

Definition at line 1538 of file action.c.

◆ rci_feature_comp_dat

const char rci_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"class\tclass\n"

Definition at line 1489 of file action.c.

◆ rci_feature_dat

const char rci_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"class\t\t\tclass feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1483 of file action.c.

◆ rci_file_dat

const char rci_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"class.txt\tclass\tclass.txt\t1000\t\t\t8192\t1\n"

Definition at line 1477 of file action.c.

◆ rci_install_exec_seq_dat

const char rci_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterClassInfo\t\t3000\n"
"uci_immediate\tREMOVE\t3001\n"
"uci_deferred\tREMOVE\t3002\n"
"RegisterClassInfo\t\t4000\n"
"rci_immediate\tNOT REMOVE\t4001\n"
"rci_deferred\tNOT REMOVE\t4002\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1513 of file action.c.

◆ rci_tables

const msi_table rci_tables[]
static
Initial value:
=
{
ADD_TABLE(rci_component),
ADD_TABLE(rci_feature),
ADD_TABLE(rci_feature_comp),
ADD_TABLE(rci_file),
ADD_TABLE(rci_appid),
ADD_TABLE(rci_class),
ADD_TABLE(rci_install_exec_seq),
ADD_TABLE(rci_custom_action),
}

Definition at line 2280 of file action.c.

Referenced by test_register_class_info().

◆ rd_component_dat

const char rd_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"duplicate\t{EB45D06A-ADFE-44E3-8D41-B7DE150E41AD}\tMSITESTDIR\t0\t\toriginal.txt\n"
"duplicate2\t{B8BA60E0-B2E9-488E-9D0E-E60F25F04F97}\tMSITESTDIR\t0\tDUPLICATE2=1\toriginal3.txt\n"

Definition at line 1302 of file action.c.

◆ rd_custom_action_dat

const char rd_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"df_immediate\t1\tcustom.dll\trd_absent\n"
"df_deferred\t1025\tcustom.dll\trd_present\n"
"rd_immediate\t1\tcustom.dll\trd_present\n"
"rd_deferred\t1025\tcustom.dll\trd_absent\n"

Definition at line 1341 of file action.c.

◆ rd_duplicate_file_dat

const char rd_duplicate_file_dat[]
static
Initial value:
=
"FileKey\tComponent_\tFile_\tDestName\tDestFolder\n"
"s72\ts72\ts72\tS255\tS72\n"
"DuplicateFile\tFileKey\n"
"duplicate\tduplicate\toriginal.txt\tduplicate.txt\t\n"
"duplicate2\tduplicate\toriginal2.txt\t\tMSITESTDIR\n"
"duplicate3\tduplicate2\toriginal3.txt\tduplicate2.txt\t\n"

Definition at line 1309 of file action.c.

◆ rd_feature_comp_dat

const char rd_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"duplicate\tduplicate\n"

Definition at line 1296 of file action.c.

◆ rd_feature_dat

const char rd_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"duplicate\t\t\tduplicate feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1290 of file action.c.

◆ rd_file_dat

const char rd_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"original.txt\tduplicate\toriginal.txt\t1000\t\t\t8192\t1\n"
"original2.txt\tduplicate\toriginal2.txt\t1000\t\t\t8192\t2\n"
"original3.txt\tduplicate2\toriginal3.txt\t1000\t\t\t8192\t3\n"

Definition at line 1282 of file action.c.

◆ rd_install_exec_seq_dat

const char rd_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveDuplicateFiles\t\t1900\n"
"rd_immediate\tREMOVE\t1901\n"
"rd_deferred\tREMOVE\t1902\n"
"InstallFiles\t\t2000\n"
"DuplicateFiles\t\t2100\n"
"df_immediate\tNOT REMOVE\t2101\n"
"df_deferred\tNOT REMOVE\t2102\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1317 of file action.c.

◆ rd_tables

const msi_table rd_tables[]
static
Initial value:
=
{
ADD_TABLE(rd_component),
ADD_TABLE(rd_feature),
ADD_TABLE(rd_feature_comp),
ADD_TABLE(rd_file),
ADD_TABLE(rd_duplicate_file),
ADD_TABLE(rd_install_exec_seq),
ADD_TABLE(rd_custom_action),
}

Definition at line 2237 of file action.c.

Referenced by test_remove_duplicate_files().

◆ REGSAM

Definition at line 57 of file action.c.

◆ rei_component_dat

const char rei_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"extension\t{9A3060D4-60BA-4A82-AB55-9FB148AD013C}\tMSITESTDIR\t0\t\textension.txt\n"

Definition at line 1565 of file action.c.

◆ rei_custom_action_dat

const char rei_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rei_immediate\t1\tcustom.dll\trei_absent\n"
"rei_deferred\t1025\tcustom.dll\trei_present\n"
"uei_immediate\t1\tcustom.dll\trei_present\n"
"uei_deferred\t1025\tcustom.dll\trei_absent\n"

Definition at line 1614 of file action.c.

◆ rei_extension_dat

const char rei_extension_dat[]
static
Initial value:
=
"Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
"s255\ts72\tS255\tS64\ts38\n"
"Extension\tExtension\tComponent_\n"
"extension\textension\tProg.Id.1\t\textension\n"

Definition at line 1571 of file action.c.

◆ rei_feature_comp_dat

const char rei_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"extension\textension\n"

Definition at line 1559 of file action.c.

◆ rei_feature_dat

const char rei_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"extension\t\t\textension feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1553 of file action.c.

◆ rei_file_dat

const char rei_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"extension.txt\textension\textension.txt\t1000\t\t\t8192\t1\n"

Definition at line 1547 of file action.c.

◆ rei_install_exec_seq_dat

const char rei_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
"uei_immediate\tREMOVE\t3001\n"
"uei_deferred\tREMOVE\t3002\n"
"RegisterExtensionInfo\t\t4000\n"
"rei_immediate\tNOT REMOVE\t4001\n"
"rei_deferred\tNOT REMOVE\t4002\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1589 of file action.c.

◆ rei_progid_dat

const char rei_progid_dat[]
static
Initial value:
=
"ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
"s255\tS255\tS38\tL255\tS72\tI2\n"
"ProgId\tProgId\n"
"Prog.Id.1\t\t\tdescription\t\t\n"

Definition at line 1583 of file action.c.

◆ rei_tables

const msi_table rei_tables[]
static
Initial value:
=
{
ADD_TABLE(rei_component),
ADD_TABLE(rei_feature),
ADD_TABLE(rei_feature_comp),
ADD_TABLE(rei_file),
ADD_TABLE(rei_extension),
ADD_TABLE(rei_verb),
ADD_TABLE(rei_progid),
ADD_TABLE(rei_install_exec_seq),
ADD_TABLE(rei_custom_action),
}

Definition at line 2295 of file action.c.

Referenced by test_register_extension_info().

◆ rei_verb_dat

const char rei_verb_dat[]
static
Initial value:
=
"Extension_\tVerb\tSequence\tCommand\tArgument\n"
"s255\ts32\tI2\tL255\tL255\n"
"Verb\tExtension_\tVerb\n"
"extension\tOpen\t1\t&Open\t/argument\n"

Definition at line 1577 of file action.c.

◆ rem_component_dat

const char rem_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t0\t\thydrogen\n"
"helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t1\t\thelium\n"
"lithium\t\tMSITESTDIR\t2\t\tlithium\n"

Definition at line 520 of file action.c.

◆ rem_feature_comp_dat

const char rem_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"feature\thydrogen\n"
"feature\thelium\n"
"feature\tlithium"

Definition at line 528 of file action.c.

◆ rem_file_dat

const char rem_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"hydrogen\thydrogen\thydrogen\t0\t\t\t8192\t1\n"
"helium\thelium\thelium\t0\t\t\t8192\t1\n"
"lithium\tlithium\tlithium\t0\t\t\t8192\t1"

Definition at line 536 of file action.c.

◆ rem_install_exec_seq_dat

const char rem_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"ValidateProductID\t\t700\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t3500\n"
"InstallFiles\t\t4000\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6300\n"
"PublishProduct\t\t6400\n"
"UnpublishFeatures\t\t6500\n"
"InstallFinalize\t\t6600"

Definition at line 544 of file action.c.

◆ rem_remove_files_dat

const char rem_remove_files_dat[]
static
Initial value:
=
"FileKey\tComponent_\tFileName\tDirProperty\tInstallMode\n"
"s72\ts72\tS255\ts72\tI2\n"
"RemoveFile\tFileKey\n"
"furlong\thydrogen\tfurlong\tMSITESTDIR\t1\n"
"firkin\thelium\tfirkin\tMSITESTDIR\t1\n"
"fortnight\tlithium\tfortnight\tMSITESTDIR\t1\n"
"becquerel\thydrogen\tbecquerel\tMSITESTDIR\t2\n"
"dioptre\thelium\tdioptre\tMSITESTDIR\t2\n"
"attoparsec\tlithium\tattoparsec\tMSITESTDIR\t2\n"
"storeys\thydrogen\tstoreys\tMSITESTDIR\t3\n"
"block\thelium\tblock\tMSITESTDIR\t3\n"
"siriometer\tlithium\tsiriometer\tMSITESTDIR\t3\n"
"nanoacre\thydrogen\t\tCABOUTDIR\t3\n"

Definition at line 563 of file action.c.

◆ rem_tables

const msi_table rem_tables[]
static
Initial value:
=
{
ADD_TABLE(rem_component),
ADD_TABLE(rof_feature),
ADD_TABLE(rem_feature_comp),
ADD_TABLE(rem_file),
ADD_TABLE(rem_install_exec_seq),
ADD_TABLE(rof_media),
ADD_TABLE(rem_remove_files),
}

Definition at line 2027 of file action.c.

Referenced by test_remove_files().

◆ rep_component_dat

const char rep_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"rep\t{A24FAF2A-3B2E-41EF-AA78-331542E1A29D}\tMSITESTDIR\t0\t\trep.txt\n"

Definition at line 1934 of file action.c.

◆ rep_feature_comp_dat

const char rep_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"rep\trep\n"

Definition at line 1928 of file action.c.

◆ rep_feature_dat

const char rep_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"rep\t\t\trep feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1922 of file action.c.

◆ rep_file_dat

const char rep_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"rep.txt\trep\trep.txt\t1000\t\t\t8192\t1\n"

Definition at line 1916 of file action.c.

◆ rep_install_exec_seq_dat

const char rep_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"FindRelatedProducts\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"RemoveExistingProducts\t\t1499\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
"UnregisterMIMEInfo\t\t3500\n"
"RegisterExtensionInfo\t\t4000\n"
"RegisterMIMEInfo\t\t4500\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1963 of file action.c.

◆ rep_property_dat

const char rep_property_dat[]
static
Initial value:
=
"Property\tValue\n"
"s72\tl0\n"
"Property\tProperty\n"
"HASUIRUN\t0\n"
"INSTALLLEVEL\t3\n"
"InstallMode\tTypical\n"
"Manufacturer\tWine\n"
"PIDTemplate\t###-#######\n"
"ProductCode\t{1699F0BB-0B61-4A89-AFE4-CFD60DFD76F3}\n"
"ProductLanguage\t1033\n"
"ProductName\tMSITEST\n"
"ProductVersion\t1.1.1\n"
"UpgradeCode\t{2967C1CC-34D4-42EE-8D96-CD6836F192BF}\n"
"PRODUCT\t2F41860D-7B4C-4DA7-BED9-B64F26594C56\n"
"MSIFASTINSTALL\t1\n"

Definition at line 1946 of file action.c.

◆ rep_tables

const msi_table rep_tables[]
static
Initial value:
=
{
ADD_TABLE(rep_component),
ADD_TABLE(rep_feature),
ADD_TABLE(rep_feature_comp),
ADD_TABLE(rep_file),
ADD_TABLE(rep_upgrade),
ADD_TABLE(rep_property),
ADD_TABLE(rep_install_exec_seq),
}

Definition at line 2360 of file action.c.

Referenced by test_remove_existing_products().

◆ rep_upgrade_dat

const char rep_upgrade_dat[]
static
Initial value:
=
"UpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\tRemove\tActionProperty\n"
"s38\tS20\tS20\tS255\ti4\tS255\ts72\n"
"Upgrade\tUpgradeCode\tVersionMin\tVersionMax\tLanguage\tAttributes\n"
"{2967C1CC-34D4-42EE-8D96-CD6836F192BF}\t\t\t\t256\t\tPRODUCT\n"

Definition at line 1940 of file action.c.

◆ rmi_component_dat

const char rmi_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"mime\t{A1D630CE-13A7-4882-AFDD-148E2BBAFC6D}\tMSITESTDIR\t0\t\tmime.txt\n"

Definition at line 1744 of file action.c.

◆ rmi_custom_action_dat

const char rmi_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rmi_immediate\t1\tcustom.dll\trmi_absent\n"
"rmi_deferred\t1025\tcustom.dll\trmi_present\n"
"umi_immediate\t1\tcustom.dll\trmi_present\n"
"umi_deferred\t1025\tcustom.dll\trmi_absent\n"

Definition at line 1795 of file action.c.

◆ rmi_extension_dat

const char rmi_extension_dat[]
static
Initial value:
=
"Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
"s255\ts72\tS255\tS64\ts38\n"
"Extension\tExtension\tComponent_\n"
"mime\tmime\t\tmime/type\tmime\n"

Definition at line 1750 of file action.c.

◆ rmi_feature_comp_dat

const char rmi_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"mime\tmime\n"

Definition at line 1738 of file action.c.

◆ rmi_feature_dat

const char rmi_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"mime\t\t\tmime feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1732 of file action.c.

◆ rmi_file_dat

const char rmi_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"mime.txt\tmime\tmime.txt\t1000\t\t\t8192\t1\n"

Definition at line 1726 of file action.c.

◆ rmi_install_exec_seq_dat

const char rmi_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"InstallFiles\t\t2000\n"
"UnregisterExtensionInfo\t\t3000\n"
"UnregisterMIMEInfo\t\t3500\n"
"umi_immediate\tREMOVE\t3501\n"
"umi_deferred\tREMOVE\t3502\n"
"RegisterExtensionInfo\t\t4000\n"
"RegisterMIMEInfo\t\t4500\n"
"rmi_immediate\tNOT REMOVE\t4501\n"
"rmi_deferred\tNOT REMOVE\t4502\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1768 of file action.c.

◆ rmi_mime_dat

const char rmi_mime_dat[]
static
Initial value:
=
"ContentType\tExtension_\tCLSID\n"
"s64\ts255\tS38\n"
"MIME\tContentType\n"
"mime/type\tmime\t\n"

Definition at line 1762 of file action.c.

◆ rmi_tables

const msi_table rmi_tables[]
static
Initial value:
=
{
ADD_TABLE(rmi_component),
ADD_TABLE(rmi_feature),
ADD_TABLE(rmi_feature_comp),
ADD_TABLE(rmi_file),
ADD_TABLE(rmi_extension),
ADD_TABLE(rmi_verb),
ADD_TABLE(rmi_mime),
ADD_TABLE(rmi_install_exec_seq),
ADD_TABLE(rmi_custom_action),
}

Definition at line 2329 of file action.c.

Referenced by test_register_mime_info().

◆ rmi_verb_dat

const char rmi_verb_dat[]
static
Initial value:
=
"Extension_\tVerb\tSequence\tCommand\tArgument\n"
"s255\ts32\tI2\tL255\tL255\n"
"Verb\tExtension_\tVerb\n"
"mime\tOpen\t1\t&Open\t/argument\n"

Definition at line 1756 of file action.c.

◆ rof_component_dat

const char rof_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"maximus\t\tMSITESTDIR\t0\t1\tmaximus\n"

Definition at line 387 of file action.c.

◆ rof_feature_comp_dat

const char rof_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"feature\tmaximus\n"
"montecristo\tmaximus"

Definition at line 400 of file action.c.

◆ rof_feature_dat

const char rof_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
"montecristo\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0"

Definition at line 393 of file action.c.

◆ rof_file_dat

const char rof_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"maximus\tmaximus\tmaximus\t500\t\t\t8192\t1"

Definition at line 407 of file action.c.

◆ rof_media_dat

const char rof_media_dat[]
static
Initial value:
=
"DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n"
"i2\ti4\tL64\tS255\tS32\tS72\n"
"Media\tDiskId\n"
"1\t1\t\t\tDISK1\t\n"

Definition at line 413 of file action.c.

◆ rpi_appid_dat

const char rpi_appid_dat[]
static
Initial value:
=
"AppId\tRemoteServerName\tLocalService\tServiceParameters\tDllSurrogate\tActivateAtStorage\tRunAsInteractiveUser\n"
"s38\tS255\tS255\tS255\tS255\tI2\tI2\n"
"AppId\tAppId\n"
"{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\t\t\t\t\t\t\n"

Definition at line 1647 of file action.c.

◆ rpi_class_dat

const char rpi_class_dat[]
static
Initial value:
=
"CLSID\tContext\tComponent_\tProgId_Default\tDescription\tAppId_\tFileTypeMask\tIcon_\tIconIndex\tDefInprocHandler\tArgument\tFeature_\tAttributes\n"
"s38\ts32\ts72\tS255\tL255\tS38\tS255\tS72\tI2\tS32\tS255\ts38\tI2\n"
"Class\tCLSID\tContext\tComponent_\n"
"{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tLocalServer\tprogid\tWinetest.Class.1\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n"
"{904E6BC9-F57F-4412-B460-D40DE2F256E2}\tLocalServer\tprogid\tWinetest.VerClass\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n"
"{57C413FB-CA02-498A-81F6-7E769BDB7C97}\tLocalServer\tprogid\t\tdescription\t{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}\tmask1;mask2\t\t\t2\t\tprogid\t\n"

Definition at line 1653 of file action.c.

◆ rpi_component_dat

const char rpi_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"progid\t{89A98345-F8A1-422E-A48B-0250B5809F2D}\tMSITESTDIR\t0\t\tprogid.txt\n"

Definition at line 1641 of file action.c.

◆ rpi_custom_action_dat

const char rpi_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rpi_immediate\t1\tcustom.dll\trpi_absent\n"
"rpi_deferred\t1025\tcustom.dll\trpi_present\n"
"upi_immediate\t1\tcustom.dll\trpi_present\n"
"upi_deferred\t1025\tcustom.dll\trpi_absent\n"

Definition at line 1717 of file action.c.

◆ rpi_extension_dat

const char rpi_extension_dat[]
static
Initial value:
=
"Extension\tComponent_\tProgId_\tMIME_\tFeature_\n"
"s255\ts72\tS255\tS64\ts38\n"
"Extension\tExtension\tComponent_\n"
"winetest\tprogid\tWinetest.Extension\t\tprogid\n"

Definition at line 1661 of file action.c.

◆ rpi_feature_comp_dat

const char rpi_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"progid\tprogid\n"

Definition at line 1635 of file action.c.

◆ rpi_feature_dat

const char rpi_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"progid\t\t\tprogid feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1629 of file action.c.

◆ rpi_file_dat

const char rpi_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"progid.txt\tprogid\tprogid.txt\t1000\t\t\t8192\t1\n"

Definition at line 1623 of file action.c.

◆ rpi_install_exec_seq_dat

const char rpi_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveFiles\t\t1700\n"
"UnregisterClassInfo\t\t3000\n"
"UnregisterExtensionInfo\t\t3200\n"
"UnregisterProgIdInfo\t\t3400\n"
"upi_immediate\tREMOVE\t3401\n"
"upi_deferred\tREMOVE\t3402\n"
"InstallFiles\t\t3600\n"
"RegisterClassInfo\t\t4000\n"
"RegisterExtensionInfo\t\t4200\n"
"RegisterProgIdInfo\t\t4400\n"
"rpi_immediate\tNOT REMOVE\t4401\n"
"rpi_deferred\tNOT REMOVE\t4402\n"
"RegisterProduct\t\t5000\n"
"PublishFeatures\t\t5100\n"
"PublishProduct\t\t5200\n"
"UnpublishFeatures\t\t5300\n"
"InstallFinalize\t\t6000\n"

Definition at line 1688 of file action.c.

◆ rpi_progid_dat

const char rpi_progid_dat[]
static
Initial value:
=
"ProgId\tProgId_Parent\tClass_\tDescription\tIcon_\tIconIndex\n"
"s255\tS255\tS38\tL255\tS72\tI2\n"
"ProgId\tProgId\n"
"Winetest.Class.1\t\t{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tdescription\t\t\n"
"Winetest.Class\tWinetest.Class.1\t\tdescription\t\t\n"
"Winetest.Class.2\t\t{110913E7-86D1-4BF3-9922-BA103FCDDDFA}\tdescription\t\t\n"
"Winetest.VerClass.1\t\t{904E6BC9-F57F-4412-B460-D40DE2F256E2}\tdescription\t\t\n"
"Winetest.VerClass\tWinetest.VerClass.1\t\tdescription\t\t\n"
"Winetest.NoProgIdClass.1\t\t{57C413FB-CA02-498A-81F6-7E769BDB7C97}\tdescription\t\t\n"
"Winetest.NoProgIdClass\tWinetest.NoProgIdClass.1\t\tdescription\t\t\n"
"Winetest.Orphaned\t\t\tdescription\t\t\n"
"Winetest.Orphaned2\t\t\tdescription\t\t\n"
"Winetest.Extension\t\t\tdescription\t\t\n"

Definition at line 1673 of file action.c.

◆ rpi_tables

const msi_table rpi_tables[]
static
Initial value:
=
{
ADD_TABLE(rpi_component),
ADD_TABLE(rpi_feature),
ADD_TABLE(rpi_feature_comp),
ADD_TABLE(rpi_file),
ADD_TABLE(rpi_appid),
ADD_TABLE(rpi_class),
ADD_TABLE(rpi_extension),
ADD_TABLE(rpi_verb),
ADD_TABLE(rpi_progid),
ADD_TABLE(rpi_install_exec_seq),
ADD_TABLE(rpi_custom_action),
}

Definition at line 2311 of file action.c.

Referenced by test_register_progid_info().

◆ rpi_verb_dat

const char rpi_verb_dat[]
static
Initial value:
=
"Extension_\tVerb\tSequence\tCommand\tArgument\n"
"s255\ts32\tI2\tL255\tL255\n"
"Verb\tExtension_\tVerb\n"
"winetest\tOpen\t1\t&Open\t/argument\n"

Definition at line 1667 of file action.c.

◆ sds_custom_action_dat

const char sds_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"sds_immediate\t1\tcustom.dll\tsds_present\n"
"sds_deferred\t1025\tcustom.dll\tsds_absent\n"

Definition at line 351 of file action.c.

◆ sds_install_exec_seq_dat

const char sds_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"ResolveSource\t\t950\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"StopServices\t\t5000\n"
"DeleteServices\t\t5050\n"
"sds_immediate\tNOT REMOVE\t5051\n"
"sds_deferred\tNOT REMOVE\t5052\n"
"MoveFiles\t\t5100\n"
"InstallFiles\t\t5200\n"
"DuplicateFiles\t\t5300\n"
"InstallServices\t\t5400\n"
"StartServices\t\t5450\n"
"RegisterProduct\t\t5500\n"
"PublishFeatures\t\t5600\n"
"PublishProduct\t\t5700\n"
"UnpublishFeatures\t\t5800\n"
"InstallFinalize\t\t6000\n"

Definition at line 325 of file action.c.

◆ sds_tables

const msi_table sds_tables[]
static
Initial value:
=
{
ADD_TABLE(component),
ADD_TABLE(feature_comp),
ADD_TABLE(sds_install_exec_seq),
ADD_TABLE(sds_custom_action),
ADD_TABLE(service_control),
ADD_TABLE(service_install),
}

Definition at line 2109 of file action.c.

Referenced by test_delete_services().

◆ service_control_dat

const char service_control_dat[]
static
Initial value:
=
"ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
"s72\tl255\ti2\tL255\tI2\ts72\n"
"ServiceControl\tServiceControl\n"
"ServiceControl\tTestService3\t8\t\t0\tservice_comp\n"
"ServiceControl2\tTestService3\t128\t\t0\tservice_comp2"

Definition at line 275 of file action.c.

◆ service_install2_dat

const char service_install2_dat[]
static
Initial value:
=
"ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
"ServiceInstall\tServiceInstall\n"
"TestService\tTestService\tTestService\t2\t3\t32768\t\t\tTestService\t\t\tservice_comp\t\n"
"TestService4\tTestService4\tTestService4\t2\t3\t0\t\t\tTestService4\t\t\tservice_comp3\t\n"

Definition at line 267 of file action.c.

◆ service_install_dat

const char service_install_dat[]
static
Initial value:
=
"ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
"LoadOrderGroup\tDependencies\tStartName\tPassword\tArguments\tComponent_\tDescription\n"
"s72\ts255\tL255\ti4\ti4\ti4\tS255\tS255\tS255\tS255\tS255\ts72\tL255\n"
"ServiceInstall\tServiceInstall\n"
"TestService\t[SERVNAME]\t[SERVDISP]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService\t\t-a arg\tservice_comp\tdescription\n"
"TestService2\t[SERVNAME2]\t[SERVDISP2]\t2\t3\t0\t\tservice1[~]+group1[~]service2[~]+group2[~][~]\tTestService2\t\t-a arg\tservice_comp2\tdescription\n"

Definition at line 259 of file action.c.

◆ sis_custom_action_dat

const char sis_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"sis_immediate\t1\tcustom.dll\tsis_absent\n"
"sis_deferred\t1025\tcustom.dll\tsis_present\n"

Definition at line 380 of file action.c.

◆ sis_install_exec_seq_dat

const char sis_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"StopServices\t\t5000\n"
"DeleteServices\t\t5050\n"
"InstallFiles\t\t5200\n"
"InstallServices\t\t5400\n"
"sis_immediate\tNOT REMOVE\t5401\n"
"sis_deferred\tNOT REMOVE\t5402\n"
"StartServices\t\t5450\n"
"RegisterProduct\t\t5500\n"
"PublishFeatures\t\t5600\n"
"PublishProduct\t\t5700\n"
"UnpublishFeatures\t\t5800\n"
"InstallFinalize\t\t6000\n"

Definition at line 358 of file action.c.

◆ sis_tables

const msi_table sis_tables[]
static
Initial value:
=
{
ADD_TABLE(component),
ADD_TABLE(feature_comp),
ADD_TABLE(sis_install_exec_seq),
ADD_TABLE(sis_custom_action),
ADD_TABLE(service_install2),
}

Definition at line 2124 of file action.c.

Referenced by test_install_services().

◆ sr_component_dat

const char sr_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"selfreg\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\tselfreg.dll\n"

Definition at line 837 of file action.c.

◆ sr_custom_action_dat

const char sr_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"sr_immediate\t1\tcustom.dll\tsr_absent\n"
"sr_deferred\t1025\tcustom.dll\tsr_present\n"
"su_immediate\t1\tcustom.dll\tsr_present\n"
"su_deferred\t1025\tcustom.dll\tsr_absent\n"

Definition at line 874 of file action.c.

◆ sr_feature_comp_dat

const char sr_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"selfreg\tselfreg\n"

Definition at line 831 of file action.c.

◆ sr_feature_dat

const char sr_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"selfreg\t\t\tselfreg feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 825 of file action.c.

◆ sr_file_dat

const char sr_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"selfreg.dll\tselfreg\tselfreg.dll\t1000\t\t\t8192\t1\n"

Definition at line 819 of file action.c.

◆ sr_install_exec_seq_dat

const char sr_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"SelfUnregModules\t\t3800\n"
"su_immediate\tREMOVE\t3801\n"
"su_deferred\tREMOVE\t3802\n"
"RemoveFiles\t\t3900\n"
"InstallFiles\t\t4000\n"
"SelfRegModules\t\t4100\n"
"sr_immediate\tNOT REMOVE\t4101\n"
"sr_deferred\tNOT REMOVE\t4102\n"
"CreateShortcuts\t\t4600\n"
"RegisterProduct\t\t5100\n"
"PublishFeatures\t\t5200\n"
"PublishProduct\t\t5300\n"
"UnpublishFeatures\t\t5400\n"
"InstallFinalize\t\t6600\n"

Definition at line 849 of file action.c.

◆ sr_selfreg_dat

const char sr_selfreg_dat[]
static
Initial value:
=
"File_\tCost\n"
"s72\tI2\n"
"SelfReg\tFile_\n"
"selfreg.dll\t\n"

Definition at line 843 of file action.c.

◆ sr_tables

const msi_table sr_tables[]
static
Initial value:
=
{
ADD_TABLE(sr_component),
ADD_TABLE(sr_feature),
ADD_TABLE(sr_feature_comp),
ADD_TABLE(sr_file),
ADD_TABLE(sr_selfreg),
ADD_TABLE(sr_install_exec_seq),
ADD_TABLE(sr_custom_action),
}

Definition at line 2138 of file action.c.

Referenced by test_self_registration().

◆ sss_custom_action_dat

const char sss_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"stop_immediate\t1\tcustom.dll\tsss_started\n"
"stop_deferred\t1025\tcustom.dll\tsss_stopped\n"
"start_deferred\t1025\tcustom.dll\tsss_started\n"

Definition at line 317 of file action.c.

◆ sss_install_exec_seq_dat

const char sss_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"ResolveSource\t\t950\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"StopServices\t\t4000\n"
"stop_immediate\tNOT REMOVE\t4001\n"
"stop_deferred\tNOT REMOVE\t4002\n"
"DeleteServices\t\t5000\n"
"MoveFiles\t\t5100\n"
"InstallFiles\t\t5200\n"
"DuplicateFiles\t\t5300\n"
"StartServices\t\t5400\n"
"start_deferred\tNOT REMOVE\t5401\n"
"RegisterProduct\t\t5500\n"
"PublishFeatures\t\t5600\n"
"PublishProduct\t\t5700\n"
"UnpublishFeatures\t\t5800\n"
"InstallFinalize\t\t6000\n"

Definition at line 291 of file action.c.

◆ sss_service_control_dat

const char sss_service_control_dat[]
static
Initial value:
=
"ServiceControl\tName\tEvent\tArguments\tWait\tComponent_\n"
"s72\tl255\ti2\tL255\tI2\ts72\n"
"ServiceControl\tServiceControl\n"
"ServiceControl\tSpooler\t1\t\t1\tservice_comp\n"
"ServiceControl2\tSpooler\t2\t\t1\tservice_comp\n"
"ServiceControl3\tSpooler\t16\t\t1\tservice_comp\n"
"ServiceControl4\tSpooler\t32\t\t1\tservice_comp\n"

Definition at line 282 of file action.c.

◆ sss_tables

const msi_table sss_tables[]
static
Initial value:
=
{
ADD_TABLE(component),
ADD_TABLE(feature_comp),
ADD_TABLE(sss_install_exec_seq),
ADD_TABLE(sss_service_control),
ADD_TABLE(sss_custom_action),
}

Definition at line 2095 of file action.c.

Referenced by test_start_stop_services().

◆ tl_component_dat

const char tl_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"typelib\t{BB4C26FD-89D8-4E49-AF1C-DB4DCB5BF1B0}\tMSITESTDIR\t0\t\ttypelib.dll\n"

Definition at line 1108 of file action.c.

◆ tl_custom_action_dat

const char tl_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"rt_immediate\t1\tcustom.dll\ttl_absent\n"
"rt_deferred\t1025\tcustom.dll\ttl_present\n"
"ut_immediate\t1\tcustom.dll\ttl_present\n"
"ut_deferred\t1025\tcustom.dll\ttl_absent\n"

Definition at line 1145 of file action.c.

◆ tl_feature_comp_dat

const char tl_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"typelib\ttypelib\n"

Definition at line 1102 of file action.c.

◆ tl_feature_dat

const char tl_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"typelib\t\t\ttypelib feature\t1\t2\tMSITESTDIR\t0\n"

Definition at line 1096 of file action.c.

◆ tl_file_dat

const char tl_file_dat[]
static
Initial value:
=
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
"File\tFile\n"
"typelib.dll\ttypelib\ttypelib.dll\t1000\t\t\t8192\t1\n"

Definition at line 1090 of file action.c.

◆ tl_install_exec_seq_dat

const char tl_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"UnregisterTypeLibraries\t\t3100\n"
"ut_immediate\tREMOVE\t3101\n"
"ut_deferred\tREMOVE\t3102\n"
"RemoveFiles\t\t3200\n"
"InstallFiles\t\t3300\n"
"RegisterTypeLibraries\t\t3400\n"
"rt_immediate\tNOT REMOVE\t3401\n"
"rt_deferred\tNOT REMOVE\t3402\n"
"RegisterProduct\t\t5100\n"
"PublishFeatures\t\t5200\n"
"PublishProduct\t\t5300\n"
"UnpublishFeatures\t\t5400\n"
"InstallFinalize\t\t6000\n"

Definition at line 1120 of file action.c.

◆ tl_tables

const msi_table tl_tables[]
static
Initial value:
=
{
ADD_TABLE(tl_component),
ADD_TABLE(tl_feature),
ADD_TABLE(tl_feature_comp),
ADD_TABLE(tl_file),
ADD_TABLE(tl_typelib),
ADD_TABLE(tl_install_exec_seq),
ADD_TABLE(tl_custom_action),
}

Definition at line 2195 of file action.c.

Referenced by test_register_typelib().

◆ tl_typelib_dat

const char tl_typelib_dat[]
static
Initial value:
=
"LibID\tLanguage\tComponent_\tVersion\tDescription\tDirectory_\tFeature_\tCost\n"
"s38\ti2\ts72\tI4\tL128\tS72\ts38\tI4\n"
"TypeLib\tLibID\tLanguage\tComponent_\n"
"{EAC5166A-9734-4D91-878F-1DD02304C66C}\t0\ttypelib\t1793\t\tMSITESTDIR\ttypelib\t\n"

Definition at line 1114 of file action.c.

◆ vp_custom_action_dat

const char vp_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\tISComments\n"
"s72\ti2\tS64\tS0\tS255\n"
"CustomAction\tAction\n"
"SetProductID1\t51\tProductID\t1\t\n"
"SetProductID2\t51\tProductID\t2\t\n"
"TestProductID1\t19\t\t\tHalts installation\n"
"TestProductID2\t19\t\t\tHalts installation\n"

Definition at line 970 of file action.c.

◆ vp_install_exec_seq_dat

const char vp_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"LaunchConditions\t\t100\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"SetProductID1\tSET_PRODUCT_ID=1\t3000\n"
"SetProductID2\tSET_PRODUCT_ID=2\t3100\n"
"ValidateProductID\t\t3200\n"
"InstallExecute\t\t3300\n"
"TestProductID1\tProductID=1\t3400\n"
"TestProductID2\tProductID=\"123-1234567\"\t3500\n"
"InstallFiles\t\t4000\n"
"InstallFinalize\t\t6000\n"

Definition at line 979 of file action.c.

◆ vp_property_dat

const char vp_property_dat[]
static
Initial value:
=
"Property\tValue\n"
"s72\tl0\n"
"Property\tProperty\n"
"HASUIRUN\t0\n"
"INSTALLLEVEL\t3\n"
"InstallMode\tTypical\n"
"Manufacturer\tWine\n"
"PIDTemplate\t###-#######\n"
"ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
"ProductLanguage\t1033\n"
"ProductName\tMSITEST\n"
"ProductVersion\t1.1.1\n"
"UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
"MSIFASTINSTALL\t1\n"

Definition at line 954 of file action.c.

◆ vp_tables

const msi_table vp_tables[]
static
Initial value:
=
{
ADD_TABLE(component),
ADD_TABLE(feature_comp),
ADD_TABLE(vp_custom_action),
ADD_TABLE(vp_install_exec_seq),
}

Definition at line 2166 of file action.c.

Referenced by test_validate_product_id().

◆ wrv_component_dat

const char wrv_component_dat[]
static
Initial value:
=
"Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n"
"s72\tS38\ts72\ti2\tS255\tS72\n"
"Component\tComponent\n"
"augustus\t{bafe0297-cbcc-4e08-8a78-7e9b83456eef}\tMSITESTDIR\t0\t\t\n"
"caesar\t{bafe0298-cbcc-4e08-8a78-7e9b83456eef}\tMSITESTDIR\t1\t\t\n"

Definition at line 643 of file action.c.

◆ wrv_custom_action_dat

const char wrv_custom_action_dat[]
static
Initial value:
=
"Action\tType\tSource\tTarget\n"
"s72\ti2\tS64\tS0\n"
"CustomAction\tAction\n"
"wrv_immediate\t1\tcustom.dll\twrv_absent\n"
"wrv_deferred\t1025\tcustom.dll\twrv_present\n"
"rrv_immediate\t1\tcustom.dll\twrv_present\n"
"rrv_deferred\t1025\tcustom.dll\twrv_absent\n"

Definition at line 719 of file action.c.

◆ wrv_feature_comp_dat

const char wrv_feature_comp_dat[]
static
Initial value:
=
"Feature_\tComponent_\n"
"s38\ts72\n"
"FeatureComponents\tFeature_\tComponent_\n"
"feature\taugustus\n"
"feature2\tcaesar"

Definition at line 657 of file action.c.

◆ wrv_feature_dat

const char wrv_feature_dat[]
static
Initial value:
=
"Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n"
"s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n"
"Feature\tFeature\n"
"feature\t\tFeature\tFeature\t2\t1\tTARGETDIR\t0\n"
"feature2\t\tFeature2\tFeature2\t2\t1\tTARGETDIR\t1"

Definition at line 650 of file action.c.

◆ wrv_install_exec_seq_dat

const char wrv_install_exec_seq_dat[]
static
Initial value:
=
"Action\tCondition\tSequence\n"
"s72\tS255\tI2\n"
"InstallExecuteSequence\tAction\n"
"CostInitialize\t\t800\n"
"FileCost\t\t900\n"
"CostFinalize\t\t1000\n"
"InstallValidate\t\t1400\n"
"InstallInitialize\t\t1500\n"
"ProcessComponents\t\t1600\n"
"RemoveRegistryValues\t\t4900\n"
"rrv_immediate\tREMOVE\t4901\n"
"rrv_deferred\tREMOVE\t4902\n"
"WriteRegistryValues\t\t5000\n"
"wrv_immediate\tNOT REMOVE\t5001\n"
"wrv_deferred\tNOT REMOVE\t5002\n"
"RegisterProduct\t\t6100\n"
"PublishFeatures\t\t6200\n"
"PublishProduct\t\t6300\n"
"UnpublishFeatures\t\t6400\n"
"InstallFinalize\t\t6600\n"

Definition at line 697 of file action.c.

◆ wrv_registry_dat

const char wrv_registry_dat[]
static
Initial value:
=
"Registry\tRoot\tKey\tName\tValue\tComponent_\n"
"s72\ti2\tl255\tL255\tL0\ts72\n"
"Registry\tRegistry\n"
"regdata0\t1\tmsitest\tsz\tstring\taugustus\n"
"regdata1\t1\tmsitest\tmultisz\tone[~]two[~]three\taugustus\n"
"regdata2\t1\tmsitest\texpandsz\t#%string\taugustus\n"
"regdata3\t1\tmsitest\tdword\t#123\taugustus\n"
"regdata4\t1\tmsitest\tbinary\t#x01234567\taugustus\n"
"regdata5\t1\tmsitest\t\tdefault\taugustus\n"
"regdata6\t1\tmsitest\\subkey\t*\t\taugustus\n"
"regdata7\t1\tmsitest\\subkey\t*\t#%\taugustus\n"
"regdata8\t1\tmsitest\\subkey\t*\t#x\taugustus\n"
"regdata9\t1\tmsitest\\VisualStudio\\10.0\\AD7Metrics\\Exception\\{049EC4CC-30D2-4032-9256-EE18EB41B62B}\\Common Language Runtime Exceptions\\System.Workflow.ComponentModel.Serialization\\System.Workflow.ComponentModel.Serialization.WorkflowMarkupSerializationException\tlong\tkey\taugustus\n"
"regdata10\t1\tmsitest\tValue1\t[~]one[~]\taugustus\n"
"regdata11\t1\tmsitest\tValue2\t[~]two\taugustus\n"
"regdata12\t1\tmsitest\tValue3\tone[~]\taugustus\n"
"regdata13\t1\tmsitest\tValue4\tone[~]two\taugustus\n"
"regdata14\t1\tmsitest\tValue5\t[~]one[~]two[~]three\taugustus\n"
"regdata15\t1\tmsitest\tValue6\t[~]\taugustus\n"
"regdata16\t1\tmsitest\tValue7\t[~]two\taugustus\n"
"regdata17\t1\tmsitest\tformat\t[regdata17]\taugustus\n"
"regdata18\t1\tmsitest\tsource\t#1\tcaesar\n"
"regdata19\t1\tmsitest\\create\t+\t\taugustus\n"
"regdata20\t1\tmsitest\\delete\t-\t\taugustus\n"

Definition at line 664 of file action.c.

◆ wrv_remove_registry_dat

const char wrv_remove_registry_dat[]
static
Initial value:
=
"RemoveRegistry\tRoot\tKey\tName\tComponent_\n"
"s72\ti2\tl255\tL255\ts72\n"
"RemoveRegistry\tRemoveRegistry\n"
"regdata0\t1\tmsitest\tinstremove\taugustus\n"
"regdata1\t1\tmsitest\\instremove\t-\taugustus\n"

Definition at line 690 of file action.c.

◆ wrv_tables

const msi_table wrv_tables[]
static
Initial value:
=
{
ADD_TABLE(wrv_component),
ADD_TABLE(wrv_feature),
ADD_TABLE(wrv_feature_comp),
ADD_TABLE(wrv_install_exec_seq),
ADD_TABLE(wrv_custom_action),
ADD_TABLE(wrv_registry),
ADD_TABLE(wrv_remove_registry),
}

Definition at line 2067 of file action.c.

Referenced by test_write_registry_values().