ReactOS  0.4.15-dev-5126-g3bb451b
action.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winreg.h"
#include "winsvc.h"
#include "odbcinst.h"
#include "wine/debug.h"
#include "msidefs.h"
#include "winuser.h"
#include "shlobj.h"
#include "objbase.h"
#include "mscoree.h"
#include "shlwapi.h"
#include "imagehlp.h"
#include "winver.h"
#include "msipriv.h"
#include "resource.h"
Include dependency graph for action.c:

Go to the source code of this file.

Classes

struct  dummy_thread
 
struct  _ilfs
 
struct  typelib_struct
 

Macros

#define COBJMACROS
 
#define REG_PROGRESS_VALUE   13200
 
#define COMPONENT_PROGRESS_VALUE   24000
 
#define ENV_ACT_SETALWAYS   0x1
 
#define ENV_ACT_SETABSENT   0x2
 
#define ENV_ACT_REMOVE   0x4
 
#define ENV_ACT_REMOVEMATCH   0x8
 
#define ENV_MOD_MACHINE   0x20000000
 
#define ENV_MOD_APPEND   0x40000000
 
#define ENV_MOD_PREFIX   0x80000000
 
#define ENV_MOD_MASK   0xC0000000
 
#define check_flag_combo(x, y)   ((x) & ~(y)) == (y)
 

Enumerations

enum  parse_state {
  STATE_NONE, STATE_OK, STATE_MULTILINE, STATE_DONE,
  STATE_ROOT, STATE_CONFIGURATION, STATE_STARTUP, STATE_UNKNOWN,
  state_whitespace, state_token, state_quote
}
 
enum  join_op { JOIN_OP_APPEND, JOIN_OP_PREPEND, JOIN_OP_REPLACE }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msi)
 
static INT ui_actionstart (MSIPACKAGE *package, LPCWSTR action, LPCWSTR description, LPCWSTR template)
 
static void ui_actioninfo (MSIPACKAGE *package, LPCWSTR action, BOOL start, INT rc)
 
static int parse_prop (const WCHAR *str, WCHAR *value, int *quotes)
 
static void remove_quotes (WCHAR *str)
 
UINT msi_parse_command_line (MSIPACKAGE *package, LPCWSTR szCommandLine, BOOL preserve_case)
 
const WCHARmsi_get_command_line_option (const WCHAR *cmd, const WCHAR *option, UINT *len)
 
WCHAR ** msi_split_string (const WCHAR *str, WCHAR sep)
 
static BOOL ui_sequence_exists (MSIPACKAGE *package)
 
UINT msi_set_sourcedir_props (MSIPACKAGE *package, BOOL replace)
 
static BOOL needs_ui_sequence (MSIPACKAGE *package)
 
UINT msi_set_context (MSIPACKAGE *package)
 
static UINT ITERATE_Actions (MSIRECORD *row, LPVOID param)
 
UINT MSI_Sequence (MSIPACKAGE *package, LPCWSTR table)
 
static UINT ACTION_ProcessExecSequence (MSIPACKAGE *package)
 
static UINT ACTION_ProcessUISequence (MSIPACKAGE *package)
 
static UINT ACTION_HandleCustomAction (MSIPACKAGE *package, LPCWSTR action)
 
MSICOMPONENTmsi_get_loaded_component (MSIPACKAGE *package, const WCHAR *Component)
 
MSIFEATUREmsi_get_loaded_feature (MSIPACKAGE *package, const WCHAR *Feature)
 
MSIFILEmsi_get_loaded_file (MSIPACKAGE *package, const WCHAR *key)
 
MSIFOLDERmsi_get_loaded_folder (MSIPACKAGE *package, const WCHAR *dir)
 
void msi_ui_progress (MSIPACKAGE *package, int a, int b, int c, int d)
 
INSTALLSTATE msi_get_component_action (MSIPACKAGE *package, MSICOMPONENT *comp)
 
INSTALLSTATE msi_get_feature_action (MSIPACKAGE *package, MSIFEATURE *feature)
 
static UINT ITERATE_CreateFolders (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_CreateFolders (MSIPACKAGE *package)
 
static void remove_persistent_folder (MSIFOLDER *folder)
 
static UINT ITERATE_RemoveFolders (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_RemoveFolders (MSIPACKAGE *package)
 
static UINT load_component (MSIRECORD *row, LPVOID param)
 
UINT msi_load_all_components (MSIPACKAGE *package)
 
static UINT add_feature_component (MSIFEATURE *feature, MSICOMPONENT *comp)
 
static UINT add_feature_child (MSIFEATURE *parent, MSIFEATURE *child)
 
static UINT iterate_load_featurecomponents (MSIRECORD *row, LPVOID param)
 
static UINT load_feature (MSIRECORD *row, LPVOID param)
 
static UINT find_feature_children (MSIRECORD *row, LPVOID param)
 
UINT msi_load_all_features (MSIPACKAGE *package)
 
static LPWSTR folder_split_path (LPWSTR p, WCHAR ch)
 
static UINT load_file_hash (MSIPACKAGE *package, MSIFILE *file)
 
static UINT load_file_disk_id (MSIPACKAGE *package, MSIFILE *file)
 
static UINT load_file (MSIRECORD *row, LPVOID param)
 
static UINT load_all_files (MSIPACKAGE *package)
 
static UINT load_media (MSIRECORD *row, LPVOID param)
 
static UINT load_all_media (MSIPACKAGE *package)
 
static UINT load_patch_disk_id (MSIPACKAGE *package, MSIFILEPATCH *patch)
 
static UINT load_patch (MSIRECORD *row, LPVOID param)
 
static UINT load_all_patches (MSIPACKAGE *package)
 
static UINT iterate_patched_component (MSIRECORD *row, LPVOID param)
 
static void mark_patched_components (MSIPACKAGE *package)
 
static UINT load_folder_persistence (MSIPACKAGE *package, MSIFOLDER *folder)
 
static UINT load_folder (MSIRECORD *row, LPVOID param)
 
static UINT add_folder_child (MSIFOLDER *parent, MSIFOLDER *child)
 
static UINT find_folder_children (MSIRECORD *row, LPVOID param)
 
static UINT load_all_folders (MSIPACKAGE *package)
 
static UINT ACTION_CostInitialize (MSIPACKAGE *package)
 
static UINT execute_script (MSIPACKAGE *package, UINT script)
 
static UINT ACTION_FileCost (MSIPACKAGE *package)
 
static void get_client_counts (MSIPACKAGE *package)
 
static void ACTION_GetComponentInstallStates (MSIPACKAGE *package)
 
static void ACTION_GetFeatureInstallStates (MSIPACKAGE *package)
 
static BOOL is_feature_selected (MSIFEATURE *feature, INT level)
 
static BOOL process_state_property (MSIPACKAGE *package, int level, LPCWSTR property, INSTALLSTATE state)
 
static BOOL process_overrides (MSIPACKAGE *package, int level)
 
static void disable_children (MSIFEATURE *feature, int level)
 
static void follow_parent (MSIFEATURE *feature)
 
UINT MSI_SetFeatureStates (MSIPACKAGE *package)
 
static UINT ITERATE_CostFinalizeConditions (MSIRECORD *row, LPVOID param)
 
int msi_compare_file_versions (VS_FIXEDFILEINFO *fi, const WCHAR *version)
 
int msi_compare_font_versions (const WCHAR *ver1, const WCHAR *ver2)
 
static WCHARcreate_temp_dir (MSIDATABASE *db)
 
WCHAR *WINAPIV msi_build_directory_name (DWORD count,...)
 
BOOL msi_is_global_assembly (MSICOMPONENT *comp)
 
static void set_target_path (MSIPACKAGE *package, MSIFILE *file)
 
static UINT calculate_file_cost (MSIPACKAGE *package)
 
WCHARmsi_normalize_path (const WCHAR *in)
 
static WCHARget_install_location (MSIPACKAGE *package)
 
void msi_resolve_target_folder (MSIPACKAGE *package, const WCHAR *name, BOOL load_prop)
 
static ULONGLONG get_volume_space_required (MSIPACKAGE *package)
 
static UINT ACTION_CostFinalize (MSIPACKAGE *package)
 
static BYTEparse_value (MSIPACKAGE *package, const WCHAR *value, DWORD len, DWORD *type, DWORD *size)
 
static const WCHARget_root_key (MSIPACKAGE *package, INT root, HKEY *root_key)
 
static REGSAM get_registry_view (const MSICOMPONENT *comp)
 
static HKEY open_key (const MSICOMPONENT *comp, HKEY root, const WCHAR *path, BOOL create, REGSAM access)
 
static BOOL is_special_entry (const WCHAR *name)
 
static WCHAR ** split_multi_string_values (const WCHAR *str, DWORD len, DWORD *count)
 
static WCHARflatten_multi_string_values (WCHAR **left, DWORD left_count, WCHAR **right, DWORD right_count, DWORD *size)
 
static DWORD remove_duplicate_values (WCHAR **old, DWORD old_count, WCHAR **new, DWORD new_count)
 
static WCHARjoin_multi_string_values (enum join_op op, WCHAR **old, DWORD old_count, WCHAR **new, DWORD new_count, DWORD *size)
 
static BYTEbuild_multi_string_value (BYTE *old_value, DWORD old_size, BYTE *new_value, DWORD new_size, DWORD *size)
 
static BYTEreg_get_value (HKEY hkey, const WCHAR *name, DWORD *type, DWORD *size)
 
static UINT ITERATE_WriteRegistryValues (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_WriteRegistryValues (MSIPACKAGE *package)
 
static int is_key_empty (const MSICOMPONENT *comp, HKEY root, const WCHAR *path)
 
static void delete_key (const MSICOMPONENT *comp, HKEY root, const WCHAR *path)
 
static void delete_value (const MSICOMPONENT *comp, HKEY root, const WCHAR *path, const WCHAR *value)
 
static void delete_tree (const MSICOMPONENT *comp, HKEY root, const WCHAR *path)
 
static UINT ITERATE_RemoveRegistryValuesOnUninstall (MSIRECORD *row, LPVOID param)
 
static UINT ITERATE_RemoveRegistryValuesOnInstall (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_RemoveRegistryValues (MSIPACKAGE *package)
 
static UINT ACTION_InstallInitialize (MSIPACKAGE *package)
 
static UINT ACTION_InstallValidate (MSIPACKAGE *package)
 
static UINT ITERATE_LaunchConditions (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_LaunchConditions (MSIPACKAGE *package)
 
static LPWSTR resolve_keypath (MSIPACKAGE *package, MSICOMPONENT *cmp)
 
static HKEY open_shared_dlls_key (MSICOMPONENT *comp, BOOL create, REGSAM access)
 
static UINT get_shared_dlls_count (MSICOMPONENT *comp)
 
static void write_shared_dlls_count (MSICOMPONENT *comp, const WCHAR *path, INT count)
 
static void refcount_component (MSIPACKAGE *package, MSICOMPONENT *comp)
 
static WCHARbuild_full_keypath (MSIPACKAGE *package, MSICOMPONENT *comp)
 
static UINT ACTION_ProcessComponents (MSIPACKAGE *package)
 
static BOOL CALLBACK Typelib_EnumResNameProc (HMODULE hModule, LPCWSTR lpszType, LPWSTR lpszName, LONG_PTR lParam)
 
static HMODULE msi_load_library (MSIPACKAGE *package, const WCHAR *filename, DWORD flags)
 
static HRESULT msi_load_typelib (MSIPACKAGE *package, const WCHAR *filename, REGKIND kind, ITypeLib **lib)
 
static UINT ITERATE_RegisterTypeLibraries (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_RegisterTypeLibraries (MSIPACKAGE *package)
 
static UINT ITERATE_UnregisterTypeLibraries (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_UnregisterTypeLibraries (MSIPACKAGE *package)
 
static WCHARget_link_file (MSIPACKAGE *package, MSIRECORD *row)
 
WCHARmsi_build_icon_path (MSIPACKAGE *package, const WCHAR *icon_name)
 
static UINT ITERATE_CreateShortcuts (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_CreateShortcuts (MSIPACKAGE *package)
 
static UINT ITERATE_RemoveShortcuts (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_RemoveShortcuts (MSIPACKAGE *package)
 
static UINT ITERATE_PublishIcon (MSIRECORD *row, LPVOID param)
 
static UINT msi_publish_icons (MSIPACKAGE *package)
 
static UINT msi_publish_sourcelist (MSIPACKAGE *package, HKEY hkey)
 
static UINT msi_publish_product_properties (MSIPACKAGE *package, HKEY hkey)
 
static UINT msi_publish_upgrade_code (MSIPACKAGE *package)
 
static BOOL msi_check_publish (MSIPACKAGE *package)
 
static BOOL msi_check_unpublish (MSIPACKAGE *package)
 
static UINT msi_publish_patches (MSIPACKAGE *package)
 
static UINT ACTION_PublishProduct (MSIPACKAGE *package)
 
static WCHARget_ini_file_name (MSIPACKAGE *package, MSIRECORD *row)
 
static UINT ITERATE_WriteIniValues (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_WriteIniValues (MSIPACKAGE *package)
 
static UINT ITERATE_RemoveIniValuesOnUninstall (MSIRECORD *row, LPVOID param)
 
static UINT ITERATE_RemoveIniValuesOnInstall (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_RemoveIniValues (MSIPACKAGE *package)
 
static void register_dll (const WCHAR *dll, BOOL unregister)
 
static UINT ITERATE_SelfRegModules (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_SelfRegModules (MSIPACKAGE *package)
 
static UINT ITERATE_SelfUnregModules (MSIRECORD *row, LPVOID param)
 
static UINT ACTION_SelfUnregModules (MSIPACKAGE *package)
 
static UINT ACTION_PublishFeatures (MSIPACKAGE *package)
 
static UINT msi_unpublish_feature (MSIPACKAGE *package, MSIFEATURE *feature)
 
static UINT ACTION_UnpublishFeatures (MSIPACKAGE *package)
 
static UINT msi_publish_install_properties (MSIPACKAGE *package, HKEY hkey)
 
static UINT ACTION_RegisterProduct (MSIPACKAGE *package)
 
static UINT ACTION_InstallExecute (MSIPACKAGE *package)
 
static UINT ITERATE_UnpublishIcon (MSIRECORD *row, LPVOID param)
 
static UINT msi_unpublish_icons (MSIPACKAGE *package)
 
static void remove_product_upgrade_code (MSIPACKAGE *package)
 
static UINT ACTION_UnpublishProduct (MSIPACKAGE *package)
 
static BOOL is_full_uninstall (MSIPACKAGE *package)
 
static UINT ACTION_InstallFinalize (MSIPACKAGE *package)
 
UINT ACTION_ForceReboot (MSIPACKAGE *package)
 
static UINT ACTION_ResolveSource (MSIPACKAGE *package)
 
static UINT ACTION_RegisterUser (MSIPACKAGE *package)
 
static UINT iterate_properties (MSIRECORD *record, void *param)
 
static UINT ACTION_ExecuteAction (MSIPACKAGE *package)
 
static UINT ACTION_INSTALL (MSIPACKAGE *package)
 
WCHARmsi_create_component_advertise_string (MSIPACKAGE *package, MSICOMPONENT *component, const WCHAR *feature)
 
static UINT ITERATE_PublishComponent (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_PublishComponents (MSIPACKAGE *package)
 
static UINT ITERATE_UnpublishComponent (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_UnpublishComponents (MSIPACKAGE *package)
 
static UINT ITERATE_InstallService (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_InstallServices (MSIPACKAGE *package)
 
static LPCWSTRmsi_service_args_to_vector (LPWSTR args, DWORD *numargs)
 
static UINT ITERATE_StartService (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_StartServices (MSIPACKAGE *package)
 
static BOOL stop_service_dependents (SC_HANDLE scm, SC_HANDLE service)
 
static UINT stop_service (LPCWSTR name)
 
static UINT ITERATE_StopService (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_StopServices (MSIPACKAGE *package)
 
static UINT ITERATE_DeleteService (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_DeleteServices (MSIPACKAGE *package)
 
static UINT ITERATE_InstallODBCDriver (MSIRECORD *rec, LPVOID param)
 
static UINT ITERATE_InstallODBCTranslator (MSIRECORD *rec, LPVOID param)
 
static UINT ITERATE_InstallODBCDataSource (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_InstallODBC (MSIPACKAGE *package)
 
static UINT ITERATE_RemoveODBCDriver (MSIRECORD *rec, LPVOID param)
 
static UINT ITERATE_RemoveODBCTranslator (MSIRECORD *rec, LPVOID param)
 
static UINT ITERATE_RemoveODBCDataSource (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_RemoveODBC (MSIPACKAGE *package)
 
static UINT env_parse_flags (LPCWSTR *name, LPCWSTR *value, DWORD *flags)
 
static UINT open_env_key (DWORD flags, HKEY *key)
 
static UINT ITERATE_WriteEnvironmentString (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_WriteEnvironmentStrings (MSIPACKAGE *package)
 
static UINT ITERATE_RemoveEnvironmentString (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_RemoveEnvironmentStrings (MSIPACKAGE *package)
 
UINT msi_validate_product_id (MSIPACKAGE *package)
 
static UINT ACTION_ValidateProductID (MSIPACKAGE *package)
 
static UINT ACTION_ScheduleReboot (MSIPACKAGE *package)
 
static UINT ACTION_AllocateRegistrySpace (MSIPACKAGE *package)
 
static UINT ACTION_DisableRollback (MSIPACKAGE *package)
 
static UINT ACTION_InstallAdminPackage (MSIPACKAGE *package)
 
static UINT ACTION_SetODBCFolders (MSIPACKAGE *package)
 
static UINT ITERATE_RemoveExistingProducts (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_RemoveExistingProducts (MSIPACKAGE *package)
 
static UINT ITERATE_MigrateFeatureStates (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_MigrateFeatureStates (MSIPACKAGE *package)
 
static BOOL msi_bind_image (MSIPACKAGE *package, const char *filename, const char *path)
 
static void bind_image (MSIPACKAGE *package, const char *filename, const char *path)
 
static UINT ITERATE_BindImage (MSIRECORD *rec, LPVOID param)
 
static UINT ACTION_BindImage (MSIPACKAGE *package)
 
static UINT msi_unimplemented_action_stub (MSIPACKAGE *package, LPCSTR action, LPCWSTR table)
 
static UINT ACTION_IsolateComponents (MSIPACKAGE *package)
 
static UINT ACTION_RMCCPSearch (MSIPACKAGE *package)
 
static UINT ACTION_RegisterComPlus (MSIPACKAGE *package)
 
static UINT ACTION_UnregisterComPlus (MSIPACKAGE *package)
 
static UINT ACTION_InstallSFPCatalogFile (MSIPACKAGE *package)
 
static UINT ACTION_HandleStandardAction (MSIPACKAGE *package, LPCWSTR action)
 
UINT ACTION_PerformAction (MSIPACKAGE *package, const WCHAR *action)
 
static UINT ACTION_PerformActionSequence (MSIPACKAGE *package, UINT seq)
 
DWORD WINAPI dummy_thread_proc (void *arg)
 
static void start_dummy_thread (struct dummy_thread *info)
 
static void stop_dummy_thread (struct dummy_thread *info)
 
UINT MSI_InstallPackage (MSIPACKAGE *package, LPCWSTR szPackagePath, LPCWSTR szCommandLine)
 

Variables

struct {
   const WCHAR *   action
 
   const UINT   description
 
   const UINT   template
 
   UINT(*   handler )(MSIPACKAGE *)
 
   const WCHAR *   action_rollback
 
StandardActions []
 

Macro Definition Documentation

◆ check_flag_combo

#define check_flag_combo (   x,
  y 
)    ((x) & ~(y)) == (y)

Definition at line 6678 of file action.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 23 of file action.c.

◆ COMPONENT_PROGRESS_VALUE

#define COMPONENT_PROGRESS_VALUE   24000

Definition at line 45 of file action.c.

◆ ENV_ACT_REMOVE

#define ENV_ACT_REMOVE   0x4

Definition at line 6670 of file action.c.

◆ ENV_ACT_REMOVEMATCH

#define ENV_ACT_REMOVEMATCH   0x8

Definition at line 6671 of file action.c.

◆ ENV_ACT_SETABSENT

#define ENV_ACT_SETABSENT   0x2

Definition at line 6669 of file action.c.

◆ ENV_ACT_SETALWAYS

#define ENV_ACT_SETALWAYS   0x1

Definition at line 6668 of file action.c.

◆ ENV_MOD_APPEND

#define ENV_MOD_APPEND   0x40000000

Definition at line 6674 of file action.c.

◆ ENV_MOD_MACHINE

#define ENV_MOD_MACHINE   0x20000000

Definition at line 6673 of file action.c.

◆ ENV_MOD_MASK

#define ENV_MOD_MASK   0xC0000000

Definition at line 6676 of file action.c.

◆ ENV_MOD_PREFIX

#define ENV_MOD_PREFIX   0x80000000

Definition at line 6675 of file action.c.

◆ REG_PROGRESS_VALUE

#define REG_PROGRESS_VALUE   13200

Definition at line 44 of file action.c.

Enumeration Type Documentation

◆ join_op

Enumerator
JOIN_OP_APPEND 
JOIN_OP_PREPEND 
JOIN_OP_REPLACE 

Definition at line 2607 of file action.c.

◆ parse_state

Enumerator
STATE_NONE 
STATE_OK 
STATE_MULTILINE 
STATE_DONE 
STATE_ROOT 
STATE_CONFIGURATION 
STATE_STARTUP 
STATE_UNKNOWN 
state_whitespace 
state_token 
state_quote 

Definition at line 102 of file action.c.

103 {
105  state_token,
107 };

Function Documentation

◆ ACTION_AllocateRegistrySpace()

static UINT ACTION_AllocateRegistrySpace ( MSIPACKAGE package)
static

Definition at line 7187 of file action.c.

7188 {
7189  MSIRECORD *uirow;
7190  int space = msi_get_property_int( package->db, L"AVAILABLEFREEREG", 0 );
7191 
7192  TRACE("%p %d kilobytes\n", package, space);
7193 
7194  uirow = MSI_CreateRecord( 1 );
7195  MSI_RecordSetInteger( uirow, 1, space );
7197  msiobj_release( &uirow->hdr );
7198 
7199  return ERROR_SUCCESS;
7200 }
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIOBJECTHDR hdr
Definition: msipriv.h:151
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
#define L(x)
Definition: ntvdm.h:50
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76

◆ ACTION_BindImage()

static UINT ACTION_BindImage ( MSIPACKAGE package)
static

Definition at line 7420 of file action.c.

7421 {
7422  MSIQUERY *view;
7423  UINT r;
7424 
7425  r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `BindImage`", &view );
7426  if (r == ERROR_SUCCESS)
7427  {
7429  msiobj_release( &view->hdr );
7430  }
7431  return ERROR_SUCCESS;
7432 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static UINT ITERATE_BindImage(MSIRECORD *rec, LPVOID param)
Definition: action.c:7382
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_CostFinalize()

static UINT ACTION_CostFinalize ( MSIPACKAGE package)
static

Definition at line 2234 of file action.c.

2235 {
2236  MSICOMPONENT *comp;
2237  MSIQUERY *view;
2238  WCHAR *level, *primary_key, *primary_folder;
2239  UINT rc;
2240 
2241  TRACE("Building directory properties\n");
2242  msi_resolve_target_folder( package, L"TARGETDIR", TRUE );
2243 
2244  TRACE("Evaluating component conditions\n");
2245  LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
2246  {
2247  if (MSI_EvaluateConditionW( package, comp->Condition ) == MSICONDITION_FALSE)
2248  {
2249  TRACE("Disabling component %s\n", debugstr_w(comp->Component));
2250  comp->Enabled = FALSE;
2251  }
2252  else
2253  comp->Enabled = TRUE;
2254  }
2255  get_client_counts( package );
2256 
2257  /* read components states from the registry */
2260 
2261  if (!process_overrides( package, msi_get_property_int( package->db, L"INSTALLLEVEL", 1 ) ))
2262  {
2263  TRACE("Evaluating feature conditions\n");
2264 
2265  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Condition`", &view );
2266  if (rc == ERROR_SUCCESS)
2267  {
2269  msiobj_release( &view->hdr );
2270  if (rc != ERROR_SUCCESS)
2271  return rc;
2272  }
2273  }
2274 
2275  TRACE("Calculating file cost\n");
2276  calculate_file_cost( package );
2277 
2278  msi_set_property( package->db, L"CostingComplete", L"1", -1 );
2279  /* set default run level if not set */
2280  level = msi_dup_property( package->db, L"INSTALLLEVEL" );
2281  if (!level) msi_set_property( package->db, L"INSTALLLEVEL", L"1", -1 );
2282  msi_free(level);
2283 
2284  if ((rc = MSI_SetFeatureStates( package ))) return rc;
2285 
2286  if ((primary_key = msi_dup_property( package->db, L"PRIMARYFOLDER" )))
2287  {
2288  if ((primary_folder = msi_dup_property( package->db, primary_key )))
2289  {
2290  if (((primary_folder[0] >= 'A' && primary_folder[0] <= 'Z') ||
2291  (primary_folder[0] >= 'a' && primary_folder[0] <= 'z')) && primary_folder[1] == ':')
2292  {
2294  ULONGLONG required;
2295  WCHAR buf[21];
2296 
2297  primary_folder[2] = 0;
2298  if (GetDiskFreeSpaceExW( primary_folder, &free, NULL, NULL ))
2299  {
2300 #ifdef __REACTOS__
2301  swprintf(buf, ARRAY_SIZE(buf), L"%I64u", free.QuadPart / 512);
2302 #else
2303  swprintf( buf, ARRAY_SIZE(buf), L"%lu", free.QuadPart / 512 );
2304 #endif
2305  msi_set_property( package->db, L"PrimaryVolumeSpaceAvailable", buf, -1 );
2306  }
2307  required = get_volume_space_required( package );
2308 #ifdef __REACTOS__
2309  swprintf( buf, ARRAY_SIZE(buf), L"%I64u", required / 512 );
2310 #else
2311  swprintf( buf, ARRAY_SIZE(buf), L"%lu", required / 512 );
2312 #endif
2313  msi_set_property( package->db, L"PrimaryVolumeSpaceRequired", buf, -1 );
2314 
2315 #ifdef __REACTOS__
2316  swprintf( buf, ARRAY_SIZE(buf), L"%I64u", (free.QuadPart - required) / 512 );
2317 #else
2318  swprintf( buf, ARRAY_SIZE(buf), L"%lu", (free.QuadPart - required) / 512 );
2319 #endif
2320  msi_set_property( package->db, L"PrimaryVolumeSpaceRemaining", buf, -1 );
2321  msi_set_property( package->db, L"PrimaryVolumePath", primary_folder, 2 );
2322  }
2323  msi_free( primary_folder );
2324  }
2325  msi_free( primary_key );
2326  }
2327 
2328  /* FIXME: check volume disk space */
2329  msi_set_property( package->db, L"OutOfDiskSpace", L"0", -1 );
2330  msi_set_property( package->db, L"OutOfNoRbDiskSpace", L"0", -1 );
2331 
2332  return ERROR_SUCCESS;
2333 }
GLint level
Definition: gl.h:1546
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT calculate_file_cost(MSIPACKAGE *package)
Definition: action.c:2061
#define TRUE
Definition: types.h:120
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
#define free
Definition: debug_ros.c:5
static void msi_free(void *mem)
Definition: msipriv.h:1159
static void get_client_counts(MSIPACKAGE *package)
Definition: action.c:1443
MSICONDITION MSI_EvaluateConditionW(MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static ULONGLONG get_volume_space_required(MSIPACKAGE *package)
Definition: action.c:2222
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
static BOOL process_overrides(MSIPACKAGE *package, int level)
Definition: action.c:1569
#define debugstr_w
Definition: kernel32.h:32
static void ACTION_GetComponentInstallStates(MSIPACKAGE *package)
Definition: action.c:1464
#define TRACE(s)
Definition: solgame.cpp:4
UINT MSI_SetFeatureStates(MSIPACKAGE *package)
Definition: action.c:1640
__wchar_t WCHAR
Definition: xmlstorage.h:180
uint64_t ULONGLONG
Definition: typedefs.h:67
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
LPWSTR Component
Definition: msipriv.h:525
struct list components
Definition: msipriv.h:401
uint32_t entry
Definition: isohybrid.c:63
int _cdecl swprintf(const WCHAR *,...)
LPWSTR Condition
Definition: msipriv.h:529
void msi_resolve_target_folder(MSIPACKAGE *package, const WCHAR *name, BOOL load_prop)
Definition: action.c:2178
#define ARRAY_SIZE(a)
Definition: main.h:24
static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param)
Definition: action.c:1904
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
static void ACTION_GetFeatureInstallStates(MSIPACKAGE *package)
Definition: action.c:1492
BOOL WINAPI GetDiskFreeSpaceExW(IN LPCWSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
Definition: disk.c:342
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2283
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_CostInitialize()

static UINT ACTION_CostInitialize ( MSIPACKAGE package)
static

Definition at line 1381 of file action.c.

1382 {
1383  msi_set_property( package->db, L"CostingComplete", L"0", -1 );
1384  msi_set_property( package->db, L"ROOTDRIVE", L"C:\\", -1 );
1385 
1386  load_all_folders( package );
1387  msi_load_all_components( package );
1388  msi_load_all_features( package );
1389  load_all_files( package );
1390  load_all_patches( package );
1391  mark_patched_components( package );
1392  load_all_media( package );
1393 
1394  return ERROR_SUCCESS;
1395 }
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT msi_load_all_features(MSIPACKAGE *package)
Definition: action.c:951
static UINT load_all_folders(MSIPACKAGE *package)
Definition: action.c:1358
#define L(x)
Definition: ntvdm.h:50
static UINT load_all_patches(MSIPACKAGE *package)
Definition: action.c:1193
UINT msi_load_all_components(MSIPACKAGE *package)
Definition: action.c:809
MSIDATABASE * db
Definition: msipriv.h:394
static UINT load_all_files(MSIPACKAGE *package)
Definition: action.c:1097
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100
static UINT load_all_media(MSIPACKAGE *package)
Definition: action.c:1127
static void mark_patched_components(MSIPACKAGE *package)
Definition: action.c:1228

◆ ACTION_CreateFolders()

static UINT ACTION_CreateFolders ( MSIPACKAGE package)
static

Definition at line 683 of file action.c.

684 {
685  MSIQUERY *view;
686  UINT rc;
687 
688  if (package->script == SCRIPT_NONE)
689  return msi_schedule_action(package, SCRIPT_INSTALL, L"CreateFolders");
690 
691  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `CreateFolder`", &view );
692  if (rc != ERROR_SUCCESS)
693  return ERROR_SUCCESS;
694 
696  msiobj_release(&view->hdr);
697  return rc;
698 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param)
Definition: action.c:633
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_CreateShortcuts()

static UINT ACTION_CreateShortcuts ( MSIPACKAGE package)
static

Definition at line 3847 of file action.c.

3848 {
3849  MSIQUERY *view;
3850  HRESULT res;
3851  UINT rc;
3852 
3853  if (package->script == SCRIPT_NONE)
3854  return msi_schedule_action(package, SCRIPT_INSTALL, L"CreateShortcuts");
3855 
3856  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Shortcut`", &view);
3857  if (rc != ERROR_SUCCESS)
3858  return ERROR_SUCCESS;
3859 
3860  res = CoInitialize( NULL );
3861 
3863  msiobj_release(&view->hdr);
3864 
3865  if (SUCCEEDED(res)) CoUninitialize();
3866  return rc;
3867 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
if SUCCEEDED(hr)
LONG HRESULT
Definition: typedefs.h:79
static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param)
Definition: action.c:3731
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
GLuint res
Definition: glext.h:9613
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_DeleteServices()

static UINT ACTION_DeleteServices ( MSIPACKAGE package)
static

Definition at line 6218 of file action.c.

6219 {
6220  MSIQUERY *view;
6221  UINT rc;
6222 
6223  if (package->script == SCRIPT_NONE)
6224  return msi_schedule_action(package, SCRIPT_INSTALL, L"DeleteServices");
6225 
6226  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ServiceControl`", &view );
6227  if (rc != ERROR_SUCCESS)
6228  return ERROR_SUCCESS;
6229 
6231  msiobj_release( &view->hdr );
6232  return rc;
6233 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_DeleteService(MSIRECORD *rec, LPVOID param)
Definition: action.c:6152
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_DisableRollback()

static UINT ACTION_DisableRollback ( MSIPACKAGE package)
static

Definition at line 7202 of file action.c.

7203 {
7204  TRACE("%p\n", package);
7205 
7206  msi_set_property( package->db, L"RollbackDisabled", L"1", -1 );
7207  return ERROR_SUCCESS;
7208 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100

◆ ACTION_ExecuteAction()

static UINT ACTION_ExecuteAction ( MSIPACKAGE package)
static

Definition at line 5335 of file action.c.

5336 {
5337  WCHAR *productname;
5338  WCHAR *action;
5339  WCHAR *info_template;
5340  MSIQUERY *view;
5341  MSIRECORD *uirow, *uirow_info;
5342  UINT rc;
5343 
5344  /* Send COMMONDATA and INFO messages. */
5345  /* FIXME: when should these messages be sent? [see also MsiOpenPackage()] */
5346  uirow = MSI_CreateRecord(3);
5347  if (!uirow) return ERROR_OUTOFMEMORY;
5348  MSI_RecordSetStringW(uirow, 0, NULL);
5349  MSI_RecordSetInteger(uirow, 1, 0);
5350  MSI_RecordSetInteger(uirow, 2, package->num_langids ? package->langids[0] : 0);
5353  /* FIXME: send INSTALLMESSAGE_PROGRESS */
5355 
5356  if (!(needs_ui_sequence(package) && ui_sequence_exists(package)))
5357  {
5358  uirow_info = MSI_CreateRecord(0);
5359  if (!uirow_info)
5360  {
5361  msiobj_release(&uirow->hdr);
5362  return ERROR_OUTOFMEMORY;
5363  }
5364  info_template = msi_get_error_message(package->db, MSIERR_INFO_LOGGINGSTART);
5365  MSI_RecordSetStringW(uirow_info, 0, info_template);
5366  msi_free(info_template);
5367  MSI_ProcessMessage(package, INSTALLMESSAGE_INFO|MB_ICONHAND, uirow_info);
5368  msiobj_release(&uirow_info->hdr);
5369  }
5370 
5372 
5373  productname = msi_dup_property(package->db, INSTALLPROPERTY_PRODUCTNAMEW);
5374  MSI_RecordSetInteger(uirow, 1, 1);
5375  MSI_RecordSetStringW(uirow, 2, productname);
5376  MSI_RecordSetStringW(uirow, 3, NULL);
5378  msiobj_release(&uirow->hdr);
5379 
5381 
5382  action = msi_dup_property(package->db, L"EXECUTEACTION");
5383  if (!action) action = msi_strdupW(L"INSTALL", ARRAY_SIZE(L"INSTALL") - 1);
5384 
5385  /* Perform the action. Top-level actions trigger a sequence. */
5386  if (!wcscmp(action, L"INSTALL"))
5387  {
5388  /* Send ACTIONSTART/INFO and INSTALLSTART. */
5389  ui_actionstart(package, L"INSTALL", NULL, NULL);
5390  ui_actioninfo(package, L"INSTALL", TRUE, 0);
5391  uirow = MSI_CreateRecord(2);
5392  if (!uirow)
5393  {
5394  rc = ERROR_OUTOFMEMORY;
5395  goto end;
5396  }
5397  MSI_RecordSetStringW(uirow, 0, NULL);
5398  MSI_RecordSetStringW(uirow, 1, productname);
5399  MSI_RecordSetStringW(uirow, 2, package->ProductCode);
5401  msiobj_release(&uirow->hdr);
5402 
5403  /* Perform the installation. Always use the ExecuteSequence. */
5404  package->InWhatSequence |= SEQUENCE_EXEC;
5405  rc = ACTION_ProcessExecSequence(package);
5406 
5407  /* Send return value and INSTALLEND. */
5408  ui_actioninfo(package, L"INSTALL", FALSE, !rc);
5409  uirow = MSI_CreateRecord(3);
5410  if (!uirow)
5411  {
5412  rc = ERROR_OUTOFMEMORY;
5413  goto end;
5414  }
5415  MSI_RecordSetStringW(uirow, 0, NULL);
5416  MSI_RecordSetStringW(uirow, 1, productname);
5417  MSI_RecordSetStringW(uirow, 2, package->ProductCode);
5418  MSI_RecordSetInteger(uirow, 3, !rc);
5420  msiobj_release(&uirow->hdr);
5421  }
5422  else
5423  rc = ACTION_PerformAction(package, action);
5424 
5425  /* Send all set properties. */
5426  if (!MSI_OpenQuery(package->db, &view, L"SELECT * FROM `_Property`"))
5427  {
5429  msiobj_release(&view->hdr);
5430  }
5431 
5432  /* And finally, toggle the cancel off and on. */
5433  uirow = MSI_CreateRecord(2);
5434  if (!uirow)
5435  {
5436  rc = ERROR_OUTOFMEMORY;
5437  goto end;
5438  }
5439  MSI_RecordSetStringW(uirow, 0, NULL);
5440  MSI_RecordSetInteger(uirow, 1, 2);
5441  MSI_RecordSetInteger(uirow, 2, 0);
5443  MSI_RecordSetInteger(uirow, 2, 1);
5445  msiobj_release(&uirow->hdr);
5446 
5447 end:
5448  msi_free(productname);
5449  msi_free(action);
5450  return rc;
5451 }
LPWSTR ProductCode
Definition: msipriv.h:448
#define MB_ICONHAND
Definition: winuser.h:782
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
static UINT iterate_properties(MSIRECORD *record, void *param)
Definition: action.c:5321
static UINT ACTION_ProcessExecSequence(MSIPACKAGE *package)
Definition: action.c:468
#define TRUE
Definition: types.h:120
UINT LastActionResult
Definition: msipriv.h:412
MSIOBJECTHDR hdr
Definition: msipriv.h:151
WCHAR * msi_get_error_message(MSIDATABASE *, int) DECLSPEC_HIDDEN
Definition: package.c:1823
#define MSI_NULL_INTEGER
Definition: msiquery.h:32
static void msi_free(void *mem)
Definition: msipriv.h:1159
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, INT rc)
Definition: action.c:79
#define L(x)
Definition: ntvdm.h:50
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
#define FALSE
Definition: types.h:117
string_table * strings
Definition: msipriv.h:110
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
static BOOL needs_ui_sequence(MSIPACKAGE *package)
Definition: action.c:391
#define SEQUENCE_EXEC
Definition: msipriv.h:719
WCHAR * msi_strdupW(const WCHAR *value, int len) DECLSPEC_HIDDEN
Definition: record.c:155
#define MSIERR_INFO_LOGGINGSTART
Definition: resource.h:24
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIDATABASE * db
Definition: msipriv.h:394
LANGID * langids
Definition: msipriv.h:398
static INT ui_actionstart(MSIPACKAGE *package, LPCWSTR action, LPCWSTR description, LPCWSTR template)
Definition: action.c:56
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
GLuint GLuint end
Definition: gl.h:1545
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
static const WCHAR INSTALLPROPERTY_PRODUCTNAMEW[]
Definition: msi.h:277
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action)
Definition: action.c:7610
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
UINT num_langids
Definition: msipriv.h:397
UINT InWhatSequence
Definition: msipriv.h:438
const WCHAR * action
Definition: action.c:7479
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static BOOL ui_sequence_exists(MSIPACKAGE *package)
Definition: action.c:341
static IOleDocumentView * view
Definition: activex.c:1749
INT MSI_ProcessMessageVerbatim(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1848
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_get_string_table_codepage(const string_table *st) DECLSPEC_HIDDEN
Definition: string.c:671
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2283

Referenced by ACTION_INSTALL().

◆ ACTION_FileCost()

static UINT ACTION_FileCost ( MSIPACKAGE package)
static

Definition at line 1438 of file action.c.

1439 {
1440  return ERROR_SUCCESS;
1441 }
#define ERROR_SUCCESS
Definition: deptool.c:10

◆ ACTION_ForceReboot()

UINT ACTION_ForceReboot ( MSIPACKAGE package)

Definition at line 5183 of file action.c.

5184 {
5185  WCHAR buffer[256], sysdir[MAX_PATH], squashed_pc[SQUASHED_GUID_SIZE];
5186  HKEY hkey;
5187 
5188  squash_guid( package->ProductCode, squashed_pc );
5189 
5190  GetSystemDirectoryW(sysdir, ARRAY_SIZE(sysdir));
5191  RegCreateKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce", &hkey);
5192  swprintf(buffer, ARRAY_SIZE(buffer), L"%s\\MsiExec.exe /@ \"%s\"", sysdir, squashed_pc);
5193 
5194  msi_reg_set_val_str( hkey, squashed_pc, buffer );
5195  RegCloseKey(hkey);
5196 
5197  TRACE("Reboot command %s\n",debugstr_w(buffer));
5198 
5199  RegCreateKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\RunOnceEntries",
5200  &hkey);
5201  swprintf( buffer, ARRAY_SIZE(buffer), L"/I \"%s\" AFTERREBOOT=1 RUNONCEENTRY=\"%s\"", package->ProductCode,
5202  squashed_pc );
5203 
5204  msi_reg_set_val_str( hkey, squashed_pc, buffer );
5205  RegCloseKey(hkey);
5206 
5207  return ERROR_INSTALL_SUSPEND;
5208 }
LPWSTR ProductCode
Definition: msipriv.h:448
GLuint buffer
Definition: glext.h:5915
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1199
int _cdecl swprintf(const WCHAR *,...)
#define ERROR_INSTALL_SUSPEND
Definition: winerror.h:962
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:734
#define ARRAY_SIZE(a)
Definition: main.h:24
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
#define RegCloseKey(hKey)
Definition: registry.h:47
BOOL squash_guid(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
Definition: registry.c:74
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by custom_get_thread_return(), and ITERATE_Actions().

◆ ACTION_GetComponentInstallStates()

static void ACTION_GetComponentInstallStates ( MSIPACKAGE package)
static

Definition at line 1464 of file action.c.

1465 {
1466  MSICOMPONENT *comp;
1467  UINT r;
1468 
1470  {
1471  if (!comp->ComponentId) continue;
1472 
1475  &comp->Installed );
1476  if (r == ERROR_SUCCESS) continue;
1477 
1480  &comp->Installed );
1481  if (r == ERROR_SUCCESS) continue;
1482 
1485  &comp->Installed );
1486  if (r == ERROR_SUCCESS) continue;
1487 
1489  }
1490 }
LPWSTR ProductCode
Definition: msipriv.h:448
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
struct list components
Definition: msipriv.h:401
uint32_t entry
Definition: isohybrid.c:63
LPWSTR ComponentId
Definition: msipriv.h:526
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
INSTALLSTATE Installed
Definition: msipriv.h:531
UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, LPCWSTR szComponent, INSTALLSTATE *pdwState)
Definition: msi.c:2143

Referenced by ACTION_CostFinalize().

◆ ACTION_GetFeatureInstallStates()

static void ACTION_GetFeatureInstallStates ( MSIPACKAGE package)
static

Definition at line 1492 of file action.c.

1493 {
1495 
1497  {
1499 
1501  feature->Installed = INSTALLSTATE_ABSENT;
1502  else
1503  feature->Installed = state;
1504  }
1505 }
LPWSTR ProductCode
Definition: msipriv.h:448
INTERNETFEATURELIST feature
Definition: misc.c:1719
INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
Definition: msi.c:3068
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
struct list features
Definition: msipriv.h:402
static int state
Definition: maze.c:121
uint32_t entry
Definition: isohybrid.c:63
int INSTALLSTATE
Definition: winemsi.idl:31

Referenced by ACTION_CostFinalize().

◆ ACTION_HandleCustomAction()

static UINT ACTION_HandleCustomAction ( MSIPACKAGE package,
LPCWSTR  action 
)
static

Definition at line 514 of file action.c.

515 {
516  UINT arc;
517  INT uirc;
518 
519  uirc = ui_actionstart(package, action, NULL, NULL);
520  if (uirc == IDCANCEL)
521  return ERROR_INSTALL_USEREXIT;
522  ui_actioninfo(package, action, TRUE, 0);
523  arc = ACTION_CustomAction(package, action);
524  uirc = !arc;
525 
526  if (arc == ERROR_FUNCTION_NOT_CALLED && needs_ui_sequence(package))
527  {
528  uirc = ACTION_ShowDialog(package, action);
529  switch (uirc)
530  {
531  case -1:
532  return ERROR_SUCCESS; /* stop immediately */
533  case 0: arc = ERROR_FUNCTION_NOT_CALLED; break;
534  case 1: arc = ERROR_SUCCESS; break;
535  case 2: arc = ERROR_INSTALL_USEREXIT; break;
536  case 3: arc = ERROR_INSTALL_FAILURE; break;
537  case 4: arc = ERROR_INSTALL_SUSPEND; break;
538  case 5: arc = ERROR_MORE_DATA; break;
539  case 6: arc = ERROR_INVALID_HANDLE_STATE; break;
540  case 7: arc = ERROR_INVALID_DATA; break;
541  case 8: arc = ERROR_INSTALL_ALREADY_RUNNING; break;
542  case 9: arc = ERROR_INSTALL_PACKAGE_REJECTED; break;
543  default: arc = ERROR_FUNCTION_FAILED; break;
544  }
545  }
546 
547  ui_actioninfo(package, action, FALSE, uirc);
548 
549  return arc;
550 }
#define ERROR_INSTALL_PACKAGE_REJECTED
Definition: winerror.h:983
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
int32_t INT
Definition: typedefs.h:58
static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, INT rc)
Definition: action.c:79
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
UINT ACTION_CustomAction(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:1460
INT ACTION_ShowDialog(MSIPACKAGE *package, const WCHAR *dialog)
Definition: dialog.c:4520
#define ERROR_INVALID_HANDLE_STATE
Definition: winerror.h:967
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
static BOOL needs_ui_sequence(MSIPACKAGE *package)
Definition: action.c:391
#define ERROR_INSTALL_USEREXIT
Definition: winerror.h:960
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
static INT ui_actionstart(MSIPACKAGE *package, LPCWSTR action, LPCWSTR description, LPCWSTR template)
Definition: action.c:56
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define ERROR_INVALID_DATA
Definition: winerror.h:116
#define ERROR_INSTALL_SUSPEND
Definition: winerror.h:962
const WCHAR * action
Definition: action.c:7479
#define ERROR_INSTALL_ALREADY_RUNNING
Definition: winerror.h:976
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
#define IDCANCEL
Definition: winuser.h:825

Referenced by ACTION_PerformAction().

◆ ACTION_HandleStandardAction()

static UINT ACTION_HandleStandardAction ( MSIPACKAGE package,
LPCWSTR  action 
)
static

Definition at line 7567 of file action.c.

7568 {
7570  UINT i;
7571 
7572  i = 0;
7573  while (StandardActions[i].action != NULL)
7574  {
7575  if (!wcscmp( StandardActions[i].action, action ))
7576  {
7577  WCHAR description[100] = {0}, template[100] = {0};
7578 
7579  if (StandardActions[i].description != 0)
7581  if (StandardActions[i].template != 0)
7582  LoadStringW(msi_hInstance, StandardActions[i].template, (LPWSTR)&template, 100);
7583 
7584  ui_actionstart(package, action, description, template);
7585  if (StandardActions[i].handler)
7586  {
7587  ui_actioninfo( package, action, TRUE, 0 );
7588  rc = StandardActions[i].handler( package );
7589  ui_actioninfo( package, action, FALSE, !rc );
7590 
7591  if (StandardActions[i].action_rollback && !package->need_rollback)
7592  {
7593  TRACE("scheduling rollback action\n");
7595  }
7596  }
7597  else
7598  {
7599  FIXME("unhandled standard action %s\n", debugstr_w(action));
7600  rc = ERROR_SUCCESS;
7601  }
7602  break;
7603  }
7604  i++;
7605  }
7606 
7607  return rc;
7608 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
const WCHAR * action_rollback
Definition: action.c:7483
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
static void ui_actioninfo(MSIPACKAGE *package, LPCWSTR action, BOOL start, INT rc)
Definition: action.c:79
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
HINSTANCE msi_hInstance
Definition: msi_main.c:51
static INT ui_actionstart(MSIPACKAGE *package, LPCWSTR action, LPCWSTR description, LPCWSTR template)
Definition: action.c:56
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
const WCHAR * action
Definition: action.c:7479
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
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
const UINT description
Definition: action.c:7480
static const struct @484 StandardActions[]
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char need_rollback
Definition: msipriv.h:471
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90

Referenced by ACTION_PerformAction().

◆ ACTION_INSTALL()

static UINT ACTION_INSTALL ( MSIPACKAGE package)
static

Definition at line 5453 of file action.c.

5454 {
5455  msi_set_property(package->db, L"EXECUTEACTION", L"INSTALL", -1);
5456  if (needs_ui_sequence(package) && ui_sequence_exists(package))
5457  {
5458  package->InWhatSequence |= SEQUENCE_UI;
5459  return ACTION_ProcessUISequence(package);
5460  }
5461  else
5462  return ACTION_ExecuteAction(package);
5463 }
#define L(x)
Definition: ntvdm.h:50
static BOOL needs_ui_sequence(MSIPACKAGE *package)
Definition: action.c:391
static UINT ACTION_ExecuteAction(MSIPACKAGE *package)
Definition: action.c:5335
MSIDATABASE * db
Definition: msipriv.h:394
UINT InWhatSequence
Definition: msipriv.h:438
static UINT ACTION_ProcessUISequence(MSIPACKAGE *package)
Definition: action.c:494
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100
static BOOL ui_sequence_exists(MSIPACKAGE *package)
Definition: action.c:341
#define SEQUENCE_UI
Definition: msipriv.h:718

◆ ACTION_InstallAdminPackage()

static UINT ACTION_InstallAdminPackage ( MSIPACKAGE package)
static

Definition at line 7210 of file action.c.

7211 {
7212  FIXME("%p\n", package);
7213  return ERROR_SUCCESS;
7214 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define FIXME(fmt,...)
Definition: debug.h:111

◆ ACTION_InstallExecute()

static UINT ACTION_InstallExecute ( MSIPACKAGE package)
static

Definition at line 5037 of file action.c.

5038 {
5039  return execute_script(package, SCRIPT_INSTALL);
5040 }
static UINT execute_script(MSIPACKAGE *package, UINT script)
Definition: action.c:1397

◆ ACTION_InstallFinalize()

static UINT ACTION_InstallFinalize ( MSIPACKAGE package)
static

Definition at line 5163 of file action.c.

5164 {
5165  UINT rc;
5166 
5167  /* first do the same as an InstallExecute */
5168  rc = execute_script(package, SCRIPT_INSTALL);
5169  if (rc != ERROR_SUCCESS)
5170  return rc;
5171 
5172  /* then handle commit actions */
5173  rc = execute_script(package, SCRIPT_COMMIT);
5174  if (rc != ERROR_SUCCESS)
5175  return rc;
5176 
5177  if (is_full_uninstall(package))
5178  rc = ACTION_UnpublishProduct(package);
5179 
5180  return rc;
5181 }
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT execute_script(MSIPACKAGE *package, UINT script)
Definition: action.c:1397
static BOOL is_full_uninstall(MSIPACKAGE *package)
Definition: action.c:5149
unsigned int UINT
Definition: ndis.h:50
static UINT ACTION_UnpublishProduct(MSIPACKAGE *package)
Definition: action.c:5117

◆ ACTION_InstallInitialize()

static UINT ACTION_InstallInitialize ( MSIPACKAGE package)
static

Definition at line 3062 of file action.c.

3063 {
3064  return ERROR_SUCCESS;
3065 }
#define ERROR_SUCCESS
Definition: deptool.c:10

◆ ACTION_InstallODBC()

static UINT ACTION_InstallODBC ( MSIPACKAGE package)
static

Definition at line 6464 of file action.c.

6465 {
6466  MSIQUERY *view;
6467  UINT rc;
6468 
6469  if (package->script == SCRIPT_NONE)
6470  return msi_schedule_action(package, SCRIPT_INSTALL, L"InstallODBC");
6471 
6472  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `ODBCDriver`", &view);
6473  if (rc == ERROR_SUCCESS)
6474  {
6476  msiobj_release(&view->hdr);
6477  if (rc != ERROR_SUCCESS)
6478  return rc;
6479  }
6480  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `ODBCTranslator`", &view);
6481  if (rc == ERROR_SUCCESS)
6482  {
6484  msiobj_release(&view->hdr);
6485  if (rc != ERROR_SUCCESS)
6486  return rc;
6487  }
6488  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `ODBCDataSource`", &view);
6489  if (rc == ERROR_SUCCESS)
6490  {
6492  msiobj_release(&view->hdr);
6493  if (rc != ERROR_SUCCESS)
6494  return rc;
6495  }
6496  return ERROR_SUCCESS;
6497 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_InstallODBCTranslator(MSIRECORD *rec, LPVOID param)
Definition: action.c:6327
#define L(x)
Definition: ntvdm.h:50
static UINT ITERATE_InstallODBCDriver(MSIRECORD *rec, LPVOID param)
Definition: action.c:6235
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT ITERATE_InstallODBCDataSource(MSIRECORD *rec, LPVOID param)
Definition: action.c:6410
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_InstallServices()

static UINT ACTION_InstallServices ( MSIPACKAGE package)
static

Definition at line 5807 of file action.c.

5808 {
5809  MSIQUERY *view;
5810  UINT rc;
5811 
5812  if (package->script == SCRIPT_NONE)
5813  return msi_schedule_action(package, SCRIPT_INSTALL, L"InstallServices");
5814 
5815  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `ServiceInstall`", &view);
5816  if (rc != ERROR_SUCCESS)
5817  return ERROR_SUCCESS;
5818 
5820  msiobj_release(&view->hdr);
5821  return rc;
5822 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_InstallService(MSIRECORD *rec, LPVOID param)
Definition: action.c:5680
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_InstallSFPCatalogFile()

static UINT ACTION_InstallSFPCatalogFile ( MSIPACKAGE package)
static

Definition at line 7472 of file action.c.

7473 {
7474  return msi_unimplemented_action_stub( package, "InstallSFPCatalogFile", L"SFPCatalog" );
7475 }
#define L(x)
Definition: ntvdm.h:50
static UINT msi_unimplemented_action_stub(MSIPACKAGE *package, LPCSTR action, LPCWSTR table)
Definition: action.c:7434

◆ ACTION_InstallValidate()

static UINT ACTION_InstallValidate ( MSIPACKAGE package)
static

Definition at line 3068 of file action.c.

3069 {
3070  MSICOMPONENT *comp;
3071  DWORD total = 0, count = 0;
3072  MSIQUERY *view;
3074  MSIFILE *file;
3075  UINT rc;
3076 
3077  TRACE("InstallValidate\n");
3078 
3079  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Registry`", &view );
3080  if (rc == ERROR_SUCCESS)
3081  {
3082  rc = MSI_IterateRecords( view, &count, NULL, package );
3083  msiobj_release( &view->hdr );
3084  if (rc != ERROR_SUCCESS)
3085  return rc;
3087  }
3088  LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
3090 
3091  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
3092  total += file->FileSize;
3093 
3094  msi_ui_progress( package, 0, total, 0, 0 );
3095 
3097  {
3098  TRACE("Feature: %s Installed %d Request %d Action %d\n",
3099  debugstr_w(feature->Feature), feature->Installed,
3100  feature->ActionRequest, feature->Action);
3101  }
3102  return ERROR_SUCCESS;
3103 }
INTERNETFEATURELIST feature
Definition: misc.c:1719
#define ERROR_SUCCESS
Definition: deptool.c:10
GLuint GLuint GLsizei count
Definition: gl.h:1545
void msi_ui_progress(MSIPACKAGE *package, int a, int b, int c, int d)
Definition: action.c:596
struct list files
Definition: msipriv.h:403
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
struct list features
Definition: msipriv.h:402
const char file[]
Definition: icontest.c:11
unsigned long DWORD
Definition: ntddk_ex.h:95
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
#define REG_PROGRESS_VALUE
Definition: action.c:44
struct list components
Definition: msipriv.h:401
uint32_t entry
Definition: isohybrid.c:63
#define COMPONENT_PROGRESS_VALUE
Definition: action.c:45
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
size_t total
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
Definition: fci.c:126
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_IsolateComponents()

static UINT ACTION_IsolateComponents ( MSIPACKAGE package)
static

Definition at line 7452 of file action.c.

7453 {
7454  return msi_unimplemented_action_stub( package, "IsolateComponents", L"IsolateComponent" );
7455 }
#define L(x)
Definition: ntvdm.h:50
static UINT msi_unimplemented_action_stub(MSIPACKAGE *package, LPCSTR action, LPCWSTR table)
Definition: action.c:7434

◆ ACTION_LaunchConditions()

static UINT ACTION_LaunchConditions ( MSIPACKAGE package)
static

Definition at line 3130 of file action.c.

3131 {
3132  MSIQUERY *view;
3133  UINT rc;
3134 
3135  TRACE("Checking launch conditions\n");
3136 
3137  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `LaunchCondition`", &view);
3138  if (rc != ERROR_SUCCESS)
3139  return ERROR_SUCCESS;
3140 
3142  msiobj_release(&view->hdr);
3143  return rc;
3144 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
static UINT ITERATE_LaunchConditions(MSIRECORD *row, LPVOID param)
Definition: action.c:3105
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_MigrateFeatureStates()

static UINT ACTION_MigrateFeatureStates ( MSIPACKAGE package)
static

Definition at line 7339 of file action.c.

7340 {
7341  MSIQUERY *view;
7342  UINT r;
7343 
7344  if (msi_get_property_int( package->db, L"Installed", 0 ))
7345  {
7346  TRACE("product is installed, skipping action\n");
7347  return ERROR_SUCCESS;
7348  }
7349  if (msi_get_property_int( package->db, L"Preselected", 0 ))
7350  {
7351  TRACE("Preselected property is set, not migrating feature states\n");
7352  return ERROR_SUCCESS;
7353  }
7354  r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Upgrade`", &view );
7355  if (r == ERROR_SUCCESS)
7356  {
7358  msiobj_release( &view->hdr );
7359  if (r != ERROR_SUCCESS)
7360  return r;
7361  }
7362  return ERROR_SUCCESS;
7363 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
#define L(x)
Definition: ntvdm.h:50
static UINT ITERATE_MigrateFeatureStates(MSIRECORD *rec, LPVOID param)
Definition: action.c:7304
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_PerformAction()

UINT ACTION_PerformAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 7610 of file action.c.

7611 {
7612  UINT rc;
7613 
7614  TRACE("Performing action (%s)\n", debugstr_w(action));
7615 
7616  package->action_progress_increment = 0;
7617  rc = ACTION_HandleStandardAction(package, action);
7618 
7619  if (rc == ERROR_FUNCTION_NOT_CALLED)
7620  rc = ACTION_HandleCustomAction(package, action);
7621 
7622  if (rc == ERROR_FUNCTION_NOT_CALLED)
7623  WARN("unhandled msi action %s\n", debugstr_w(action));
7624 
7625  return rc;
7626 }
#define WARN(fmt,...)
Definition: debug.h:112
static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:514
#define debugstr_w
Definition: kernel32.h:32
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
#define TRACE(s)
Definition: solgame.cpp:4
const WCHAR * action
Definition: action.c:7479
unsigned int UINT
Definition: ndis.h:50
UINT action_progress_increment
Definition: msipriv.h:413
static UINT ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:7567

Referenced by ACTION_ExecuteAction(), ACTION_PerformActionSequence(), event_do_action(), execute_script(), ITERATE_Actions(), MSI_InstallPackage(), MsiCollectUserInfoA(), MsiCollectUserInfoW(), MsiConfigureFeatureW(), and MsiDoActionW().

◆ ACTION_PerformActionSequence()

static UINT ACTION_PerformActionSequence ( MSIPACKAGE package,
UINT  seq 
)
static

Definition at line 7628 of file action.c.

7629 {
7630  UINT rc = ERROR_SUCCESS;
7631  MSIRECORD *row;
7632 
7633  if (needs_ui_sequence(package))
7634  row = MSI_QueryGetRecord(package->db, L"SELECT * FROM `InstallUISequence` WHERE `Sequence` = %d", seq);
7635  else
7636  row = MSI_QueryGetRecord(package->db, L"SELECT * FROM `InstallExecuteSequence` WHERE `Sequence` = %d", seq);
7637 
7638  if (row)
7639  {
7640  LPCWSTR action, cond;
7641 
7642  TRACE("Running the actions\n");
7643 
7644  /* check conditions */
7645  cond = MSI_RecordGetString(row, 2);
7646 
7647  /* this is a hack to skip errors in the condition code */
7648  if (MSI_EvaluateConditionW(package, cond) == MSICONDITION_FALSE)
7649  {
7650  msiobj_release(&row->hdr);
7651  return ERROR_SUCCESS;
7652  }
7653 
7655  if (!action)
7656  {
7657  ERR("failed to fetch action\n");
7658  msiobj_release(&row->hdr);
7659  return ERROR_FUNCTION_FAILED;
7660  }
7661 
7662  rc = ACTION_PerformAction(package, action);
7663 
7664  msiobj_release(&row->hdr);
7665  }
7666 
7667  return rc;
7668 }
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
MSICONDITION MSI_EvaluateConditionW(MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
static BOOL needs_ui_sequence(MSIPACKAGE *package)
Definition: action.c:391
MSIRECORD *WINAPIV MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
Definition: msiquery.c:201
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
UINT ACTION_PerformAction(MSIPACKAGE *package, const WCHAR *action)
Definition: action.c:7610
#define ERR(fmt,...)
Definition: debug.h:110
const WCHAR * action
Definition: action.c:7479
unsigned int UINT
Definition: ndis.h:50
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78

Referenced by MSI_InstallPackage().

◆ ACTION_ProcessComponents()

static UINT ACTION_ProcessComponents ( MSIPACKAGE package)
static

Definition at line 3313 of file action.c.

3314 {
3315  WCHAR squashed_pc[SQUASHED_GUID_SIZE], squashed_cc[SQUASHED_GUID_SIZE];
3316  UINT rc;
3317  MSICOMPONENT *comp;
3318  HKEY hkey;
3319 
3320  TRACE("\n");
3321 
3322  msi_set_sourcedir_props(package, FALSE);
3323 
3324  if (package->script == SCRIPT_NONE)
3325  return msi_schedule_action(package, SCRIPT_INSTALL, L"ProcessComponents");
3326 
3327  squash_guid( package->ProductCode, squashed_pc );
3328 
3329  LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
3330  {
3331  MSIRECORD *uirow;
3333 
3334  msi_ui_progress( package, 2, COMPONENT_PROGRESS_VALUE, 0, 0 );
3335  if (!comp->ComponentId)
3336  continue;
3337 
3338  squash_guid( comp->ComponentId, squashed_cc );
3339  msi_free( comp->FullKeypath );
3340  comp->FullKeypath = build_full_keypath( package, comp );
3341 
3342  refcount_component( package, comp );
3343 
3344  if (package->need_rollback) action = comp->Installed;
3345  else action = comp->ActionRequest;
3346 
3347  TRACE("Component %s (%s) Keypath=%s RefCount=%u Clients=%u Action=%u\n",
3348  debugstr_w(comp->Component), debugstr_w(squashed_cc),
3349  debugstr_w(comp->FullKeypath), comp->RefCount, comp->num_clients, action);
3350 
3352  {
3353  if (package->Context == MSIINSTALLCONTEXT_MACHINE)
3354  rc = MSIREG_OpenUserDataComponentKey(comp->ComponentId, L"S-1-5-18", &hkey, TRUE);
3355  else
3357 
3358  if (rc != ERROR_SUCCESS)
3359  continue;
3360 
3362  {
3363  msi_reg_set_val_str(hkey, L"00000000000000000000000000000000", comp->FullKeypath);
3364  }
3365  if (action == INSTALLSTATE_LOCAL)
3366  msi_reg_set_val_str( hkey, squashed_pc, comp->FullKeypath );
3367  else
3368  {
3369  MSIFILE *file;
3370  MSIRECORD *row;
3371  LPWSTR ptr, ptr2;
3373  WCHAR base[MAX_PATH];
3374  LPWSTR sourcepath;
3375 
3376  if (!comp->KeyPath || !(file = msi_get_loaded_file(package, comp->KeyPath)))
3377  continue;
3378 
3379  if (!(row = MSI_QueryGetRecord(package->db, L"SELECT * FROM `Media` WHERE `LastSequence` >= %d "
3380  L"ORDER BY `DiskId`", file->Sequence)))
3381  return ERROR_FUNCTION_FAILED;
3382 
3384  ptr2 = wcsrchr(source, '\\') + 1;
3385  msiobj_release(&row->hdr);
3386 
3387  lstrcpyW(base, package->PackagePath);
3388  ptr = wcsrchr(base, '\\');
3389  *(ptr + 1) = '\0';
3390 
3391  sourcepath = msi_resolve_file_source(package, file);
3392  ptr = sourcepath + lstrlenW(base);
3393  lstrcpyW(ptr2, ptr);
3394  msi_free(sourcepath);
3395 
3396  msi_reg_set_val_str( hkey, squashed_pc, source );
3397  }
3398  RegCloseKey(hkey);
3399  }
3400  else if (action == INSTALLSTATE_ABSENT)
3401  {
3402  if (comp->num_clients <= 0)
3403  {
3404  if (package->Context == MSIINSTALLCONTEXT_MACHINE)
3405  rc = MSIREG_DeleteUserDataComponentKey( comp->ComponentId, L"S-1-5-18" );
3406  else
3408 
3409  if (rc != ERROR_SUCCESS) WARN( "failed to delete component key %u\n", rc );
3410  }
3411  else
3412  {
3413  LONG res;
3414 
3415  if (package->Context == MSIINSTALLCONTEXT_MACHINE)
3416  rc = MSIREG_OpenUserDataComponentKey( comp->ComponentId, L"S-1-5-18", &hkey, FALSE );
3417  else
3418  rc = MSIREG_OpenUserDataComponentKey( comp->ComponentId, NULL, &hkey, FALSE );
3419 
3420  if (rc != ERROR_SUCCESS)
3421  {
3422  WARN( "failed to open component key %u\n", rc );
3423  continue;
3424  }
3425  res = RegDeleteValueW( hkey, squashed_pc );
3426  RegCloseKey(hkey);
3427  if (res) WARN( "failed to delete component value %ld\n", res );
3428  }
3429  }
3430 
3431  /* UI stuff */
3432  uirow = MSI_CreateRecord(3);
3433  MSI_RecordSetStringW(uirow,1,package->ProductCode);
3434  MSI_RecordSetStringW(uirow,2,comp->ComponentId);
3435  MSI_RecordSetStringW(uirow,3,comp->FullKeypath);
3437  msiobj_release( &uirow->hdr );
3438  }
3439  return ERROR_SUCCESS;
3440 }
LPWSTR ProductCode
Definition: msipriv.h:448
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
MSIOBJECTHDR hdr
Definition: msipriv.h:151
LPWSTR PackagePath
Definition: msipriv.h:447
#define WARN(fmt,...)
Definition: debug.h:112
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
Definition: action.c:354
void msi_ui_progress(MSIPACKAGE *package, int a, int b, int c, int d)
Definition: action.c:596
static void msi_free(void *mem)
Definition: msipriv.h:1159
LPWSTR KeyPath
Definition: msipriv.h:530
#define lstrlenW
Definition: compat.h:609
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
static PVOID ptr
Definition: dispmode.c:27
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:526
INSTALLSTATE ActionRequest
Definition: msipriv.h:532
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
MSIRECORD *WINAPIV MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
Definition: msiquery.c:201
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:574
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static void refcount_component(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:3226
#define MAX_PATH
Definition: compat.h:34
const char file[]
Definition: icontest.c:11
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
LPWSTR Component
Definition: msipriv.h:525
struct list components
Definition: msipriv.h:401
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
uint32_t entry
Definition: isohybrid.c:63
int INSTALLSTATE
Definition: winemsi.idl:31
#define wcsrchr
Definition: compat.h:16
int _cdecl swprintf(const WCHAR *,...)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
UINT MSIREG_DeleteUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid) DECLSPEC_HIDDEN
Definition: registry.c:552
LPWSTR ComponentId
Definition: msipriv.h:526
#define COMPONENT_PROGRESS_VALUE
Definition: action.c:45
const WCHAR * action
Definition: action.c:7479
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:734
#define lstrcpyW
Definition: compat.h:608
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2355
#define ARRAY_SIZE(a)
Definition: main.h:24
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
WCHAR * msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file)
Definition: files.c:528
UINT Context
Definition: msipriv.h:459
INSTALLSTATE Installed
Definition: msipriv.h:531
LPWSTR FullKeypath
Definition: msipriv.h:538
GLuint res
Definition: glext.h:9613
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static WCHAR * build_full_keypath(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:3296
unsigned char need_rollback
Definition: msipriv.h:471
#define RegCloseKey(hKey)
Definition: registry.h:47
BOOL squash_guid(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
Definition: registry.c:74
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
Definition: fci.c:126

◆ ACTION_ProcessExecSequence()

static UINT ACTION_ProcessExecSequence ( MSIPACKAGE package)
static

Definition at line 468 of file action.c.

469 {
470  MSIQUERY *view;
471  UINT rc;
472 
473  if (package->ExecuteSequenceRun)
474  {
475  TRACE("Execute Sequence already Run\n");
476  return ERROR_SUCCESS;
477  }
478 
479  package->ExecuteSequenceRun = TRUE;
480 
481  rc = MSI_OpenQuery(package->db, &view,
482  L"SELECT * FROM `InstallExecuteSequence` WHERE `Sequence` > 0 ORDER BY `Sequence`");
483  if (rc == ERROR_SUCCESS)
484  {
485  TRACE("Running the actions\n");
486 
487  msi_set_property( package->db, L"SourceDir", NULL, -1 );
488  rc = MSI_IterateRecords(view, NULL, ITERATE_Actions, package);
489  msiobj_release(&view->hdr);
490  }
491  return rc;
492 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
BOOL ExecuteSequenceRun
Definition: msipriv.h:437
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
Definition: action.c:410
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163

Referenced by ACTION_ExecuteAction().

◆ ACTION_ProcessUISequence()

static UINT ACTION_ProcessUISequence ( MSIPACKAGE package)
static

Definition at line 494 of file action.c.

495 {
496  MSIQUERY *view;
497  UINT rc;
498 
499  rc = MSI_DatabaseOpenViewW(package->db,
500  L"SELECT * FROM `InstallUISequence` WHERE `Sequence` > 0 ORDER BY `Sequence`",
501  &view);
502  if (rc == ERROR_SUCCESS)
503  {
504  TRACE("Running the actions\n");
505  rc = MSI_IterateRecords(view, NULL, ITERATE_Actions, package);
506  msiobj_release(&view->hdr);
507  }
508  return rc;
509 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT ITERATE_Actions(MSIRECORD *row, LPVOID param)
Definition: action.c:410
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

Referenced by ACTION_INSTALL().

◆ ACTION_PublishComponents()

static UINT ACTION_PublishComponents ( MSIPACKAGE package)
static

Definition at line 5597 of file action.c.

5598 {
5599  MSIQUERY *view;
5600  UINT rc;
5601 
5602  if (package->script == SCRIPT_NONE)
5603  return msi_schedule_action(package, SCRIPT_INSTALL, L"PublishComponents");
5604 
5605  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `PublishComponent`", &view);
5606  if (rc != ERROR_SUCCESS)
5607  return ERROR_SUCCESS;
5608 
5610  msiobj_release(&view->hdr);
5611  return rc;
5612 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_PublishComponent(MSIRECORD *rec, LPVOID param)
Definition: action.c:5493
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_PublishFeatures()

static UINT ACTION_PublishFeatures ( MSIPACKAGE package)
static

Definition at line 4731 of file action.c.

4732 {
4734  UINT rc;
4735  HKEY hkey = NULL, userdata = NULL;
4736 
4737  if (package->script == SCRIPT_NONE)
4738  return msi_schedule_action(package, SCRIPT_INSTALL, L"PublishFeatures");
4739 
4740  if (!msi_check_publish(package))
4741  return ERROR_SUCCESS;
4742 
4743  rc = MSIREG_OpenFeaturesKey(package->ProductCode, NULL, package->Context,
4744  &hkey, TRUE);
4745  if (rc != ERROR_SUCCESS)
4746  goto end;
4747 
4748  rc = MSIREG_OpenUserDataFeaturesKey(package->ProductCode, NULL, package->Context,
4749  &userdata, TRUE);
4750  if (rc != ERROR_SUCCESS)
4751  goto end;
4752 
4753  /* here the guids are base 85 encoded */
4755  {
4756  ComponentList *cl;
4757  LPWSTR data = NULL;
4758  GUID clsid;
4759  INT size;
4760  BOOL absent = FALSE;
4761  MSIRECORD *uirow;
4762 
4763  if (feature->Level <= 0) continue;
4764  if (feature->Action == INSTALLSTATE_UNKNOWN &&
4765  feature->Installed != INSTALLSTATE_ABSENT) continue;
4766 
4767  if (feature->Action != INSTALLSTATE_LOCAL &&
4768  feature->Action != INSTALLSTATE_SOURCE &&
4769  feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE;
4770 
4771  size = 1;
4772  LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
4773  {
4774  size += 21;
4775  }
4776  if (feature->Feature_Parent)
4777  size += lstrlenW( feature->Feature_Parent )+2;
4778 
4779  data = msi_alloc(size * sizeof(WCHAR));
4780 
4781  data[0] = 0;
4782  LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry )
4783  {
4784  MSICOMPONENT* component = cl->component;
4785  WCHAR buf[21];
4786 
4787  buf[0] = 0;
4788  if (component->ComponentId)
4789  {
4790  TRACE("From %s\n",debugstr_w(component->ComponentId));
4791  CLSIDFromString(component->ComponentId, &clsid);
4793  TRACE("to %s\n",debugstr_w(buf));
4794  lstrcatW(data,buf);
4795  }
4796  }
4797 
4798  if (feature->Feature_Parent)
4799  {
4800  lstrcatW(data, L"\2");
4801  lstrcatW(data, feature->Feature_Parent);
4802  }
4803 
4804  msi_reg_set_val_str( userdata, feature->Feature, data );
4805  msi_free(data);
4806 
4807  size = 0;
4808  if (feature->Feature_Parent)
4809  size = lstrlenW(feature->Feature_Parent)*sizeof(WCHAR);
4810  if (!absent)
4811  {
4812  size += sizeof(WCHAR);
4813  RegSetValueExW(hkey, feature->Feature, 0 ,REG_SZ,
4814  (const BYTE*)(feature->Feature_Parent ? feature->Feature_Parent : L""), size);
4815  }
4816  else
4817  {
4818  size += 2*sizeof(WCHAR);
4819  data = msi_alloc(size);
4820  data[0] = 0x6;
4821  data[1] = 0;
4822  if (feature->Feature_Parent)
4823  lstrcpyW( &data[1], feature->Feature_Parent );
4824  RegSetValueExW(hkey,feature->Feature,0,REG_SZ,
4825  (LPBYTE)data,size);
4826  msi_free(data);
4827  }
4828 
4829  /* the UI chunk */
4830  uirow = MSI_CreateRecord( 1 );
4831  MSI_RecordSetStringW( uirow, 1, feature->Feature );
4833  msiobj_release( &uirow->hdr );
4834  /* FIXME: call msi_ui_progress? */
4835  }
4836 
4837 end:
4838  RegCloseKey(hkey);
4839  RegCloseKey(userdata);
4840  return rc;
4841 }
LPWSTR ProductCode
Definition: msipriv.h:448
INTERNETFEATURELIST feature
Definition: misc.c:1719
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
MSIOBJECTHDR hdr
Definition: msipriv.h:151
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define lstrlenW
Definition: compat.h:609
int32_t INT
Definition: typedefs.h:58
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
UINT MSIREG_OpenUserDataFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:472
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4899
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
struct list features
Definition: msipriv.h:402
static BOOL msi_check_publish(MSIPACKAGE *package)
Definition: action.c:4107
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
GLuint GLuint end
Definition: gl.h:1545
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
REFCLSID clsid
Definition: msctf.c:82
uint32_t entry
Definition: isohybrid.c:63
unsigned char BYTE
Definition: xxhash.c:193
LPWSTR ComponentId
Definition: msipriv.h:526
#define lstrcpyW
Definition: compat.h:608
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT Context
Definition: msipriv.h:459
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:404
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
WCHAR * LPWSTR
Definition: xmlstorage.h:184
MSICOMPONENT * component
Definition: msipriv.h:554
#define RegCloseKey(hKey)
Definition: registry.h:47
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
BOOL encode_base85_guid(GUID *, LPWSTR) DECLSPEC_HIDDEN
Definition: registry.c:165
#define REG_SZ
Definition: layer.c:22

◆ ACTION_PublishProduct()

static UINT ACTION_PublishProduct ( MSIPACKAGE package)
static

Definition at line 4237 of file action.c.

4238 {
4239  UINT rc;
4240  HKEY hukey = NULL, hudkey = NULL;
4241  MSIRECORD *uirow;
4242  BOOL republish = FALSE;
4243 
4244  if (package->script == SCRIPT_NONE)
4245  return msi_schedule_action(package, SCRIPT_INSTALL, L"PublishProduct");
4246 
4247  if (!list_empty(&package->patches))
4248  {
4249  rc = msi_publish_patches(package);
4250  if (rc != ERROR_SUCCESS)
4251  goto end;
4252  }
4253 
4254  rc = MSIREG_OpenProductKey(package->ProductCode, NULL, package->Context,
4255  &hukey, FALSE);
4256  if (rc == ERROR_SUCCESS)
4257  {
4258  WCHAR *package_code;
4259 
4260  package_code = msi_reg_get_val_str(hukey, INSTALLPROPERTY_PACKAGECODEW);
4261  if (package_code)
4262  {
4263  WCHAR *guid;
4264 
4265  guid = msi_get_package_code(package->db);
4266  if (guid)
4267  {
4269 
4271  msi_free(guid);
4272  if (!wcscmp(packed, package_code))
4273  {
4274  TRACE("re-publishing product - new package\n");
4275  republish = TRUE;
4276  }
4277  }
4278  msi_free(package_code);
4279  }
4280  }
4281 
4282  /* FIXME: also need to publish if the product is in advertise mode */
4283  if (!republish && !msi_check_publish(package))
4284  {
4285  if (hukey)
4286  RegCloseKey(hukey);
4287  return ERROR_SUCCESS;
4288  }
4289 
4290  if (!hukey)
4291  {
4292  rc = MSIREG_OpenProductKey(package->ProductCode, NULL, package->Context,
4293  &hukey, TRUE);
4294  if (rc != ERROR_SUCCESS)
4295  goto end;
4296  }
4297 
4298  rc = MSIREG_OpenUserDataProductKey(package->ProductCode, package->Context,
4299  NULL, &hudkey, TRUE);
4300  if (rc != ERROR_SUCCESS)
4301  goto end;
4302 
4303  rc = msi_publish_upgrade_code(package);
4304  if (rc != ERROR_SUCCESS)
4305  goto end;
4306 
4307  rc = msi_publish_product_properties(package, hukey);
4308  if (rc != ERROR_SUCCESS)
4309  goto end;
4310 
4311  rc = msi_publish_sourcelist(package, hukey);
4312  if (rc != ERROR_SUCCESS)
4313  goto end;
4314 
4315  rc = msi_publish_icons(package);
4316 
4317 end:
4318  uirow = MSI_CreateRecord( 1 );
4319  MSI_RecordSetStringW( uirow, 1, package->ProductCode );
4321  msiobj_release( &uirow->hdr );
4322 
4323  RegCloseKey(hukey);
4324  RegCloseKey(hudkey);
4325  return rc;
4326 }
LPWSTR ProductCode
Definition: msipriv.h:448
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
static UINT msi_publish_icons(MSIPACKAGE *package)
Definition: action.c:3963
#define ERROR_SUCCESS
Definition: deptool.c:10
LPWSTR msi_reg_get_val_str(HKEY hkey, LPCWSTR name) DECLSPEC_HIDDEN
Definition: registry.c:243
GLuint GLenum GLsizei GLsizei GLint GLint GLboolean packed
Definition: glext.h:9271
#define TRUE
Definition: types.h:120
MSIOBJECTHDR hdr
Definition: msipriv.h:151
static void msi_free(void *mem)
Definition: msipriv.h:1159
const GUID * guid
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
static UINT msi_publish_upgrade_code(MSIPACKAGE *package)
Definition: action.c:4079
UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:338
static const WCHAR INSTALLPROPERTY_PACKAGECODEW[]
Definition: msi.h:285
#define TRACE(s)
Definition: solgame.cpp:4
static BOOL msi_check_publish(MSIPACKAGE *package)
Definition: action.c:4107
static UINT msi_publish_product_properties(MSIPACKAGE *package, HKEY hkey)
Definition: action.c:4033
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
GLuint GLuint end
Definition: gl.h:1545
UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:582
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
static UINT msi_publish_patches(MSIPACKAGE *package)
Definition: action.c:4135
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:734
static UINT msi_publish_sourcelist(MSIPACKAGE *package, HKEY hkey)
Definition: action.c:3979
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT Context
Definition: msipriv.h:459
#define RegCloseKey(hKey)
Definition: registry.h:47
BOOL squash_guid(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
Definition: registry.c:74
struct list patches
Definition: msipriv.h:400
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
WCHAR * msi_get_package_code(MSIDATABASE *db) DECLSPEC_HIDDEN
Definition: package.c:1278

◆ ACTION_RegisterComPlus()

static UINT ACTION_RegisterComPlus ( MSIPACKAGE package)
static

Definition at line 7462 of file action.c.

7463 {
7464  return msi_unimplemented_action_stub( package, "RegisterComPlus", L"Complus" );
7465 }
#define L(x)
Definition: ntvdm.h:50
static UINT msi_unimplemented_action_stub(MSIPACKAGE *package, LPCSTR action, LPCWSTR table)
Definition: action.c:7434

◆ ACTION_RegisterProduct()

static UINT ACTION_RegisterProduct ( MSIPACKAGE package)
static

Definition at line 4981 of file action.c.

4982 {
4983  WCHAR *upgrade_code, squashed_pc[SQUASHED_GUID_SIZE];
4984  MSIRECORD *uirow;
4985  HKEY hkey, props, upgrade_key;
4986  UINT rc;
4987 
4988  if (package->script == SCRIPT_NONE)
4989  return msi_schedule_action(package, SCRIPT_INSTALL, L"RegisterProduct");
4990 
4991  /* FIXME: also need to publish if the product is in advertise mode */
4992  if (!msi_get_property_int( package->db, L"ProductToBeRegistered", 0 )
4993  && !msi_check_publish(package))
4994  return ERROR_SUCCESS;
4995 
4996  rc = MSIREG_OpenUninstallKey(package->ProductCode, package->platform, &hkey, TRUE);
4997  if (rc != ERROR_SUCCESS)
4998  return rc;
4999 
5000  rc = MSIREG_OpenInstallProps(package->ProductCode, package->Context, NULL, &props, TRUE);
5001  if (rc != ERROR_SUCCESS)
5002  goto done;
5003 
5004  rc = msi_publish_install_properties(package, hkey);
5005  if (rc != ERROR_SUCCESS)
5006  goto done;
5007 
5008  rc = msi_publish_install_properties(package, props);
5009  if (rc != ERROR_SUCCESS)
5010  goto done;
5011 
5012  upgrade_code = msi_dup_property(package->db, L"UpgradeCode");
5013  if (upgrade_code)
5014  {
5015  rc = MSIREG_OpenUpgradeCodesKey( upgrade_code, &upgrade_key, TRUE );
5016  if (rc == ERROR_SUCCESS)
5017  {
5018  squash_guid( package->ProductCode, squashed_pc );
5019  msi_reg_set_val_str( upgrade_key, squashed_pc, NULL );
5020  RegCloseKey( upgrade_key );
5021  }
5022  msi_free( upgrade_code );
5023  }
5025  package->delete_on_close = FALSE;
5026 
5027 done:
5028  uirow = MSI_CreateRecord( 1 );
5029  MSI_RecordSetStringW( uirow, 1, package->ProductCode );
5031  msiobj_release( &uirow->hdr );
5032 
5033  RegCloseKey(hkey);
5034  return ERROR_SUCCESS;
5035 }
LPWSTR ProductCode
Definition: msipriv.h:448
enum platform platform
Definition: msipriv.h:396
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
MSIOBJECTHDR hdr
Definition: msipriv.h:151
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
static void msi_free(void *mem)
Definition: msipriv.h:1159
static const WCHAR INSTALLPROPERTY_LOCALPACKAGEW[]
Definition: msi.h:343
UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:692
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
static UINT msi_publish_install_properties(MSIPACKAGE *package, HKEY hkey)
Definition: action.c:4893
static BOOL msi_check_publish(MSIPACKAGE *package)
Definition: action.c:4107
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPWSTR localfile
Definition: msipriv.h:449
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:734
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT Context
Definition: msipriv.h:459
UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szProduct, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:783
static const WCHAR props[]
Definition: wbemdisp.c:288
UINT MSIREG_OpenUninstallKey(const WCHAR *, enum platform, HKEY *, BOOL) DECLSPEC_HIDDEN
BOOL delete_on_close
Definition: msipriv.h:450
#define RegCloseKey(hKey)
Definition: registry.h:47
BOOL squash_guid(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
Definition: registry.c:74
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2283

◆ ACTION_RegisterTypeLibraries()

static UINT ACTION_RegisterTypeLibraries ( MSIPACKAGE package)
static

Definition at line 3602 of file action.c.

3603 {
3604  MSIQUERY *view;
3605  UINT rc;
3606 
3607  if (package->script == SCRIPT_NONE)
3608  return msi_schedule_action(package, SCRIPT_INSTALL, L"RegisterTypeLibraries");
3609 
3610  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `TypeLib`", &view);
3611  if (rc != ERROR_SUCCESS)
3612  return ERROR_SUCCESS;
3613 
3615  msiobj_release(&view->hdr);
3616  return rc;
3617 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
Definition: action.c:3522
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RegisterUser()

static UINT ACTION_RegisterUser ( MSIPACKAGE package)
static

Definition at line 5264 of file action.c.

5265 {
5266  static const WCHAR szPropKeys[][80] =
5267  {
5268  L"ProductID",
5269  L"USERNAME",
5270  L"COMPANYNAME",
5271  L"",
5272  };
5273  static const WCHAR szRegKeys[][80] =
5274  {
5275  L"ProductID",
5276  L"RegOwner",
5277  L"RegCompany",
5278  L"",
5279  };
5280  HKEY hkey = 0;
5281  LPWSTR buffer, productid = NULL;
5282  UINT i, rc = ERROR_SUCCESS;
5283  MSIRECORD *uirow;
5284 
5285  if (package->script == SCRIPT_NONE)
5286  return msi_schedule_action(package, SCRIPT_INSTALL, L"RegisterUser");
5287 
5288  if (msi_check_unpublish(package))
5289  {
5291  goto end;
5292  }
5293 
5294  productid = msi_dup_property( package->db, INSTALLPROPERTY_PRODUCTIDW );
5295  if (!productid)
5296  goto end;
5297 
5298  rc = MSIREG_OpenInstallProps(package->ProductCode, package->Context,
5299  NULL, &hkey, TRUE);
5300  if (rc != ERROR_SUCCESS)
5301  goto end;
5302 
5303  for( i = 0; szPropKeys[i][0]; i++ )
5304  {
5305  buffer = msi_dup_property( package->db, szPropKeys[i] );
5306  msi_reg_set_val_str( hkey, szRegKeys[i], buffer );
5307  msi_free( buffer );
5308  }
5309 
5310 end:
5311  uirow = MSI_CreateRecord( 1 );
5312  MSI_RecordSetStringW( uirow, 1, productid );
5314  msiobj_release( &uirow->hdr );
5315 
5316  msi_free(productid);
5317  RegCloseKey(hkey);
5318  return rc;
5319 }
LPWSTR ProductCode
Definition: msipriv.h:448
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLuint buffer
Definition: glext.h:5915
static void msi_free(void *mem)
Definition: msipriv.h:1159
UINT MSIREG_OpenInstallProps(LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
Definition: registry.c:692
#define L(x)
Definition: ntvdm.h:50
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
GLuint GLuint end
Definition: gl.h:1545
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
static BOOL msi_check_unpublish(MSIPACKAGE *package)
Definition: action.c:4121
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
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT Context
Definition: msipriv.h:459
UINT MSIREG_DeleteUserDataProductKey(LPCWSTR, MSIINSTALLCONTEXT) DECLSPEC_HIDDEN
Definition: registry.c:720
static const WCHAR INSTALLPROPERTY_PRODUCTIDW[]
Definition: msi.h:363
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define RegCloseKey(hKey)
Definition: registry.h:47
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2283

◆ ACTION_RemoveEnvironmentStrings()

static UINT ACTION_RemoveEnvironmentStrings ( MSIPACKAGE package)
static

Definition at line 7131 of file action.c.

7132 {
7133  MSIQUERY *view;
7134  UINT rc;
7135 
7136  if (package->script == SCRIPT_NONE)
7137  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveEnvironmentStrings");
7138 
7139  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Environment`", &view );
7140  if (rc != ERROR_SUCCESS)
7141  return ERROR_SUCCESS;
7142 
7144  msiobj_release( &view->hdr );
7145  return rc;
7146 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_RemoveEnvironmentString(MSIRECORD *rec, LPVOID param)
Definition: action.c:6994
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveExistingProducts()

static UINT ACTION_RemoveExistingProducts ( MSIPACKAGE package)
static

Definition at line 7288 of file action.c.

7289 {
7290  MSIQUERY *view;
7291  UINT r;
7292 
7293  r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Upgrade`", &view );
7294  if (r == ERROR_SUCCESS)
7295  {
7297  msiobj_release( &view->hdr );
7298  if (r != ERROR_SUCCESS)
7299  return r;
7300  }
7301  return ERROR_SUCCESS;
7302 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT ITERATE_RemoveExistingProducts(MSIRECORD *rec, LPVOID param)
Definition: action.c:7245
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveFolders()

static UINT ACTION_RemoveFolders ( MSIPACKAGE package)
static

Definition at line 762 of file action.c.

763 {
764  MSIQUERY *view;
765  UINT rc;
766 
767  if (package->script == SCRIPT_NONE)
768  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveFolders");
769 
770  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `CreateFolder`", &view );
771  if (rc != ERROR_SUCCESS)
772  return ERROR_SUCCESS;
773 
775  msiobj_release( &view->hdr );
776  return rc;
777 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT ITERATE_RemoveFolders(MSIRECORD *row, LPVOID param)
Definition: action.c:714
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveIniValues()

static UINT ACTION_RemoveIniValues ( MSIPACKAGE package)
static

Definition at line 4576 of file action.c.

4577 {
4578  MSIQUERY *view;
4579  UINT rc;
4580 
4581  if (package->script == SCRIPT_NONE)
4582  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveIniValues");
4583 
4584  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `IniFile`", &view );
4585  if (rc == ERROR_SUCCESS)
4586  {
4588  msiobj_release( &view->hdr );
4589  if (rc != ERROR_SUCCESS)
4590  return rc;
4591  }
4592  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `RemoveIniFile`", &view );
4593  if (rc == ERROR_SUCCESS)
4594  {
4596  msiobj_release( &view->hdr );
4597  if (rc != ERROR_SUCCESS)
4598  return rc;
4599  }
4600  return ERROR_SUCCESS;
4601 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_RemoveIniValuesOnUninstall(MSIRECORD *row, LPVOID param)
Definition: action.c:4453
static UINT ITERATE_RemoveIniValuesOnInstall(MSIRECORD *row, LPVOID param)
Definition: action.c:4515
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveODBC()

static UINT ACTION_RemoveODBC ( MSIPACKAGE package)
static

Definition at line 6633 of file action.c.

6634 {
6635  MSIQUERY *view;
6636  UINT rc;
6637 
6638  if (package->script == SCRIPT_NONE)
6639  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveODBC");
6640 
6641  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCDriver`", &view );
6642  if (rc == ERROR_SUCCESS)
6643  {
6645  msiobj_release( &view->hdr );
6646  if (rc != ERROR_SUCCESS)
6647  return rc;
6648  }
6649  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCTranslator`", &view );
6650  if (rc == ERROR_SUCCESS)
6651  {
6653  msiobj_release( &view->hdr );
6654  if (rc != ERROR_SUCCESS)
6655  return rc;
6656  }
6657  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCDataSource`", &view );
6658  if (rc == ERROR_SUCCESS)
6659  {
6661  msiobj_release( &view->hdr );
6662  if (rc != ERROR_SUCCESS)
6663  return rc;
6664  }
6665  return ERROR_SUCCESS;
6666 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_RemoveODBCDataSource(MSIRECORD *rec, LPVOID param)
Definition: action.c:6577
static UINT ITERATE_RemoveODBCTranslator(MSIRECORD *rec, LPVOID param)
Definition: action.c:6538
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT ITERATE_RemoveODBCDriver(MSIRECORD *rec, LPVOID param)
Definition: action.c:6499
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveRegistryValues()

static UINT ACTION_RemoveRegistryValues ( MSIPACKAGE package)
static

Definition at line 3035 of file action.c.

3036 {
3037  MSIQUERY *view;
3038  UINT rc;
3039 
3040  if (package->script == SCRIPT_NONE)
3041  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveRegistryValues");
3042 
3043  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Registry`", &view );
3044  if (rc == ERROR_SUCCESS)
3045  {
3047  msiobj_release( &view->hdr );
3048  if (rc != ERROR_SUCCESS)
3049  return rc;
3050  }
3051  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `RemoveRegistry`", &view );
3052  if (rc == ERROR_SUCCESS)
3053  {
3055  msiobj_release( &view->hdr );
3056  if (rc != ERROR_SUCCESS)
3057  return rc;
3058  }
3059  return ERROR_SUCCESS;
3060 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_RemoveRegistryValuesOnUninstall(MSIRECORD *row, LPVOID param)
Definition: action.c:2904
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT ITERATE_RemoveRegistryValuesOnInstall(MSIRECORD *row, LPVOID param)
Definition: action.c:2972
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveShortcuts()

static UINT ACTION_RemoveShortcuts ( MSIPACKAGE package)
static

Definition at line 3897 of file action.c.

3898 {
3899  MSIQUERY *view;
3900  UINT rc;
3901 
3902  if (package->script == SCRIPT_NONE)
3903  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveShortcuts");
3904 
3905  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Shortcut`", &view );
3906  if (rc != ERROR_SUCCESS)
3907  return ERROR_SUCCESS;
3908 
3910  msiobj_release( &view->hdr );
3911  return rc;
3912 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT ITERATE_RemoveShortcuts(MSIRECORD *row, LPVOID param)
Definition: action.c:3869
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_ResolveSource()

static UINT ACTION_ResolveSource ( MSIPACKAGE package)
static

Definition at line 5210 of file action.c.

5211 {
5212  DWORD attrib;
5213  UINT rc;
5214 
5215  /*
5216  * We are currently doing what should be done here in the top level Install
5217  * however for Administrative and uninstalls this step will be needed
5218  */
5219  if (!package->PackagePath)
5220  return ERROR_SUCCESS;
5221 
5222  msi_set_sourcedir_props(package, TRUE);
5223 
5224  attrib = GetFileAttributesW(package->db->path);
5225  if (attrib == INVALID_FILE_ATTRIBUTES)
5226  {
5227  MSIRECORD *record;
5228  LPWSTR prompt;
5229  DWORD size = 0;
5230 
5231  rc = MsiSourceListGetInfoW(package->ProductCode, NULL,
5232  package->Context, MSICODE_PRODUCT,
5234  if (rc == ERROR_MORE_DATA)
5235  {
5236  prompt = msi_alloc(size * sizeof(WCHAR));
5238  package->Context, MSICODE_PRODUCT,
5240  }
5241  else
5242  prompt = strdupW(package->db->path);
5243 
5244  record = MSI_CreateRecord(2);
5246  MSI_RecordSetStringW(record, 2, prompt);
5247  msi_free(prompt);
5248  while(attrib == INVALID_FILE_ATTRIBUTES)
5249  {
5252  if (rc == IDCANCEL)
5253  return ERROR_INSTALL_USEREXIT;
5254  attrib = GetFileAttributesW(package->db->path);
5255  }
5256  rc = ERROR_SUCCESS;
5257  }
5258  else
5259  return ERROR_SUCCESS;
5260 
5261  return rc;
5262 }
LPWSTR ProductCode
Definition: msipriv.h:448
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
UINT WINAPI MsiSourceListGetInfoW(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT dwContext, DWORD dwOptions, LPCWSTR szProperty, LPWSTR szValue, LPDWORD pcchValue)
Definition: source.c:523
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
LPWSTR PackagePath
Definition: msipriv.h:447
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
Definition: action.c:354
static void msi_free(void *mem)
Definition: msipriv.h:1159
UINT MSI_RecordSetInteger(MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
Definition: record.c:280
LPWSTR path
Definition: msipriv.h:112
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
static const WCHAR INSTALLPROPERTY_DISKPROMPTW[]
Definition: msi.h:417
#define ERROR_INSTALL_USEREXIT
Definition: winerror.h:960
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
MSIDATABASE * db
Definition: msipriv.h:394
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
#define ERROR_MORE_DATA
Definition: dderror.h:13
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT Context
Definition: msipriv.h:459
#define MSIERR_INSERTDISK
Definition: resource.h:30
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825

◆ ACTION_RMCCPSearch()

static UINT ACTION_RMCCPSearch ( MSIPACKAGE package)
static

Definition at line 7457 of file action.c.

7458 {
7459  return msi_unimplemented_action_stub( package, "RMCCPSearch", L"CCPSearch" );
7460 }
#define L(x)
Definition: ntvdm.h:50
static UINT msi_unimplemented_action_stub(MSIPACKAGE *package, LPCSTR action, LPCWSTR table)
Definition: action.c:7434

◆ ACTION_ScheduleReboot()

static UINT ACTION_ScheduleReboot ( MSIPACKAGE package)
static

Definition at line 7180 of file action.c.

7181 {
7182  TRACE("\n");
7183  package->need_reboot_at_end = 1;
7184  return ERROR_SUCCESS;
7185 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char need_reboot_at_end
Definition: msipriv.h:469

◆ ACTION_SelfRegModules()

static UINT ACTION_SelfRegModules ( MSIPACKAGE package)
static

Definition at line 4664 of file action.c.

4665 {
4666  MSIQUERY *view;
4667  UINT rc;
4668 
4669  if (package->script == SCRIPT_NONE)
4670  return msi_schedule_action(package, SCRIPT_INSTALL, L"SelfRegModules");
4671 
4672  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `SelfReg`", &view);
4673  if (rc != ERROR_SUCCESS)
4674  return ERROR_SUCCESS;
4675 
4677  msiobj_release(&view->hdr);
4678  return rc;
4679 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT ITERATE_SelfRegModules(MSIRECORD *row, LPVOID param)
Definition: action.c:4631
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_SelfUnregModules()

static UINT ACTION_SelfUnregModules ( MSIPACKAGE package)
static

Definition at line 4714 of file action.c.

4715 {
4716  MSIQUERY *view;
4717  UINT rc;
4718 
4719  if (package->script == SCRIPT_NONE)
4720  return msi_schedule_action(package, SCRIPT_INSTALL, L"SelfUnregModules");
4721 
4722  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `SelfReg`", &view );
4723  if (rc != ERROR_SUCCESS)
4724  return ERROR_SUCCESS;
4725 
4727  msiobj_release( &view->hdr );
4728  return rc;
4729 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_SelfUnregModules(MSIRECORD *row, LPVOID param)
Definition: action.c:4681
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_SetODBCFolders()

static UINT ACTION_SetODBCFolders ( MSIPACKAGE package)
static

Definition at line 7216 of file action.c.

7217 {
7218  MSIQUERY *view;
7219  UINT r;
7220  DWORD count;
7221 
7222  r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCDriver`", &view );
7223  if (r == ERROR_SUCCESS)
7224  {
7225  count = 0;
7226  r = MSI_IterateRecords( view, &count, NULL, package );
7227  msiobj_release( &view->hdr );
7228  if (r != ERROR_SUCCESS)
7229  return r;
7230  if (count) FIXME( "ignored %lu rows in ODBCDriver table\n", count );
7231  }
7232  r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCTranslator`", &view );
7233  if (r == ERROR_SUCCESS)
7234  {
7235  count = 0;
7236  r = MSI_IterateRecords( view, &count, NULL, package );
7237  msiobj_release( &view->hdr );
7238  if (r != ERROR_SUCCESS)
7239  return r;
7240  if (count) FIXME( "ignored %lu rows in ODBCTranslator table\n", count );
7241  }
7242  return ERROR_SUCCESS;
7243 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define L(x)
Definition: ntvdm.h:50
#define FIXME(fmt,...)
Definition: debug.h:111
unsigned long DWORD
Definition: ntddk_ex.h:95
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_StartServices()

static UINT ACTION_StartServices ( MSIPACKAGE package)
static

Definition at line 5976 of file action.c.

5977 {
5978  MSIQUERY *view;
5979  UINT rc;
5980 
5981  if (package->script == SCRIPT_NONE)
5982  return msi_schedule_action(package, SCRIPT_INSTALL, L"StartServices");
5983 
5984  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `ServiceControl`", &view);
5985  if (rc != ERROR_SUCCESS)
5986  return ERROR_SUCCESS;
5987 
5989  msiobj_release(&view->hdr);
5990  return rc;
5991 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
Definition: action.c:5866
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_StopServices()

static UINT ACTION_StopServices ( MSIPACKAGE package)
static

Definition at line 6135 of file action.c.

6136 {
6137  MSIQUERY *view;
6138  UINT rc;
6139 
6140  if (package->script == SCRIPT_NONE)
6141  return msi_schedule_action(package, SCRIPT_INSTALL, L"StopServices");
6142 
6143  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `ServiceControl`", &view);
6144  if (rc != ERROR_SUCCESS)
6145  return ERROR_SUCCESS;
6146 
6148  msiobj_release(&view->hdr);
6149  return rc;
6150 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
static UINT ITERATE_StopService(MSIRECORD *rec, LPVOID param)
Definition: action.c:6078
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_UnpublishComponents()

static UINT ACTION_UnpublishComponents ( MSIPACKAGE package)
static

Definition at line 5663 of file action.c.

5664 {
5665  MSIQUERY *view;
5666  UINT rc;
5667 
5668  if (package->script == SCRIPT_NONE)
5669  return msi_schedule_action(package, SCRIPT_INSTALL, L"UnpublishComponents");
5670 
5671  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `PublishComponent`", &view );
5672  if (rc != ERROR_SUCCESS)
5673  return ERROR_SUCCESS;
5674 
5676  msiobj_release( &view->hdr );
5677  return rc;
5678 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_UnpublishComponent(MSIRECORD *rec, LPVOID param)
Definition: action.c:5614
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_UnpublishFeatures()

static UINT ACTION_UnpublishFeatures ( MSIPACKAGE package)
static

Definition at line 4875 of file action.c.

4876 {
4878 
4879  if (package->script == SCRIPT_NONE)
4880  return msi_schedule_action(package, SCRIPT_INSTALL, L"UnpublishFeatures");
4881 
4882  if (!msi_check_unpublish(package))
4883  return ERROR_SUCCESS;
4884 
4886  {
4887  msi_unpublish_feature(package, feature);
4888  }</