ReactOS 0.4.16-dev-92-g0c2cdca
msipriv.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "fdi.h"
#include "msi.h"
#include "msiquery.h"
#include "msidefs.h"
#include "objbase.h"
#include "objidl.h"
#include "fusion.h"
#include "winnls.h"
#include "winver.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "msiserver.h"
#include "winemsi_s.h"
Include dependency graph for msipriv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagMSIOBJECTHDR
 
struct  tagMSISTREAM
 
struct  tagMSITRANSFORM
 
struct  tagMSIDATABASE
 
struct  tagMSIQUERY
 
struct  tagMSIFIELD
 
struct  tagMSIRECORD
 
struct  tagMSISOURCELISTINFO
 
struct  tagMSIMEDIADISK
 
struct  tagMSIMEDIAINFO
 
struct  tagMSICABINETSTREAM
 
struct  tagMSIPATCHINFO
 
struct  tagMSIBINARY
 
struct  _column_info
 
struct  tagMSIVIEWOPS
 
struct  tagMSIVIEW
 
struct  tagMSIPACKAGE
 
struct  tagMSIPREVIEW
 
struct  tagMSISUMMARYINFO
 
struct  tagMSIFEATURE
 
struct  tagMSIASSEMBLY
 
struct  tagMSICOMPONENT
 
struct  tagComponentList
 
struct  tagFeatureList
 
struct  tagMSIFOLDER
 
struct  tagFolderList
 
struct  tagMSIFILE
 
struct  tagMSIFILEPATCH
 
struct  tagMSIAPPID
 
struct  tagMSICLASS
 
struct  tagMSIEXTENSION
 
struct  tagMSIPROGID
 
struct  tagMSIVERB
 
struct  tagMSIMIME
 
struct  awstring
 
struct  awcstring
 
struct  MSICABDATA
 

Macros

#define MSI_DATASIZEMASK   0x00ff
 
#define MSITYPE_VALID   0x0100
 
#define MSITYPE_LOCALIZABLE   0x200
 
#define MSITYPE_STRING   0x0800
 
#define MSITYPE_NULLABLE   0x1000
 
#define MSITYPE_KEY   0x2000
 
#define MSITYPE_TEMPORARY   0x4000
 
#define MSITYPE_UNKNOWN   0x8000
 
#define MAX_STREAM_NAME_LEN   62
 
#define LONG_STR_BYTES   3
 
#define INSTALLUILEVEL_MASK   0x0007
 
#define MSITYPE_IS_BINARY(type)   (((type) & ~MSITYPE_NULLABLE) == (MSITYPE_STRING|MSITYPE_VALID))
 
#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET   10000
 
#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID   32000
 
#define MSI_OPEN_READONLY   0
 
#define MSI_OPEN_TRANSACT   1
 
#define MSI_OPEN_DIRECT   2
 
#define MSI_OPEN_CREATE   3
 
#define MSI_OPEN_CREATEDIRECT   4
 
#define MSI_OPEN_PATCHFILE   32
 
#define MSI_MAX_PROPS   20
 
#define SEQUENCE_UI   0x1
 
#define SEQUENCE_EXEC   0x2
 
#define MSIHANDLETYPE_ANY   0
 
#define MSIHANDLETYPE_DATABASE   1
 
#define MSIHANDLETYPE_SUMMARYINFO   2
 
#define MSIHANDLETYPE_VIEW   3
 
#define MSIHANDLETYPE_RECORD   4
 
#define MSIHANDLETYPE_PACKAGE   5
 
#define MSIHANDLETYPE_PREVIEW   6
 
#define MSI_MAJORVERSION   4
 
#define MSI_MINORVERSION   5
 
#define MSI_BUILDNUMBER   6001
 
#define GUID_SIZE   39
 
#define SQUASHED_GUID_SIZE   33
 
#define MSIHANDLE_MAGIC   0x4d434923
 
#define WINE_OPENPACKAGEFLAGS_RECACHE   0x80000000
 
#define MSICABEXTRACT_BEGINEXTRACT   0x01
 
#define MSICABEXTRACT_FILEEXTRACTED   0x02
 

Typedefs

typedef struct tagMSITABLE MSITABLE
 
typedef struct string_table string_table
 
typedef struct tagMSIOBJECTHDR MSIOBJECTHDR
 
typedef VOID(* msihandledestructor) (MSIOBJECTHDR *)
 
typedef struct tagMSISTREAM MSISTREAM
 
typedef struct tagMSITRANSFORM MSITRANSFORM
 
typedef struct tagMSIDATABASE MSIDATABASE
 
typedef struct tagMSIVIEW MSIVIEW
 
typedef struct tagMSIQUERY MSIQUERY
 
typedef struct tagMSIFIELD MSIFIELD
 
typedef struct tagMSIRECORD MSIRECORD
 
typedef struct tagMSISOURCELISTINFO MSISOURCELISTINFO
 
typedef struct tagMSIMEDIADISK MSIMEDIADISK
 
typedef struct tagMSIMEDIAINFO MSIMEDIAINFO
 
typedef struct tagMSICABINETSTREAM MSICABINETSTREAM
 
typedef struct tagMSIPATCHINFO MSIPATCHINFO
 
typedef struct tagMSIBINARY MSIBINARY
 
typedef struct _column_info column_info
 
typedef const struct tagMSICOLUMNHASHENTRY * MSIITERHANDLE
 
typedef struct tagMSIVIEWOPS MSIVIEWOPS
 
typedef struct msi_dialog_tag msi_dialog
 
typedef struct tagMSIPACKAGE MSIPACKAGE
 
typedef struct tagMSIPREVIEW MSIPREVIEW
 
typedef struct tagMSISUMMARYINFO MSISUMMARYINFO
 
typedef struct tagMSIFEATURE MSIFEATURE
 
typedef struct tagMSIASSEMBLY MSIASSEMBLY
 
typedef struct tagMSICOMPONENT MSICOMPONENT
 
typedef struct tagComponentList ComponentList
 
typedef struct tagFeatureList FeatureList
 
typedef struct tagMSIFOLDER MSIFOLDER
 
typedef struct tagFolderList FolderList
 
typedef enum _msi_file_state msi_file_state
 
typedef struct tagMSIFILE MSIFILE
 
typedef struct tagMSIFILEPATCH MSIFILEPATCH
 
typedef struct tagMSIAPPID MSIAPPID
 
typedef struct tagMSIPROGID MSIPROGID
 
typedef struct tagMSICLASS MSICLASS
 
typedef struct tagMSIMIME MSIMIME
 
typedef struct tagMSIEXTENSION MSIEXTENSION
 
typedef struct tagMSIVERB MSIVERB
 
typedef UINT(* record_func) (MSIRECORD *, LPVOID)
 
typedef BOOL(* PMSICABEXTRACTCB) (MSIPACKAGE *, LPCWSTR, DWORD, LPWSTR *, DWORD *, PVOID)
 
typedef enum tid_t tid_t
 

Enumerations

enum  platform {
  PLATFORM_UNRECOGNIZED , PLATFORM_INTEL , PLATFORM_INTEL64 , PLATFORM_X64 ,
  PLATFORM_ARM , PLATFORM_ARM64
}
 
enum  clr_version {
  CLR_VERSION_V10 , CLR_VERSION_V11 , CLR_VERSION_V20 , CLR_VERSION_V40 ,
  CLR_VERSION_MAX
}
 
enum  script {
  SCRIPT_NONE = -1 , SCRIPT_INSTALL = 0 , SCRIPT_COMMIT = 1 , SCRIPT_ROLLBACK = 2 ,
  SCRIPT_MAX = 3
}
 
enum  folder_state {
  FOLDER_STATE_UNINITIALIZED , FOLDER_STATE_EXISTS , FOLDER_STATE_CREATED , FOLDER_STATE_CREATED_PERSISTENT ,
  FOLDER_STATE_REMOVED
}
 
enum  _msi_file_state {
  msifs_invalid , msifs_missing , msifs_overwrite , msifs_present ,
  msifs_installed , msifs_skipped , msifs_hashmatch
}
 
enum  tid_t {
  LAST_tid , LAST_tid , Database_tid , Installer_tid ,
  Record_tid , Session_tid , StringList_tid , SummaryInfo_tid ,
  View_tid , LAST_tid , NULL_tid , IXMLDOMAttribute_tid ,
  IXMLDOMCDATASection_tid , IXMLDOMComment_tid , IXMLDOMDocument_tid , IXMLDOMDocument2_tid ,
  IXMLDOMDocument3_tid , IXMLDOMDocumentFragment_tid , IXMLDOMDocumentType_tid , IXMLDOMElement_tid ,
  IXMLDOMEntityReference_tid , IXMLDOMImplementation_tid , IXMLDOMNamedNodeMap_tid , IXMLDOMNode_tid ,
  IXMLDOMNodeList_tid , IXMLDOMParseError2_tid , IXMLDOMProcessingInstruction_tid , IXMLDOMSchemaCollection_tid ,
  IXMLDOMSchemaCollection2_tid , IXMLDOMSelection_tid , IXMLDOMText_tid , IXMLElement_tid ,
  IXMLDocument_tid , IXMLHTTPRequest_tid , IXSLProcessor_tid , IXSLTemplate_tid ,
  IVBSAXAttributes_tid , IVBSAXContentHandler_tid , IVBSAXDeclHandler_tid , IVBSAXDTDHandler_tid ,
  IVBSAXEntityResolver_tid , IVBSAXErrorHandler_tid , IVBSAXLexicalHandler_tid , IVBSAXLocator_tid ,
  IVBSAXXMLFilter_tid , IVBSAXXMLReader_tid , IMXAttributes_tid , IMXReaderControl_tid ,
  IMXWriter_tid , IVBMXNamespaceManager_tid , IServerXMLHTTPRequest_tid , LAST_tid ,
  NULL_tid , ITextDocument_tid , ITextRange_tid , ITextSelection_tid ,
  ITextFont_tid , ITextPara_tid , LAST_tid , NULL_tid ,
  IDictionary_tid , IDrive_tid , IDriveCollection_tid , IFile_tid ,
  IFileCollection_tid , IFileSystem3_tid , IFolder_tid , IFolderCollection_tid ,
  ITextStream_tid , LAST_tid , NULL_tid , IWshCollection_tid ,
  IWshEnvironment_tid , IWshExec_tid , IWshShell3_tid , IWshShortcut_tid ,
  LAST_tid
}
 

Functions

UINT msi_strcpy_to_awstring (const WCHAR *, int, awstring *, DWORD *)
 
MSIHANDLE msi_get_remote (MSIHANDLE handle)
 
LONG WINAPI rpc_filter (EXCEPTION_POINTERS *eptr)
 
voidmsihandle2msiinfo (MSIHANDLE handle, UINT type)
 
MSIHANDLE alloc_msihandle (MSIOBJECTHDR *)
 
MSIHANDLE alloc_msi_remote_handle (MSIHANDLE remote)
 
voidalloc_msiobject (UINT type, UINT size, msihandledestructor destroy)
 
void msiobj_addref (MSIOBJECTHDR *)
 
int msiobj_release (MSIOBJECTHDR *)
 
void msiobj_lock (MSIOBJECTHDR *)
 
void msiobj_unlock (MSIOBJECTHDR *)
 
void msi_free_handle_table (void)
 
void free_cached_tables (MSIDATABASE *db)
 
UINT MSI_CommitTables (MSIDATABASE *db)
 
UINT msi_commit_streams (MSIDATABASE *db)
 
BOOL msi_add_string (string_table *st, const WCHAR *data, int len, BOOL persistent)
 
UINT msi_string2id (const string_table *st, const WCHAR *data, int len, UINT *id)
 
VOID msi_destroy_stringtable (string_table *st)
 
const WCHARmsi_string_lookup (const string_table *st, UINT id, int *len)
 
HRESULT msi_init_string_table (IStorage *stg)
 
string_tablemsi_load_string_table (IStorage *stg, UINT *bytes_per_strref)
 
UINT msi_save_string_table (const string_table *st, IStorage *storage, UINT *bytes_per_strref)
 
UINT msi_get_string_table_codepage (const string_table *st)
 
UINT msi_set_string_table_codepage (string_table *st, UINT codepage)
 
WCHARmsi_strdupW (const WCHAR *value, int len)
 
BOOL TABLE_Exists (MSIDATABASE *db, LPCWSTR name)
 
MSICONDITION MSI_DatabaseIsTablePersistent (MSIDATABASE *db, LPCWSTR table)
 
UINT read_stream_data (IStorage *stg, LPCWSTR stname, BOOL table, BYTE **pdata, UINT *psz)
 
UINT write_stream_data (IStorage *stg, LPCWSTR stname, LPCVOID data, UINT sz, BOOL bTable)
 
UINT msi_table_apply_transform (MSIDATABASE *db, IStorage *stg, int err_cond)
 
UINT MSI_DatabaseApplyTransformW (MSIDATABASE *db, LPCWSTR szTransformFile, int iErrorCond)
 
void append_storage_to_db (MSIDATABASE *db, IStorage *stg)
 
UINT msi_apply_transforms (MSIPACKAGE *package)
 
UINT msi_check_patch_applicable (MSIPACKAGE *package, MSISUMMARYINFO *si)
 
UINT msi_apply_patches (MSIPACKAGE *package)
 
UINT msi_apply_registered_patch (MSIPACKAGE *package, LPCWSTR patch_code)
 
void msi_free_patchinfo (MSIPATCHINFO *patch)
 
UINT msi_patch_assembly (MSIPACKAGE *, MSIASSEMBLY *, MSIFILEPATCH *)
 
UINT MSI_InstallPackage (MSIPACKAGE *, LPCWSTR, LPCWSTR)
 
INT ACTION_ShowDialog (MSIPACKAGE *, LPCWSTR)
 
INT ACTION_DialogBox (MSIPACKAGE *, LPCWSTR)
 
UINT ACTION_ForceReboot (MSIPACKAGE *package)
 
UINT MSI_Sequence (MSIPACKAGE *package, LPCWSTR szTable)
 
UINT MSI_SetFeatureStates (MSIPACKAGE *package)
 
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)
 
UINT msi_schedule_action (MSIPACKAGE *package, UINT script, const WCHAR *action)
 
INSTALLSTATE msi_get_component_action (MSIPACKAGE *package, MSICOMPONENT *comp)
 
INSTALLSTATE msi_get_feature_action (MSIPACKAGE *package, MSIFEATURE *feature)
 
UINT msi_load_all_components (MSIPACKAGE *package)
 
UINT msi_load_all_features (MSIPACKAGE *package)
 
UINT msi_validate_product_id (MSIPACKAGE *package)
 
void MSI_CloseRecord (MSIOBJECTHDR *)
 
UINT MSI_RecordSetIStream (MSIRECORD *, UINT, IStream *)
 
UINT MSI_RecordGetIStream (MSIRECORD *, UINT, IStream **)
 
const WCHARMSI_RecordGetString (const MSIRECORD *, UINT)
 
MSIRECORDMSI_CreateRecord (UINT)
 
UINT MSI_RecordSetInteger (MSIRECORD *, UINT, int)
 
UINT MSI_RecordSetStringW (MSIRECORD *, UINT, LPCWSTR)
 
BOOL MSI_RecordIsNull (MSIRECORD *, UINT)
 
UINT MSI_RecordGetStringW (MSIRECORD *, UINT, LPWSTR, LPDWORD)
 
UINT MSI_RecordGetStringA (MSIRECORD *, UINT, LPSTR, LPDWORD)
 
int MSI_RecordGetInteger (MSIRECORD *, UINT)
 
UINT MSI_RecordReadStream (MSIRECORD *, UINT, char *, LPDWORD)
 
UINT MSI_RecordSetStream (MSIRECORD *, UINT, IStream *)
 
UINT MSI_RecordGetFieldCount (const MSIRECORD *rec)
 
UINT MSI_RecordStreamToFile (MSIRECORD *, UINT, LPCWSTR)
 
UINT MSI_RecordSetStreamFromFileW (MSIRECORD *, UINT, LPCWSTR)
 
UINT MSI_RecordCopyField (MSIRECORD *, UINT, MSIRECORD *, UINT)
 
MSIRECORDMSI_CloneRecord (MSIRECORD *)
 
BOOL MSI_RecordsAreEqual (MSIRECORD *, MSIRECORD *)
 
BOOL MSI_RecordsAreFieldsEqual (MSIRECORD *a, MSIRECORD *b, UINT field)
 
UINT msi_record_set_string (MSIRECORD *, UINT, const WCHAR *, int)
 
const WCHARmsi_record_get_string (const MSIRECORD *, UINT, int *)
 
void dump_record (MSIRECORD *)
 
UINT unmarshal_record (const struct wire_record *in, MSIHANDLE *out)
 
struct wire_recordmarshal_record (MSIHANDLE handle)
 
void free_remote_record (struct wire_record *rec)
 
UINT copy_remote_record (const struct wire_record *rec, MSIHANDLE handle)
 
void enum_stream_names (IStorage *stg)
 
WCHARencode_streamname (BOOL is_table, const WCHAR *in)
 
BOOL decode_streamname (LPCWSTR in, LPWSTR out)
 
UINT msi_get_stream (MSIDATABASE *, const WCHAR *, IStream **)
 
UINT MSI_OpenDatabaseW (LPCWSTR, LPCWSTR, MSIDATABASE **)
 
UINT MSI_DatabaseOpenViewW (MSIDATABASE *, LPCWSTR, MSIQUERY **)
 
UINT WINAPIV MSI_OpenQuery (MSIDATABASE *, MSIQUERY **, LPCWSTR,...)
 
UINT MSI_IterateRecords (MSIQUERY *, LPDWORD, record_func, LPVOID)
 
MSIRECORD *WINAPIV MSI_QueryGetRecord (MSIDATABASE *db, LPCWSTR query,...)
 
UINT MSI_DatabaseGetPrimaryKeys (MSIDATABASE *, LPCWSTR, MSIRECORD **)
 
UINT MSI_ViewExecute (MSIQUERY *, MSIRECORD *)
 
UINT MSI_ViewFetch (MSIQUERY *, MSIRECORD **)
 
UINT MSI_ViewClose (MSIQUERY *)
 
UINT MSI_ViewGetColumnInfo (MSIQUERY *, MSICOLINFO, MSIRECORD **)
 
UINT MSI_ViewModify (MSIQUERY *, MSIMODIFY, MSIRECORD *)
 
UINT VIEW_find_column (MSIVIEW *, LPCWSTR, LPCWSTR, UINT *)
 
UINT msi_view_get_row (MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **)
 
UINT MSI_SetInstallLevel (MSIPACKAGE *package, int iInstallLevel)
 
MSIPACKAGEMSI_CreatePackage (MSIDATABASE *)
 
UINT MSI_OpenPackageW (LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage)
 
UINT MSI_SetTargetPathW (MSIPACKAGE *, LPCWSTR, LPCWSTR)
 
INT MSI_ProcessMessageVerbatim (MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *)
 
INT MSI_ProcessMessage (MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *)
 
MSICONDITION MSI_EvaluateConditionW (MSIPACKAGE *, LPCWSTR)
 
UINT MSI_GetComponentStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE *)
 
UINT MSI_GetFeatureStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE *)
 
UINT MSI_SetFeatureStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE)
 
UINT msi_download_file (LPCWSTR szUrl, LPWSTR filename)
 
UINT msi_package_add_info (MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR)
 
UINT msi_package_add_media_disk (MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR)
 
UINT msi_clone_properties (MSIDATABASE *)
 
UINT msi_set_context (MSIPACKAGE *)
 
void msi_adjust_privilege_properties (MSIPACKAGE *)
 
UINT MSI_GetFeatureCost (MSIPACKAGE *, MSIFEATURE *, MSICOSTTREE, INSTALLSTATE, LPINT)
 
UINT MSI_FormatRecordW (MSIPACKAGE *, MSIRECORD *, LPWSTR, LPDWORD)
 
BOOL unsquash_guid (LPCWSTR in, LPWSTR out)
 
BOOL squash_guid (LPCWSTR in, LPWSTR out)
 
BOOL encode_base85_guid (GUID *, LPWSTR)
 
BOOL decode_base85_guid (LPCWSTR, GUID *)
 
UINT MSIREG_OpenUninstallKey (const WCHAR *, enum platform, HKEY *, BOOL)
 
UINT MSIREG_DeleteUninstallKey (const WCHAR *, enum platform)
 
UINT MSIREG_OpenProductKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
 
UINT MSIREG_OpenFeaturesKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserPatchesKey (LPCWSTR szPatch, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserDataFeaturesKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserComponentsKey (LPCWSTR szComponent, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserDataComponentKey (LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create)
 
UINT MSIREG_OpenPatchesKey (LPCWSTR szPatch, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserDataProductKey (LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserDataPatchKey (LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserDataProductPatchesKey (LPCWSTR product, MSIINSTALLCONTEXT context, HKEY *key, BOOL create)
 
UINT MSIREG_OpenInstallProps (LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUpgradeCodesKey (LPCWSTR szProduct, HKEY *key, BOOL create)
 
UINT MSIREG_OpenUserUpgradeCodesKey (LPCWSTR szProduct, HKEY *key, BOOL create)
 
UINT MSIREG_DeleteProductKey (LPCWSTR szProduct)
 
UINT MSIREG_DeleteUserProductKey (LPCWSTR szProduct)
 
UINT MSIREG_DeleteUserDataPatchKey (LPCWSTR patch, MSIINSTALLCONTEXT context)
 
UINT MSIREG_DeleteUserDataProductKey (LPCWSTR, MSIINSTALLCONTEXT)
 
UINT MSIREG_DeleteUserFeaturesKey (LPCWSTR szProduct)
 
UINT MSIREG_DeleteUserDataComponentKey (LPCWSTR szComponent, LPCWSTR szUserSid)
 
UINT MSIREG_DeleteUserUpgradeCodesKey (LPCWSTR szUpgradeCode)
 
UINT MSIREG_DeleteUpgradeCodesKey (const WCHAR *)
 
UINT MSIREG_DeleteClassesUpgradeCodesKey (LPCWSTR szUpgradeCode)
 
UINT MSIREG_OpenClassesUpgradeCodesKey (LPCWSTR szUpgradeCode, HKEY *key, BOOL create)
 
UINT MSIREG_DeleteLocalClassesProductKey (LPCWSTR szProductCode)
 
UINT MSIREG_DeleteLocalClassesFeaturesKey (LPCWSTR szProductCode)
 
UINT msi_locate_product (LPCWSTR szProduct, MSIINSTALLCONTEXT *context)
 
WCHARmsi_reg_get_val_str (HKEY hkey, const WCHAR *name)
 
BOOL msi_reg_get_val_dword (HKEY hkey, LPCWSTR name, DWORD *val)
 
DWORD msi_version_str_to_dword (LPCWSTR p)
 
void msi_parse_version_string (LPCWSTR, PDWORD, PDWORD)
 
int msi_compare_file_versions (VS_FIXEDFILEINFO *, const WCHAR *)
 
int msi_compare_font_versions (const WCHAR *, const WCHAR *)
 
LONG msi_reg_set_val_str (HKEY hkey, LPCWSTR name, LPCWSTR value)
 
LONG msi_reg_set_val_multi_str (HKEY hkey, LPCWSTR name, LPCWSTR value)
 
LONG msi_reg_set_val_dword (HKEY hkey, LPCWSTR name, DWORD val)
 
LONG msi_reg_set_subkey_val (HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val)
 
void msi_dialog_check_messages (HANDLE)
 
void msi_dialog_destroy (msi_dialog *)
 
void msi_dialog_unregister_class (void)
 
UINT msi_get_suminfo (IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si)
 
UINT msi_get_db_suminfo (MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **si)
 
WCHARmsi_suminfo_dup_string (MSISUMMARYINFO *si, UINT property)
 
INT msi_suminfo_get_int32 (MSISUMMARYINFO *si, UINT uiProperty)
 
WCHARmsi_get_suminfo_product (IStorage *stg)
 
UINT msi_add_suminfo (MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns)
 
UINT msi_export_suminfo (MSIDATABASE *db, HANDLE handle)
 
UINT msi_load_suminfo_properties (MSIPACKAGE *package)
 
UINT WINAPI MsiCreateAndVerifyInstallerDirectory (DWORD)
 
UINT WINAPI MsiDecomposeDescriptorW (LPCWSTR, LPWSTR, LPWSTR, LPWSTR, LPDWORD)
 
UINT WINAPI MsiDecomposeDescriptorA (LPCSTR, LPSTR, LPSTR, LPSTR, LPDWORD)
 
LANGID WINAPI MsiLoadStringW (MSIHANDLE, UINT, LPWSTR, int, LANGID)
 
LANGID WINAPI MsiLoadStringA (MSIHANDLE, UINT, LPSTR, int, LANGID)
 
UINT ACTION_PerformAction (MSIPACKAGE *package, const WCHAR *action)
 
void ACTION_FinishCustomActions (const MSIPACKAGE *package)
 
UINT ACTION_CustomAction (MSIPACKAGE *package, const WCHAR *action)
 
void custom_stop_server (HANDLE process, HANDLE pipe)
 
UINT ACTION_AppSearch (MSIPACKAGE *package)
 
UINT ACTION_CCPSearch (MSIPACKAGE *package)
 
UINT ACTION_FindRelatedProducts (MSIPACKAGE *package)
 
UINT ACTION_InstallFiles (MSIPACKAGE *package)
 
UINT ACTION_PatchFiles (MSIPACKAGE *package)
 
UINT ACTION_RemoveFiles (MSIPACKAGE *package)
 
UINT ACTION_MoveFiles (MSIPACKAGE *package)
 
UINT ACTION_DuplicateFiles (MSIPACKAGE *package)
 
UINT ACTION_RemoveDuplicateFiles (MSIPACKAGE *package)
 
UINT ACTION_RegisterClassInfo (MSIPACKAGE *package)
 
UINT ACTION_RegisterProgIdInfo (MSIPACKAGE *package)
 
UINT ACTION_RegisterExtensionInfo (MSIPACKAGE *package)
 
UINT ACTION_RegisterMIMEInfo (MSIPACKAGE *package)
 
UINT ACTION_RegisterFonts (MSIPACKAGE *package)
 
UINT ACTION_UnregisterClassInfo (MSIPACKAGE *package)
 
UINT ACTION_UnregisterExtensionInfo (MSIPACKAGE *package)
 
UINT ACTION_UnregisterFonts (MSIPACKAGE *package)
 
UINT ACTION_UnregisterMIMEInfo (MSIPACKAGE *package)
 
UINT ACTION_UnregisterProgIdInfo (MSIPACKAGE *package)
 
UINT ACTION_MsiPublishAssemblies (MSIPACKAGE *package)
 
UINT ACTION_MsiUnpublishAssemblies (MSIPACKAGE *package)
 
DWORD deformat_string (MSIPACKAGE *package, LPCWSTR ptr, WCHAR **data)
 
WCHARmsi_dup_record_field (MSIRECORD *row, INT index)
 
WCHARmsi_dup_property (MSIDATABASE *db, const WCHAR *prop)
 
UINT msi_set_property (MSIDATABASE *, const WCHAR *, const WCHAR *, int)
 
UINT msi_get_property (MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD)
 
int msi_get_property_int (MSIDATABASE *package, LPCWSTR prop, int def)
 
WCHARmsi_resolve_source_folder (MSIPACKAGE *package, const WCHAR *name, MSIFOLDER **folder)
 
void msi_resolve_target_folder (MSIPACKAGE *package, const WCHAR *name, BOOL load_prop)
 
WCHARmsi_normalize_path (const WCHAR *)
 
WCHARmsi_resolve_file_source (MSIPACKAGE *package, MSIFILE *file)
 
const WCHARmsi_get_target_folder (MSIPACKAGE *package, const WCHAR *name)
 
void msi_reset_source_folders (MSIPACKAGE *package)
 
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 *file)
 
MSIFOLDERmsi_get_loaded_folder (MSIPACKAGE *package, const WCHAR *dir)
 
WCHARmsi_create_temp_file (MSIDATABASE *db)
 
void msi_free_action_script (MSIPACKAGE *package, UINT script)
 
WCHARmsi_build_icon_path (MSIPACKAGE *, const WCHAR *)
 
WCHAR *WINAPIV msi_build_directory_name (DWORD,...)
 
void msi_reduce_to_long_filename (WCHAR *)
 
WCHARmsi_create_component_advertise_string (MSIPACKAGE *, MSICOMPONENT *, const WCHAR *)
 
void ACTION_UpdateComponentStates (MSIPACKAGE *package, MSIFEATURE *feature)
 
UINT msi_register_unique_action (MSIPACKAGE *, const WCHAR *)
 
BOOL msi_action_is_unique (const MSIPACKAGE *, const WCHAR *)
 
UINT msi_set_last_used_source (LPCWSTR product, LPCWSTR usersid, MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value)
 
UINT msi_create_empty_local_file (LPWSTR path, LPCWSTR suffix)
 
UINT msi_set_sourcedir_props (MSIPACKAGE *package, BOOL replace)
 
MSIASSEMBLYmsi_load_assembly (MSIPACKAGE *, MSICOMPONENT *)
 
UINT msi_install_assembly (MSIPACKAGE *, MSICOMPONENT *)
 
UINT msi_uninstall_assembly (MSIPACKAGE *, MSICOMPONENT *)
 
void msi_destroy_assembly_caches (MSIPACKAGE *)
 
BOOL msi_is_global_assembly (MSICOMPONENT *)
 
IAssemblyEnummsi_create_assembly_enum (MSIPACKAGE *, const WCHAR *)
 
WCHARmsi_get_assembly_path (MSIPACKAGE *, const WCHAR *)
 
WCHAR ** msi_split_string (const WCHAR *, WCHAR)
 
UINT msi_set_original_database_property (MSIDATABASE *, const WCHAR *)
 
WCHARmsi_get_error_message (MSIDATABASE *, int)
 
UINT msi_strncpyWtoA (const WCHAR *str, int len, char *buf, DWORD *sz, BOOL remote)
 
UINT msi_strncpyW (const WCHAR *str, int len, WCHAR *buf, DWORD *sz)
 
WCHARmsi_get_package_code (MSIDATABASE *db)
 
static void msi_disable_fs_redirection (MSIPACKAGE *package)
 
static void msi_revert_fs_redirection (MSIPACKAGE *package)
 
BOOL msi_get_temp_file_name (MSIPACKAGE *, const WCHAR *, const WCHAR *, WCHAR *)
 
HANDLE msi_create_file (MSIPACKAGE *, const WCHAR *, DWORD, DWORD, DWORD, DWORD)
 
BOOL msi_delete_file (MSIPACKAGE *, const WCHAR *)
 
BOOL msi_remove_directory (MSIPACKAGE *, const WCHAR *)
 
DWORD msi_get_file_attributes (MSIPACKAGE *, const WCHAR *)
 
BOOL msi_set_file_attributes (MSIPACKAGE *, const WCHAR *, DWORD)
 
HANDLE msi_find_first_file (MSIPACKAGE *, const WCHAR *, WIN32_FIND_DATAW *)
 
BOOL msi_find_next_file (MSIPACKAGE *, HANDLE, WIN32_FIND_DATAW *)
 
BOOL msi_move_file (MSIPACKAGE *, const WCHAR *, const WCHAR *, DWORD)
 
DWORD msi_get_file_version_info (MSIPACKAGE *, const WCHAR *, DWORD, BYTE *)
 
BOOL msi_create_full_path (MSIPACKAGE *, const WCHAR *)
 
DWORD msi_get_disk_file_size (MSIPACKAGE *, const WCHAR *)
 
VS_FIXEDFILEINFOmsi_get_disk_file_version (MSIPACKAGE *, const WCHAR *)
 
UINT msi_get_filehash (MSIPACKAGE *, const WCHAR *, MSIFILEHASHINFO *)
 
WCHARmsi_get_font_file_version (MSIPACKAGE *, const WCHAR *)
 
UINT ready_media (MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
 
UINT msi_load_media_info (MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
 
void msi_free_media_info (MSIMEDIAINFO *mi)
 
BOOL msi_cabextract (MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
 
UINT msi_add_cabinet_stream (MSIPACKAGE *, UINT, IStorage *, const WCHAR *)
 
void msi_event_fire (MSIPACKAGE *, const WCHAR *, MSIRECORD *)
 
void msi_event_cleanup_all_subscriptions (MSIPACKAGE *)
 
HRESULT create_msiserver (IUnknown *pOuter, LPVOID *ppObj)
 
HRESULT create_session (MSIHANDLE msiHandle, IDispatch *pInstaller, IDispatch **pDispatch)
 
HRESULT get_typeinfo (tid_t tid, ITypeInfo **ti)
 
void release_typelib (void)
 
DWORD call_script (MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action)
 
void msi_ui_progress (MSIPACKAGE *, int, int, int, int)
 
static charstrdupWtoA (LPCWSTR str)
 
static LPWSTR strdupAtoW (LPCSTR str)
 
static charstrdupWtoU (LPCWSTR str)
 
static LPWSTR strdupUtoW (LPCSTR str)
 
static int cost_from_size (int size)
 

Variables

static const BOOL is_64bit = sizeof(void *) > sizeof(int)
 
BOOL is_wow64
 
INSTALLUILEVEL gUILevel
 
HWND gUIhwnd
 
INSTALLUI_HANDLERA gUIHandlerA
 
INSTALLUI_HANDLERW gUIHandlerW
 
INSTALLUI_HANDLER_RECORD gUIHandlerRecord
 
DWORD gUIFilter
 
DWORD gUIFilterRecord
 
LPVOID gUIContext
 
LPVOID gUIContextRecord
 
WCHARgszLogFile
 
HINSTANCE msi_hInstance
 

Macro Definition Documentation

◆ GUID_SIZE

#define GUID_SIZE   39

Definition at line 733 of file msipriv.h.

◆ INSTALLUILEVEL_MASK

#define INSTALLUILEVEL_MASK   0x0007

Definition at line 60 of file msipriv.h.

◆ LONG_STR_BYTES

#define LONG_STR_BYTES   3

Definition at line 57 of file msipriv.h.

◆ MAX_STREAM_NAME_LEN

#define MAX_STREAM_NAME_LEN   62

Definition at line 56 of file msipriv.h.

◆ MSI_BUILDNUMBER

#define MSI_BUILDNUMBER   6001

Definition at line 731 of file msipriv.h.

◆ MSI_DATASIZEMASK

#define MSI_DATASIZEMASK   0x00ff

Definition at line 47 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_DISKID

#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID   32000

Definition at line 84 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_OFFSET

#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET   10000

Definition at line 83 of file msipriv.h.

◆ MSI_MAJORVERSION

#define MSI_MAJORVERSION   4

Definition at line 729 of file msipriv.h.

◆ MSI_MAX_PROPS

#define MSI_MAX_PROPS   20

Definition at line 482 of file msipriv.h.

◆ MSI_MINORVERSION

#define MSI_MINORVERSION   5

Definition at line 730 of file msipriv.h.

◆ MSI_OPEN_CREATE

#define MSI_OPEN_CREATE   3

Definition at line 102 of file msipriv.h.

◆ MSI_OPEN_CREATEDIRECT

#define MSI_OPEN_CREATEDIRECT   4

Definition at line 103 of file msipriv.h.

◆ MSI_OPEN_DIRECT

#define MSI_OPEN_DIRECT   2

Definition at line 101 of file msipriv.h.

◆ MSI_OPEN_PATCHFILE

#define MSI_OPEN_PATCHFILE   32

Definition at line 104 of file msipriv.h.

◆ MSI_OPEN_READONLY

#define MSI_OPEN_READONLY   0

Definition at line 99 of file msipriv.h.

◆ MSI_OPEN_TRANSACT

#define MSI_OPEN_TRANSACT   1

Definition at line 100 of file msipriv.h.

◆ MSICABEXTRACT_BEGINEXTRACT

#define MSICABEXTRACT_BEGINEXTRACT   0x01

Definition at line 1101 of file msipriv.h.

◆ MSICABEXTRACT_FILEEXTRACTED

#define MSICABEXTRACT_FILEEXTRACTED   0x02

Definition at line 1102 of file msipriv.h.

◆ MSIHANDLE_MAGIC

#define MSIHANDLE_MAGIC   0x4d434923

Definition at line 736 of file msipriv.h.

◆ MSIHANDLETYPE_ANY

#define MSIHANDLETYPE_ANY   0

Definition at line 721 of file msipriv.h.

◆ MSIHANDLETYPE_DATABASE

#define MSIHANDLETYPE_DATABASE   1

Definition at line 722 of file msipriv.h.

◆ MSIHANDLETYPE_PACKAGE

#define MSIHANDLETYPE_PACKAGE   5

Definition at line 726 of file msipriv.h.

◆ MSIHANDLETYPE_PREVIEW

#define MSIHANDLETYPE_PREVIEW   6

Definition at line 727 of file msipriv.h.

◆ MSIHANDLETYPE_RECORD

#define MSIHANDLETYPE_RECORD   4

Definition at line 725 of file msipriv.h.

◆ MSIHANDLETYPE_SUMMARYINFO

#define MSIHANDLETYPE_SUMMARYINFO   2

Definition at line 723 of file msipriv.h.

◆ MSIHANDLETYPE_VIEW

#define MSIHANDLETYPE_VIEW   3

Definition at line 724 of file msipriv.h.

◆ MSITYPE_IS_BINARY

#define MSITYPE_IS_BINARY (   type)    (((type) & ~MSITYPE_NULLABLE) == (MSITYPE_STRING|MSITYPE_VALID))

Definition at line 62 of file msipriv.h.

◆ MSITYPE_KEY

#define MSITYPE_KEY   0x2000

Definition at line 52 of file msipriv.h.

◆ MSITYPE_LOCALIZABLE

#define MSITYPE_LOCALIZABLE   0x200

Definition at line 49 of file msipriv.h.

◆ MSITYPE_NULLABLE

#define MSITYPE_NULLABLE   0x1000

Definition at line 51 of file msipriv.h.

◆ MSITYPE_STRING

#define MSITYPE_STRING   0x0800

Definition at line 50 of file msipriv.h.

◆ MSITYPE_TEMPORARY

#define MSITYPE_TEMPORARY   0x4000

Definition at line 53 of file msipriv.h.

◆ MSITYPE_UNKNOWN

#define MSITYPE_UNKNOWN   0x8000

Definition at line 54 of file msipriv.h.

◆ MSITYPE_VALID

#define MSITYPE_VALID   0x0100

Definition at line 48 of file msipriv.h.

◆ SEQUENCE_EXEC

#define SEQUENCE_EXEC   0x2

Definition at line 719 of file msipriv.h.

◆ SEQUENCE_UI

#define SEQUENCE_UI   0x1

Definition at line 718 of file msipriv.h.

◆ SQUASHED_GUID_SIZE

#define SQUASHED_GUID_SIZE   33

Definition at line 734 of file msipriv.h.

◆ WINE_OPENPACKAGEFLAGS_RECACHE

#define WINE_OPENPACKAGEFLAGS_RECACHE   0x80000000

Definition at line 884 of file msipriv.h.

Typedef Documentation

◆ column_info

◆ ComponentList

◆ FeatureList

◆ FolderList

◆ msi_dialog

Definition at line 361 of file msipriv.h.

◆ msi_file_state

◆ MSIAPPID

◆ MSIASSEMBLY

◆ MSIBINARY

◆ MSICABINETSTREAM

◆ MSICLASS

◆ MSICOMPONENT

◆ MSIDATABASE

◆ MSIEXTENSION

◆ MSIFEATURE

◆ MSIFIELD

◆ MSIFILE

◆ MSIFILEPATCH

◆ MSIFOLDER

◆ msihandledestructor

typedef VOID(* msihandledestructor) (MSIOBJECTHDR *)

Definition at line 73 of file msipriv.h.

◆ MSIITERHANDLE

typedef const struct tagMSICOLUMNHASHENTRY* MSIITERHANDLE

Definition at line 229 of file msipriv.h.

◆ MSIMEDIADISK

◆ MSIMEDIAINFO

◆ MSIMIME

Definition at line 670 of file msipriv.h.

◆ MSIOBJECTHDR

Definition at line 71 of file msipriv.h.

◆ MSIPACKAGE

◆ MSIPATCHINFO

◆ MSIPREVIEW

◆ MSIPROGID

Definition at line 647 of file msipriv.h.

◆ MSIQUERY

◆ MSIRECORD

◆ MSISOURCELISTINFO

◆ MSISTREAM

◆ MSISUMMARYINFO

◆ MSITABLE

Definition at line 65 of file msipriv.h.

◆ MSITRANSFORM

◆ MSIVERB

◆ MSIVIEW

Definition at line 125 of file msipriv.h.

◆ MSIVIEWOPS

◆ PMSICABEXTRACTCB

typedef BOOL(* PMSICABEXTRACTCB) (MSIPACKAGE *, LPCWSTR, DWORD, LPWSTR *, DWORD *, PVOID)

Definition at line 1099 of file msipriv.h.

◆ record_func

typedef UINT(* record_func) (MSIRECORD *, LPVOID)

Definition at line 866 of file msipriv.h.

◆ string_table

Definition at line 68 of file msipriv.h.

◆ tid_t

typedef enum tid_t tid_t

Enumeration Type Documentation

◆ _msi_file_state

Enumerator
msifs_invalid 
msifs_missing 
msifs_overwrite 
msifs_present 
msifs_installed 
msifs_skipped 
msifs_hashmatch 

Definition at line 593 of file msipriv.h.

593 {
enum _msi_file_state msi_file_state
@ msifs_missing
Definition: msipriv.h:595
@ msifs_skipped
Definition: msipriv.h:599
@ msifs_installed
Definition: msipriv.h:598
@ msifs_invalid
Definition: msipriv.h:594
@ msifs_present
Definition: msipriv.h:597
@ msifs_hashmatch
Definition: msipriv.h:600
@ msifs_overwrite
Definition: msipriv.h:596

◆ clr_version

Enumerator
CLR_VERSION_V10 
CLR_VERSION_V11 
CLR_VERSION_V20 
CLR_VERSION_V40 
CLR_VERSION_MAX 

Definition at line 373 of file msipriv.h.

374{
380};
@ CLR_VERSION_V20
Definition: msipriv.h:377
@ CLR_VERSION_MAX
Definition: msipriv.h:379
@ CLR_VERSION_V40
Definition: msipriv.h:378
@ CLR_VERSION_V11
Definition: msipriv.h:376
@ CLR_VERSION_V10
Definition: msipriv.h:375

◆ folder_state

Enumerator
FOLDER_STATE_UNINITIALIZED 
FOLDER_STATE_EXISTS 
FOLDER_STATE_CREATED 
FOLDER_STATE_CREATED_PERSISTENT 
FOLDER_STATE_REMOVED 

Definition at line 563 of file msipriv.h.

564{
570};
@ FOLDER_STATE_UNINITIALIZED
Definition: msipriv.h:565
@ FOLDER_STATE_EXISTS
Definition: msipriv.h:566
@ FOLDER_STATE_REMOVED
Definition: msipriv.h:569
@ FOLDER_STATE_CREATED
Definition: msipriv.h:567
@ FOLDER_STATE_CREATED_PERSISTENT
Definition: msipriv.h:568

◆ platform

Enumerator
PLATFORM_UNRECOGNIZED 
PLATFORM_INTEL 
PLATFORM_INTEL64 
PLATFORM_X64 
PLATFORM_ARM 
PLATFORM_ARM64 

Definition at line 363 of file msipriv.h.

364{
371};
@ PLATFORM_X64
Definition: msipriv.h:368
@ PLATFORM_UNRECOGNIZED
Definition: msipriv.h:365
@ PLATFORM_INTEL64
Definition: msipriv.h:367
@ PLATFORM_INTEL
Definition: msipriv.h:366
@ PLATFORM_ARM
Definition: msipriv.h:369
@ PLATFORM_ARM64
Definition: msipriv.h:370

◆ script

Enumerator
SCRIPT_NONE 
SCRIPT_INSTALL 
SCRIPT_COMMIT 
SCRIPT_ROLLBACK 
SCRIPT_MAX 

Definition at line 382 of file msipriv.h.

383{
384 SCRIPT_NONE = -1,
385 SCRIPT_INSTALL = 0,
386 SCRIPT_COMMIT = 1,
387 SCRIPT_ROLLBACK = 2,
388 SCRIPT_MAX = 3
389};
@ SCRIPT_INSTALL
Definition: msipriv.h:385
@ SCRIPT_ROLLBACK
Definition: msipriv.h:387
@ SCRIPT_NONE
Definition: msipriv.h:384
@ SCRIPT_COMMIT
Definition: msipriv.h:386
@ SCRIPT_MAX
Definition: msipriv.h:388

◆ tid_t

Enumerator
LAST_tid 
LAST_tid 
Database_tid 
Installer_tid 
Record_tid 
Session_tid 
StringList_tid 
SummaryInfo_tid 
View_tid 
LAST_tid 
NULL_tid 
IXMLDOMAttribute_tid 
IXMLDOMCDATASection_tid 
IXMLDOMComment_tid 
IXMLDOMDocument_tid 
IXMLDOMDocument2_tid 
IXMLDOMDocument3_tid 
IXMLDOMDocumentFragment_tid 
IXMLDOMDocumentType_tid 
IXMLDOMElement_tid 
IXMLDOMEntityReference_tid 
IXMLDOMImplementation_tid 
IXMLDOMNamedNodeMap_tid 
IXMLDOMNode_tid 
IXMLDOMNodeList_tid 
IXMLDOMParseError2_tid 
IXMLDOMProcessingInstruction_tid 
IXMLDOMSchemaCollection_tid 
IXMLDOMSchemaCollection2_tid 
IXMLDOMSelection_tid 
IXMLDOMText_tid 
IXMLElement_tid 
IXMLDocument_tid 
IXMLHTTPRequest_tid 
IXSLProcessor_tid 
IXSLTemplate_tid 
IVBSAXAttributes_tid 
IVBSAXContentHandler_tid 
IVBSAXDeclHandler_tid 
IVBSAXDTDHandler_tid 
IVBSAXEntityResolver_tid 
IVBSAXErrorHandler_tid 
IVBSAXLexicalHandler_tid 
IVBSAXLocator_tid 
IVBSAXXMLFilter_tid 
IVBSAXXMLReader_tid 
IMXAttributes_tid 
IMXReaderControl_tid 
IMXWriter_tid 
IVBMXNamespaceManager_tid 
IServerXMLHTTPRequest_tid 
LAST_tid 
NULL_tid 
ITextDocument_tid 
ITextRange_tid 
ITextSelection_tid 
ITextFont_tid 
ITextPara_tid 
LAST_tid 
NULL_tid 
IDictionary_tid 
IDrive_tid 
IDriveCollection_tid 
IFile_tid 
IFileCollection_tid 
IFileSystem3_tid 
IFolder_tid 
IFolderCollection_tid 
ITextStream_tid 
LAST_tid 
NULL_tid 
IWshCollection_tid 
IWshEnvironment_tid 
IWshExec_tid 
IWshShell3_tid 
IWshShortcut_tid 
LAST_tid 

Definition at line 1124 of file msipriv.h.

1124 {
1127 Record_tid,
1131 View_tid,
1132 LAST_tid
1133} tid_t;
tid_t
Definition: msipriv.h:1124
@ View_tid
Definition: msipriv.h:1131
@ Session_tid
Definition: msipriv.h:1128
@ Database_tid
Definition: msipriv.h:1125
@ LAST_tid
Definition: msipriv.h:1132
@ SummaryInfo_tid
Definition: msipriv.h:1130
@ StringList_tid
Definition: msipriv.h:1129
@ Record_tid
Definition: msipriv.h:1127
@ Installer_tid
Definition: msipriv.h:1126

Function Documentation

◆ ACTION_AppSearch()

UINT ACTION_AppSearch ( MSIPACKAGE package)

Definition at line 1078 of file appsearch.c.

1079{
1080 MSIQUERY *view;
1081 UINT r;
1082
1083 if (msi_action_is_unique(package, L"AppSearch"))
1084 {
1085 TRACE("Skipping AppSearch action: already done in UI sequence\n");
1086 return ERROR_SUCCESS;
1087 }
1088 else
1089 msi_register_unique_action(package, L"AppSearch");
1090
1091 r = MSI_OpenQuery( package->db, &view, L"SELECT * FROM `AppSearch`" );
1092 if (r != ERROR_SUCCESS)
1093 return ERROR_SUCCESS;
1094
1096 msiobj_release( &view->hdr );
1097 return r;
1098}
static UINT ITERATE_AppSearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1043
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:113
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:131
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...)
Definition: msiquery.c:138
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID)
Definition: msiquery.c:163
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394

◆ ACTION_CCPSearch()

UINT ACTION_CCPSearch ( MSIPACKAGE package)

Definition at line 1125 of file appsearch.c.

1126{
1127 MSIQUERY *view;
1128 UINT r;
1129
1130 if (msi_action_is_unique(package, L"CCPSearch"))
1131 {
1132 TRACE("Skipping AppSearch action: already done in UI sequence\n");
1133 return ERROR_SUCCESS;
1134 }
1135 else
1136 msi_register_unique_action(package, L"CCPSearch");
1137
1138 r = MSI_OpenQuery(package->db, &view, L"SELECT * FROM `CCPSearch`");
1139 if (r != ERROR_SUCCESS)
1140 return ERROR_SUCCESS;
1141
1143 msiobj_release(&view->hdr);
1144 return r;
1145}
static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1100

◆ ACTION_CustomAction()

UINT ACTION_CustomAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 1485 of file custom.c.

1486{
1487 UINT rc = ERROR_SUCCESS;
1488 MSIRECORD *row;
1489 UINT type;
1490 const WCHAR *source, *target, *ptr, *deferred_data = NULL;
1491 WCHAR *deformated = NULL;
1492 int len;
1493
1494 /* deferred action: [properties]Action */
1495 if ((ptr = wcsrchr(action, ']')))
1496 {
1497 deferred_data = action;
1498 action = ptr + 1;
1499 }
1500
1501 row = MSI_QueryGetRecord( package->db, L"SELECT * FROM `CustomAction` WHERE `Action` = '%s'", action );
1502 if (!row)
1504
1508
1509 TRACE("Handling custom action %s (%x %s %s)\n",debugstr_w(action),type,
1511
1512 /* handle some of the deferred actions */
1514 FIXME("msidbCustomActionTypeTSAware not handled\n");
1515
1517 {
1519 WARN("msidbCustomActionTypeNoImpersonate not handled\n");
1520
1521 if (!action_type_matches_script(type, package->script))
1522 {
1523 rc = defer_custom_action( package, action, type );
1524 goto end;
1525 }
1526 else
1527 {
1528 LPWSTR actiondata = msi_dup_property( package->db, action );
1529
1531 package->scheduled_action_running = TRUE;
1532
1534 package->commit_action_running = TRUE;
1535
1537 package->rollback_action_running = TRUE;
1538
1539 if (deferred_data)
1540 set_deferred_action_props(package, deferred_data);
1541 else if (actiondata)
1542 msi_set_property( package->db, L"CustomActionData", actiondata, -1 );
1543 else
1544 msi_set_property( package->db, L"CustomActionData", L"", -1 );
1545
1546 free(actiondata);
1547 }
1548 }
1550 {
1551 rc = ERROR_SUCCESS;
1552 goto end;
1553 }
1554
1555 switch (type & CUSTOM_ACTION_TYPE_MASK)
1556 {
1557 case 1: /* DLL file stored in a Binary table stream */
1558 rc = HANDLE_CustomType1( package, source, target, type, action );
1559 break;
1560 case 2: /* EXE file stored in a Binary table stream */
1561 rc = HANDLE_CustomType2( package, source, target, type, action );
1562 break;
1563 case 5:
1564 case 6: /* JScript/VBScript file stored in a Binary table stream */
1565 rc = HANDLE_CustomType5_6( package, source, target, type, action );
1566 break;
1567 case 7: /* Concurrent install from substorage */
1568 deformat_string( package, target, &deformated );
1569 rc = HANDLE_CustomType7( package, source, target, type, action );
1570 free( deformated );
1571 break;
1572 case 17:
1573 rc = HANDLE_CustomType17( package, source, target, type, action );
1574 break;
1575 case 18: /* EXE file installed with package */
1576 rc = HANDLE_CustomType18( package, source, target, type, action );
1577 break;
1578 case 19: /* Error that halts install */
1579 rc = HANDLE_CustomType19( package, source, target, type, action );
1580 break;
1581 case 21: /* JScript/VBScript file installed with the product */
1582 case 22:
1583 rc = HANDLE_CustomType21_22( package, source, target, type, action );
1584 break;
1585 case 23: /* Installs another package in the source tree */
1586 deformat_string( package, target, &deformated );
1587 rc = HANDLE_CustomType23( package, source, deformated, type, action );
1588 free( deformated );
1589 break;
1590 case 34: /* EXE to be run in specified directory */
1591 rc = HANDLE_CustomType34( package, source, target, type, action );
1592 break;
1593 case 35: /* Directory set with formatted text */
1594 deformat_string( package, target, &deformated );
1595 MSI_SetTargetPathW( package, source, deformated );
1596 free( deformated );
1597 break;
1598 case 37: /* JScript/VBScript text stored in target column */
1599 case 38:
1600 rc = HANDLE_CustomType37_38( package, source, target, type, action );
1601 break;
1602 case 50: /* EXE file specified by a property value */
1603 rc = HANDLE_CustomType50( package, source, target, type, action );
1604 break;
1605 case 51: /* Property set with formatted text */
1606 if (!source) break;
1607 len = deformat_string( package, target, &deformated );
1608 rc = msi_set_property( package->db, source, deformated, len );
1609 if (rc == ERROR_SUCCESS && !wcscmp( source, L"SourceDir" )) msi_reset_source_folders( package );
1610 free( deformated );
1611 break;
1612 case 53: /* JScript/VBScript text specified by a property value */
1613 case 54:
1614 rc = HANDLE_CustomType53_54( package, source, target, type, action );
1615 break;
1616 default:
1617 FIXME( "unhandled action type %u (%s %s)\n", type & CUSTOM_ACTION_TYPE_MASK, debugstr_w(source),
1618 debugstr_w(target) );
1619 }
1620
1621end:
1623 package->commit_action_running = FALSE;
1624 package->rollback_action_running = FALSE;
1625 msiobj_release(&row->hdr);
1626 return rc;
1627}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define free
Definition: debug_ros.c:5
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define wcsrchr
Definition: compat.h:16
const WCHAR * action
Definition: action.c:7509
static UINT HANDLE_CustomType1(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:862
static UINT defer_custom_action(MSIPACKAGE *package, const WCHAR *action, UINT type)
Definition: custom.c:1448
static UINT HANDLE_CustomType7(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1147
#define CUSTOM_ACTION_TYPE_MASK
Definition: custom.c:51
static UINT HANDLE_CustomType37_38(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1296
static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR action, UINT options)
Definition: custom.c:142
static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1355
static UINT HANDLE_CustomType23(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1066
static UINT HANDLE_CustomType17(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:975
static UINT HANDLE_CustomType2(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:956
static void set_deferred_action_props(MSIPACKAGE *package, const WCHAR *deferred_data)
Definition: custom.c:199
static BOOL action_type_matches_script(UINT type, UINT script)
Definition: custom.c:1430
static UINT HANDLE_CustomType34(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1199
static UINT HANDLE_CustomType5_6(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1307
static UINT HANDLE_CustomType18(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1006
static UINT HANDLE_CustomType50(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1181
static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1414
static UINT HANDLE_CustomType19(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1024
DWORD deformat_string(MSIPACKAGE *package, const WCHAR *fmt, WCHAR **data)
Definition: format.c:1016
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, LPCWSTR szFolderPath)
Definition: install.c:564
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
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
GLenum target
Definition: glext.h:7315
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
@ msidbCustomActionTypeCommit
Definition: msidefs.h:137
@ msidbCustomActionTypeNoImpersonate
Definition: msidefs.h:139
@ msidbCustomActionTypeTSAware
Definition: msidefs.h:140
@ msidbCustomActionTypeRollback
Definition: msidefs.h:136
@ msidbCustomActionTypeInScript
Definition: msidefs.h:134
int MSI_RecordGetInteger(MSIRECORD *, UINT)
Definition: record.c:213
void msi_reset_source_folders(MSIPACKAGE *package)
Definition: package.c:2089
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT)
Definition: record.c:433
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int)
Definition: package.c:2100
MSIRECORD *WINAPIV MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR query,...)
Definition: msiquery.c:201
WCHAR * msi_dup_property(MSIDATABASE *db, const WCHAR *prop)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
unsigned char commit_action_running
Definition: msipriv.h:467
unsigned char rollback_action_running
Definition: msipriv.h:468
enum script script
Definition: msipriv.h:432
unsigned char scheduled_action_running
Definition: msipriv.h:466
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by ACTION_HandleCustomAction().

◆ ACTION_DialogBox()

INT ACTION_DialogBox ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_DuplicateFiles()

UINT ACTION_DuplicateFiles ( MSIPACKAGE package)

Definition at line 1315 of file files.c.

1316{
1317 MSIQUERY *view;
1318 UINT rc;
1319
1320 if (package->script == SCRIPT_NONE)
1321 return msi_schedule_action(package, SCRIPT_INSTALL, L"DuplicateFiles");
1322
1323 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `DuplicateFile`", &view);
1324 if (rc != ERROR_SUCCESS)
1325 return ERROR_SUCCESS;
1326
1328 msiobj_release(&view->hdr);
1329 return rc;
1330}
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1254
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **)

◆ ACTION_FindRelatedProducts()

UINT ACTION_FindRelatedProducts ( MSIPACKAGE package)

Definition at line 217 of file upgrade.c.

218{
219 MSIQUERY *view;
220 UINT rc;
221
222 if (msi_get_property_int(package->db, L"Installed", 0))
223 {
224 TRACE("Skipping FindRelatedProducts action: product already installed\n");
225 return ERROR_SUCCESS;
226 }
227 if (msi_action_is_unique(package, L"FindRelatedProducts"))
228 {
229 TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n");
230 return ERROR_SUCCESS;
231 }
232 else
233 msi_register_unique_action(package, L"FindRelatedProducts");
234
235 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Upgrade`", &view);
236 if (rc != ERROR_SUCCESS)
237 return ERROR_SUCCESS;
238
240 msiobj_release(&view->hdr);
241 return rc;
242}
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def)
Definition: package.c:2305
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
Definition: upgrade.c:115

◆ ACTION_FinishCustomActions()

void ACTION_FinishCustomActions ( const MSIPACKAGE package)

Definition at line 1629 of file custom.c.

1630{
1631 struct list *item;
1632 HANDLE *wait_handles;
1633 unsigned int handle_count, i;
1635
1636 while ((item = list_head( &package->RunningActions )))
1637 {
1639
1640 list_remove( &action->entry );
1641
1642 TRACE("waiting for %s\n", debugstr_w( action->name ) );
1644
1645 CloseHandle( action->handle );
1646 free( action->name );
1647 free( action );
1648 }
1649
1651
1652 handle_count = list_count( &pending_custom_actions );
1653 wait_handles = malloc( handle_count * sizeof(HANDLE) );
1654
1655 handle_count = 0;
1657 {
1658 if (info->package == package )
1659 {
1660 if (DuplicateHandle(GetCurrentProcess(), info->handle, GetCurrentProcess(), &wait_handles[handle_count], SYNCHRONIZE, FALSE, 0))
1661 handle_count++;
1662 }
1663 }
1664
1666
1667 for (i = 0; i < handle_count; i++)
1668 {
1669 msi_dialog_check_messages( wait_handles[i] );
1670 CloseHandle( wait_handles[i] );
1671 }
1672 free( wait_handles );
1673
1676 {
1677 if (info->package == package)
1679 }
1681}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
Definition: list.h:37
#define malloc
Definition: debug_ros.c:4
#define CloseHandle
Definition: compat.h:739
#define GetCurrentProcess()
Definition: compat.h:759
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
Definition: handle.c:149
static struct list pending_custom_actions
Definition: custom.c:73
static CRITICAL_SECTION custom_action_cs
Definition: custom.c:63
static void free_custom_action_data(custom_action_info *info)
Definition: custom.c:396
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:3987
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
const char cursor[]
Definition: icontest.c:13
uint32_t entry
Definition: isohybrid.c:63
static ATOM item
Definition: dde.c:856
#define SYNCHRONIZE
Definition: nt_native.h:61
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
Definition: list.h:15
struct list RunningActions
Definition: msipriv.h:440
#define LIST_ENTRY(type)
Definition: queue.h:175
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by MSI_InstallPackage().

◆ ACTION_ForceReboot()

UINT ACTION_ForceReboot ( MSIPACKAGE package)

Definition at line 5219 of file action.c.

5220{
5221 WCHAR buffer[256], sysdir[MAX_PATH], squashed_pc[SQUASHED_GUID_SIZE];
5222 HKEY hkey;
5223
5224 squash_guid( package->ProductCode, squashed_pc );
5225
5226 GetSystemDirectoryW(sysdir, ARRAY_SIZE(sysdir));
5227 RegCreateKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce", &hkey);
5228 swprintf(buffer, ARRAY_SIZE(buffer), L"%s\\MsiExec.exe /@ \"%s\"", sysdir, squashed_pc);
5229
5230 msi_reg_set_val_str( hkey, squashed_pc, buffer );
5231 RegCloseKey(hkey);
5232
5233 TRACE("Reboot command %s\n",debugstr_w(buffer));
5234
5235 RegCreateKeyW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\RunOnceEntries",
5236 &hkey);
5237 swprintf( buffer, ARRAY_SIZE(buffer), L"/I \"%s\" AFTERREBOOT=1 RUNONCEENTRY=\"%s\"", package->ProductCode,
5238 squashed_pc );
5239
5240 msi_reg_set_val_str( hkey, squashed_pc, buffer );
5241 RegCloseKey(hkey);
5242
5243 return ERROR_INSTALL_SUSPEND;
5244}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
#define MAX_PATH
Definition: compat.h:34
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
#define swprintf
Definition: precomp.h:40
GLuint buffer
Definition: glext.h:5915
BOOL squash_guid(LPCWSTR in, LPWSTR out)
Definition: registry.c:74
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value)
Definition: registry.c:209
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:734
LPWSTR ProductCode
Definition: msipriv.h:448
#define ERROR_INSTALL_SUSPEND
Definition: winerror.h:962
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by custom_get_thread_return(), and ITERATE_Actions().

◆ ACTION_InstallFiles()

UINT ACTION_InstallFiles ( MSIPACKAGE package)

Definition at line 564 of file files.c.

565{
567 UINT rc = ERROR_SUCCESS;
568 MSIFILE *file;
569
571
572 if (package->script == SCRIPT_NONE)
573 return msi_schedule_action(package, SCRIPT_INSTALL, L"InstallFiles");
574
575 schedule_install_files(package);
576 mi = calloc(1, sizeof(MSIMEDIAINFO));
577
579 {
580 BOOL is_global_assembly = msi_is_global_assembly( file->Component );
581
582 file_update_ui( package, file, L"InstallFiles" );
583
584 rc = msi_load_media_info( package, file->Sequence, mi );
585 if (rc != ERROR_SUCCESS)
586 {
587 ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
589 goto done;
590 }
591
592 if (file->state != msifs_hashmatch &&
593 file->state != msifs_skipped &&
594 (file->state != msifs_present || !msi_get_property_int( package->db, L"Installed", 0 )) &&
595 (rc = ready_media( package, file->IsCompressed, mi )))
596 {
597 ERR("Failed to ready media for %s\n", debugstr_w(file->File));
598 goto done;
599 }
600
601 if (file->state != msifs_missing && !mi->is_continuous && file->state != msifs_overwrite)
602 continue;
603
604 if (file->Sequence > mi->last_sequence || mi->is_continuous ||
605 (file->IsCompressed && !mi->is_extracted))
606 {
609
610 data.mi = mi;
611 data.package = package;
613 data.user = &cursor;
614
615 if (file->IsCompressed && !msi_cabextract(package, mi, &data))
616 {
617 ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
619 goto done;
620 }
621 }
622
623 if (!file->IsCompressed)
624 {
626
627 TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath));
628
629 if (!is_global_assembly)
630 {
631 create_folder(package, file->Component->Directory);
632 }
633 rc = copy_install_file(package, file, source);
634 if (rc != ERROR_SUCCESS)
635 {
636 ERR("Failed to copy %s to %s (%u)\n", debugstr_w(source), debugstr_w(file->TargetPath), rc);
638 free(source);
639 goto done;
640 }
641 if (!is_global_assembly) file->state = msifs_installed;
642 free(source);
643 }
644 else if (!is_global_assembly && file->state != msifs_installed &&
645 !(file->Attributes & msidbFileAttributesPatchAdded))
646 {
647 ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
649 goto done;
650 }
651 }
652
653done:
655 return rc;
656}
#define ERR(fmt,...)
Definition: precomp.h:57
BOOL msi_is_global_assembly(MSICOMPONENT *comp)
Definition: action.c:2036
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
Definition: action.c:352
WCHAR * msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file)
Definition: files.c:536
static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR filename, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:505
static void schedule_install_files(MSIPACKAGE *package)
Definition: files.c:387
static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
Definition: files.c:416
static void file_update_ui(MSIPACKAGE *package, MSIFILE *f, const WCHAR *action)
Definition: files.c:251
static UINT create_folder(MSIPACKAGE *package, const WCHAR *dir)
Definition: files.c:475
UINT ready_media(MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
Definition: media.c:838
void msi_free_media_info(MSIMEDIAINFO *mi)
Definition: media.c:649
BOOL msi_cabextract(MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
Definition: media.c:640
UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
Definition: media.c:677
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
@ msidbFileAttributesPatchAdded
Definition: msidefs.h:37
#define calloc
Definition: rosglue.h:14
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
Definition: fci.c:127
struct list files
Definition: msipriv.h:403
static MONITORINFO mi
Definition: win.c:7338
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985

◆ ACTION_MoveFiles()

UINT ACTION_MoveFiles ( MSIPACKAGE package)

Definition at line 1185 of file files.c.

1186{
1187 MSIQUERY *view;
1188 UINT rc;
1189
1190 if (package->script == SCRIPT_NONE)
1191 return msi_schedule_action(package, SCRIPT_INSTALL, L"MoveFiles");
1192
1193 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `MoveFile`", &view);
1194 if (rc != ERROR_SUCCESS)
1195 return ERROR_SUCCESS;
1196
1198 msiobj_release(&view->hdr);
1199 return rc;
1200}
static UINT ITERATE_MoveFiles(MSIRECORD *rec, LPVOID param)
Definition: files.c:1059

◆ ACTION_MsiPublishAssemblies()

UINT ACTION_MsiPublishAssemblies ( MSIPACKAGE package)

Definition at line 542 of file assembly.c.

543{
544 MSICOMPONENT *comp;
545
546 if (package->script == SCRIPT_NONE)
547 return msi_schedule_action(package, SCRIPT_INSTALL, L"MsiPublishAssemblies");
548
550 {
551 LONG res;
552 HKEY hkey;
553 GUID guid;
554 DWORD size;
555 WCHAR buffer[43];
556 MSIRECORD *uirow;
558 BOOL win32;
559
560 if (!assembly || !comp->ComponentId) continue;
561
562 comp->Action = msi_get_component_action( package, comp );
563 if (comp->Action != INSTALLSTATE_LOCAL)
564 {
565 TRACE("component not scheduled for installation %s\n", debugstr_w(comp->Component));
566 continue;
567 }
568 TRACE("publishing %s\n", debugstr_w(comp->Component));
569
570 CLSIDFromString( package->ProductCode, &guid );
572 buffer[20] = '>';
575 buffer[42] = 0;
576
577 win32 = assembly->attributes & msidbAssemblyAttributesWin32;
578 if (assembly->application)
579 {
580 MSIFILE *file = msi_get_loaded_file( package, assembly->application );
581 if (!file)
582 {
583 WARN("no matching file %s for local assembly\n", debugstr_w(assembly->application));
584 continue;
585 }
586 if ((res = open_local_assembly_key( package->Context, win32, file->TargetPath, &hkey )))
587 {
588 WARN( "failed to open local assembly key %ld\n", res );
590 }
591 }
592 else
593 {
594 if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
595 {
596 WARN( "failed to open global assembly key %ld\n", res );
598 }
599 }
600 size = sizeof(buffer);
601 if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size )))
602 {
603 WARN( "failed to set assembly value %ld\n", res );
604 }
605 RegCloseKey( hkey );
606
607 uirow = MSI_CreateRecord( 2 );
608 MSI_RecordSetStringW( uirow, 2, assembly->display_name );
610 msiobj_release( &uirow->hdr );
611 }
612 return ERROR_SUCCESS;
613}
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:4882
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:609
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:572
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
const GUID * guid
static LONG open_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename, HKEY *hkey)
Definition: assembly.c:482
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
Definition: assembly.c:522
@ INSTALLMESSAGE_ACTIONDATA
Definition: msi.h:103
@ INSTALLSTATE_LOCAL
Definition: msi.h:46
@ msidbAssemblyAttributesWin32
Definition: msidefs.h:216
BOOL encode_base85_guid(GUID *, LPWSTR)
Definition: registry.c:165
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *)
Definition: package.c:1909
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR)
Definition: record.c:597
MSIRECORD * MSI_CreateRecord(UINT)
Definition: record.c:76
#define REG_MULTI_SZ
Definition: nt_native.h:1501
long LONG
Definition: pedump.c:60
LPWSTR Component
Definition: msipriv.h:524
INSTALLSTATE Action
Definition: msipriv.h:532
LPWSTR ComponentId
Definition: msipriv.h:525
MSIASSEMBLY * assembly
Definition: msipriv.h:540
struct list components
Definition: msipriv.h:401
MSIINSTALLCONTEXT Context
Definition: msipriv.h:459
MSIOBJECTHDR hdr
Definition: msipriv.h:151
unsigned char BYTE
Definition: xxhash.c:193

◆ ACTION_MsiUnpublishAssemblies()

UINT ACTION_MsiUnpublishAssemblies ( MSIPACKAGE package)

Definition at line 615 of file assembly.c.

616{
617 MSICOMPONENT *comp;
618
619 if (package->script == SCRIPT_NONE)
620 return msi_schedule_action(package, SCRIPT_INSTALL, L"MsiUnpublishAssemblies");
621
623 {
624 LONG res;
625 MSIRECORD *uirow;
627 BOOL win32;
628
629 if (!assembly || !comp->ComponentId) continue;
630
631 comp->Action = msi_get_component_action( package, comp );
632 if (comp->Action != INSTALLSTATE_ABSENT)
633 {
634 TRACE("component not scheduled for removal %s\n", debugstr_w(comp->Component));
635 continue;
636 }
637 TRACE("unpublishing %s\n", debugstr_w(comp->Component));
638
639 win32 = assembly->attributes & msidbAssemblyAttributesWin32;
640 if (assembly->application)
641 {
642 MSIFILE *file = msi_get_loaded_file( package, assembly->application );
643 if (!file)
644 {
645 WARN("no matching file %s for local assembly\n", debugstr_w(assembly->application));
646 continue;
647 }
648 if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath )))
649 WARN( "failed to delete local assembly key %ld\n", res );
650 }
651 else
652 {
653 HKEY hkey;
654 if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
655 WARN( "failed to delete global assembly key %ld\n", res );
656 else
657 {
658 if ((res = RegDeleteValueW( hkey, assembly->display_name )))
659 WARN( "failed to delete global assembly value %ld\n", res );
660 RegCloseKey( hkey );
661 }
662 }
663
664 uirow = MSI_CreateRecord( 2 );
665 MSI_RecordSetStringW( uirow, 2, assembly->display_name );
667 msiobj_release( &uirow->hdr );
668 }
669 return ERROR_SUCCESS;
670}
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2330
static LONG delete_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename)
Definition: assembly.c:502
@ INSTALLSTATE_ABSENT
Definition: msi.h:45

◆ ACTION_PatchFiles()

UINT ACTION_PatchFiles ( MSIPACKAGE package)

Definition at line 776 of file files.c.

777{
778 MSIFILEPATCH *patch;
780 UINT rc = ERROR_SUCCESS;
781
782 TRACE("%p\n", package);
783
784 if (package->script == SCRIPT_NONE)
785 return msi_schedule_action(package, SCRIPT_INSTALL, L"PatchFiles");
786
787 mi = calloc( 1, sizeof(MSIMEDIAINFO) );
788
789 TRACE("extracting files\n");
790
792 {
793 MSIFILE *file = patch->File;
794 MSICOMPONENT *comp = file->Component;
795
796 rc = msi_load_media_info( package, patch->Sequence, mi );
797 if (rc != ERROR_SUCCESS)
798 {
799 ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
801 goto done;
802 }
803 comp->Action = msi_get_component_action( package, comp );
804 if (!comp->Enabled || comp->Action != INSTALLSTATE_LOCAL) continue;
805
806 if (!patch->extracted)
807 {
809 MSIFILEPATCH *cursor = patch;
810
811 rc = ready_media( package, TRUE, mi );
812 if (rc != ERROR_SUCCESS)
813 {
814 ERR("Failed to ready media for %s\n", debugstr_w(file->File));
815 goto done;
816 }
817 data.mi = mi;
818 data.package = package;
819 data.cb = patchfiles_cb;
820 data.user = &cursor;
821
822 if (!msi_cabextract( package, mi, &data ))
823 {
824 ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
826 goto done;
827 }
828 }
829 }
830
831 TRACE("applying patches\n");
832
834 {
835 MSICOMPONENT *comp = patch->File->Component;
836
837 if (msi_is_global_assembly( comp ) || !patch->path) continue;
838
839 rc = patch_file( package, patch );
840 if (rc && !(patch->Attributes & msidbPatchAttributesNonVital))
841 {
842 ERR("Failed to apply patch to file: %s\n", debugstr_w(patch->File->File));
843 break;
844 }
845 }
846
847done:
849 return rc;
850}
static UINT patch_file(MSIPACKAGE *package, MSIFILEPATCH *patch)
Definition: files.c:704
static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:670
@ msidbPatchAttributesNonVital
Definition: msidefs.h:43
MSIFILE * File
Definition: msipriv.h:626
BOOL extracted
Definition: msipriv.h:630
WCHAR * path
Definition: msipriv.h:632
LPWSTR File
Definition: msipriv.h:606
MSICOMPONENT * Component
Definition: msipriv.h:607
struct list filepatches
Definition: msipriv.h:404

◆ ACTION_PerformAction()

UINT ACTION_PerformAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 7640 of file action.c.

7641{
7642 UINT rc;
7643
7644 TRACE("Performing action (%s)\n", debugstr_w(action));
7645
7646 package->action_progress_increment = 0;
7647 rc = ACTION_HandleStandardAction(package, action);
7648
7649 if (rc == ERROR_FUNCTION_NOT_CALLED)
7650 rc = ACTION_HandleCustomAction(package, action);
7651
7652 if (rc == ERROR_FUNCTION_NOT_CALLED)
7653 WARN("unhandled msi action %s\n", debugstr_w(action));
7654
7655 return rc;
7656}
static UINT ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:7597
static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:512
UINT action_progress_increment
Definition: msipriv.h:413

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

◆ ACTION_RegisterClassInfo()

UINT ACTION_RegisterClassInfo ( MSIPACKAGE package)

Definition at line 690 of file classes.c.

691{
693 MSIRECORD *uirow;
694 HKEY hkey, hkey2, hkey3;
695 MSICLASS *cls;
696 UINT r;
697
698 if (package->script == SCRIPT_NONE)
699 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterClassInfo" );
700
701 r = load_classes_and_such( package );
702 if (r != ERROR_SUCCESS)
703 return r;
704
705 if (package->platform == PLATFORM_INTEL)
707 else
709
710 if (RegCreateKeyExW( HKEY_CLASSES_ROOT, L"CLSID", 0, NULL, 0, access, NULL, &hkey, NULL ))
712
713 LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
714 {
715 MSICOMPONENT *comp;
716 MSIFILE *file;
717 DWORD size;
718 LPWSTR argument;
720
721 comp = cls->Component;
722 if ( !comp )
723 continue;
724
725 if (!comp->Enabled)
726 {
727 TRACE("component is disabled\n");
728 continue;
729 }
730
731 feature = cls->Feature;
732 if (!feature)
733 continue;
734
735 feature->Action = msi_get_feature_action( package, feature );
736 if (feature->Action != INSTALLSTATE_LOCAL &&
738 {
739 TRACE("feature %s not scheduled for installation, skipping registration of class %s\n",
740 debugstr_w(feature->Feature), debugstr_w(cls->clsid));
741 continue;
742 }
743
744 if (!comp->KeyPath || !(file = msi_get_loaded_file( package, comp->KeyPath )))
745 {
746 TRACE("COM server not provided, skipping class %s\n", debugstr_w(cls->clsid));
747 continue;
748 }
749 TRACE("Registering class %s (%p)\n", debugstr_w(cls->clsid), cls);
750
752
753 RegCreateKeyW( hkey, cls->clsid, &hkey2 );
754
755 if (cls->Description)
756 msi_reg_set_val_str( hkey2, NULL, cls->Description );
757
758 RegCreateKeyW( hkey2, cls->Context, &hkey3 );
759
760 /*
761 * FIXME: Implement install on demand (advertised components).
762 *
763 * ole32.dll should call msi.MsiProvideComponentFromDescriptor()
764 * when it needs an InProcServer that doesn't exist.
765 * The component advertise string should be in the "InProcServer" value.
766 */
767 size = lstrlenW( file->TargetPath )+1;
768 if (cls->Argument)
769 size += lstrlenW(cls->Argument)+1;
770
771 argument = malloc( size * sizeof(WCHAR) );
772 lstrcpyW( argument, file->TargetPath );
773
774 if (cls->Argument)
775 {
776 lstrcatW( argument, L" " );
777 lstrcatW( argument, cls->Argument );
778 }
779
780 msi_reg_set_val_str( hkey3, NULL, argument );
781 free(argument);
782
783 RegCloseKey(hkey3);
784
785 if (cls->ProgID || cls->ProgIDText)
786 {
788
789 if (cls->ProgID)
790 progid = cls->ProgID->ProgID;
791 else
792 progid = cls->ProgIDText;
793
794 msi_reg_set_subkey_val( hkey2, L"ProgID", NULL, progid );
795
796 if (cls->ProgID && cls->ProgID->VersionInd)
797 {
798 msi_reg_set_subkey_val( hkey2, L"VersionIndependentProgID", NULL,
799 cls->ProgID->VersionInd->ProgID );
800 }
801 }
802
803 if (cls->AppID)
804 {
805 MSIAPPID *appid = cls->AppID;
806 msi_reg_set_val_str( hkey2, L"AppID", appid->AppID );
808 }
809
810 if (cls->IconPath)
811 msi_reg_set_subkey_val( hkey2, L"DefaultIcon", NULL, cls->IconPath );
812
813 if (cls->DefInprocHandler)
814 msi_reg_set_subkey_val( hkey2, L"InprocHandler", NULL, cls->DefInprocHandler );
815
816 if (cls->DefInprocHandler32)
817 msi_reg_set_subkey_val( hkey2, L"InprocHandler32", NULL, cls->DefInprocHandler32 );
818 RegCloseKey(hkey2);
819
820 /* if there is a FileTypeMask, register the FileType */
821 if (cls->FileTypeMask)
822 {
823 LPWSTR ptr, ptr2;
824 LPWSTR keyname;
825 INT index = 0;
826 ptr = cls->FileTypeMask;
827 while (ptr && *ptr)
828 {
829 ptr2 = wcschr(ptr,';');
830 if (ptr2)
831 *ptr2 = 0;
832 keyname = malloc( sizeof(L"FileType\\%s\\%d") + (wcslen(cls->clsid) + 3) * sizeof(WCHAR) );
833 swprintf( keyname, lstrlenW(L"FileType\\%s\\%d") + lstrlenW(cls->clsid) + 4,
834 L"FileType\\%s\\%d", cls->clsid, index );
835
837 free( keyname );
838
839 if (ptr2)
840 ptr = ptr2+1;
841 else
842 ptr = NULL;
843
844 index ++;
845 }
846 }
847
848 uirow = MSI_CreateRecord(1);
849 MSI_RecordSetStringW( uirow, 1, cls->clsid );
851 msiobj_release(&uirow->hdr);
852 }
853 RegCloseKey(hkey);
854 return ERROR_SUCCESS;
855}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
#define wcschr
Definition: compat.h:17
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
INSTALLSTATE msi_get_feature_action(MSIPACKAGE *package, MSIFEATURE *feature)
Definition: action.c:625
#define progid(str)
Definition: exdisp.idl:31
GLuint index
Definition: glext.h:6031
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
char * appid
Definition: mkisofs.c:161
INTERNETFEATURELIST feature
Definition: misc.c:1719
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:631
static UINT register_appid(const MSIAPPID *appid, LPCWSTR app)
Definition: classes.c:659
@ INSTALLSTATE_ADVERTISED
Definition: msi.h:44
LONG msi_reg_set_subkey_val(HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val)
Definition: registry.c:230
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
LPWSTR clsid
Definition: msipriv.h:652
LPWSTR IconPath
Definition: msipriv.h:660
LPWSTR Argument
Definition: msipriv.h:663
LPWSTR ProgIDText
Definition: msipriv.h:656
INSTALLSTATE action
Definition: msipriv.h:667
LPWSTR DefInprocHandler
Definition: msipriv.h:661
MSIAPPID * AppID
Definition: msipriv.h:658
LPWSTR FileTypeMask
Definition: msipriv.h:659
LPWSTR Description
Definition: msipriv.h:657
LPWSTR DefInprocHandler32
Definition: msipriv.h:662
LPWSTR Context
Definition: msipriv.h:653
MSICOMPONENT * Component
Definition: msipriv.h:654
MSIFEATURE * Feature
Definition: msipriv.h:664
MSIPROGID * ProgID
Definition: msipriv.h:655
LPWSTR KeyPath
Definition: msipriv.h:529
struct list classes
Definition: msipriv.h:426
enum platform platform
Definition: msipriv.h:396
LPWSTR ProgID
Definition: msipriv.h:689
MSIPROGID * VersionInd
Definition: msipriv.h:696
int32_t INT
Definition: typedefs.h:58
ACCESS_MASK REGSAM
Definition: winreg.h:69
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define KEY_WOW64_32KEY
Definition: cmtypes.h:45
#define KEY_WOW64_64KEY
Definition: cmtypes.h:46
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

◆ ACTION_RegisterExtensionInfo()

UINT ACTION_RegisterExtensionInfo ( MSIPACKAGE package)

Definition at line 1196 of file classes.c.

1197{
1198 HKEY hkey = NULL;
1200 MSIRECORD *uirow;
1201 BOOL install_on_demand = TRUE;
1202 LONG res;
1203 UINT r;
1204
1205 if (package->script == SCRIPT_NONE)
1206 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterExtensionInfo" );
1207
1208 r = load_classes_and_such( package );
1209 if (r != ERROR_SUCCESS)
1210 return r;
1211
1212 /* We need to set install_on_demand based on if the shell handles advertised
1213 * shortcuts and the like. Because Mike McCormack is working on this i am
1214 * going to default to TRUE
1215 */
1216
1218 {
1219 LPWSTR extension;
1221
1222 if (!ext->Component)
1223 continue;
1224
1225 if (!ext->Component->Enabled)
1226 {
1227 TRACE("component is disabled\n");
1228 continue;
1229 }
1230
1231 feature = ext->Feature;
1232 if (!feature)
1233 continue;
1234
1235 /*
1236 * yes. MSDN says that these are based on _Feature_ not on
1237 * Component. So verify the feature is to be installed
1238 */
1239 feature->Action = msi_get_feature_action( package, feature );
1240 if (feature->Action != INSTALLSTATE_LOCAL &&
1241 !(install_on_demand && feature->Action == INSTALLSTATE_ADVERTISED))
1242 {
1243 TRACE("feature %s not scheduled for installation, skipping registration of extension %s\n",
1244 debugstr_w(feature->Feature), debugstr_w(ext->Extension));
1245 continue;
1246 }
1247 TRACE("Registering extension %s (%p)\n", debugstr_w(ext->Extension), ext);
1248
1249 ext->action = INSTALLSTATE_LOCAL;
1250
1251 extension = malloc( (wcslen( ext->Extension ) + 2) * sizeof(WCHAR) );
1252 if (extension)
1253 {
1254 extension[0] = '.';
1255 lstrcpyW( extension + 1, ext->Extension );
1256 res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey );
1257 free( extension );
1258 if (res != ERROR_SUCCESS)
1259 WARN("failed to create extension key %ld\n", res);
1260 }
1261
1262 if (ext->Mime)
1263 msi_reg_set_val_str( hkey, L"Content Type", ext->Mime->ContentType );
1264
1265 if (ext->ProgID || ext->ProgIDText)
1266 {
1267 HKEY hkey2;
1268 LPWSTR newkey;
1270 MSIVERB *verb;
1271 INT Sequence = MSI_NULL_INTEGER;
1272
1273 if (ext->ProgID)
1274 progid = ext->ProgID->ProgID;
1275 else
1276 progid = ext->ProgIDText;
1277
1279
1280 newkey = malloc( wcslen(progid) * sizeof(WCHAR) + sizeof(L"\\ShellNew") );
1281
1282 lstrcpyW(newkey, progid);
1283 lstrcatW(newkey, L"\\ShellNew");
1284 RegCreateKeyW(hkey, newkey, &hkey2);
1285 RegCloseKey(hkey2);
1286
1287 free(newkey);
1288
1289 /* do all the verbs */
1290 LIST_FOR_EACH_ENTRY( verb, &ext->verbs, MSIVERB, entry )
1291 {
1292 register_verb( package, progid, ext->Component,
1293 ext, verb, &Sequence);
1294 }
1295 }
1296
1297 RegCloseKey(hkey);
1298
1299 uirow = MSI_CreateRecord(1);
1300 MSI_RecordSetStringW( uirow, 1, ext->Extension );
1302 msiobj_release(&uirow->hdr);
1303 }
1304 return ERROR_SUCCESS;
1305}
static const WCHAR *const ext[]
Definition: module.c:53
static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid, MSICOMPONENT *component, const MSIEXTENSION *extension, MSIVERB *verb, INT *Sequence)
Definition: classes.c:1124
#define MSI_NULL_INTEGER
Definition: msiquery.h:32
struct list extensions
Definition: msipriv.h:427

◆ ACTION_RegisterFonts()

UINT ACTION_RegisterFonts ( MSIPACKAGE package)

Definition at line 279 of file font.c.

280{
281 MSIQUERY *view;
282 UINT rc;
283
284 if (package->script == SCRIPT_NONE)
285 return msi_schedule_action(package, SCRIPT_INSTALL, L"RegisterFonts");
286
287 rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Font`", &view);
288 if (rc != ERROR_SUCCESS)
289 return ERROR_SUCCESS;
290
292 msiobj_release(&view->hdr);
293 return rc;
294}
static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
Definition: font.c:215

◆ ACTION_RegisterMIMEInfo()

UINT ACTION_RegisterMIMEInfo ( MSIPACKAGE package)

Definition at line 1392 of file classes.c.

1393{
1394 MSIRECORD *uirow;
1395 MSIMIME *mt;
1396 UINT r;
1397
1398 if (package->script == SCRIPT_NONE)
1399 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterMIMEInfo" );
1400
1401 r = load_classes_and_such( package );
1402 if (r != ERROR_SUCCESS)
1403 return r;
1404
1405 LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
1406 {
1407 LPWSTR extension = NULL, key;
1408
1409 /*
1410 * check if the MIME is to be installed. Either as requested by an
1411 * extension or Class
1412 */
1413 if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) &&
1414 (!mt->Extension || mt->Extension->action != INSTALLSTATE_LOCAL))
1415 {
1416 TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType));
1417 continue;
1418 }
1419
1420 TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType));
1421
1422 if (mt->Extension) extension = malloc( (wcslen( mt->Extension->Extension ) + 2) * sizeof(WCHAR) );
1423 key = malloc( sizeof( L"MIME\\Database\\Content Type\\" ) +
1424 wcslen( mt->ContentType ) * sizeof(WCHAR) );
1425
1426 if (extension && key)
1427 {
1428 extension[0] = '.';
1429 lstrcpyW( extension + 1, mt->Extension->Extension );
1430
1431 lstrcpyW( key, L"MIME\\Database\\Content Type\\" );
1432 lstrcatW( key, mt->ContentType );
1433 msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, L"Extension", extension );
1434
1435 if (mt->clsid)
1437 }
1438 free( extension );
1439 free( key );
1440
1441 uirow = MSI_CreateRecord( 2 );
1442 MSI_RecordSetStringW( uirow, 1, mt->ContentType );
1443 MSI_RecordSetStringW( uirow, 2, mt->suffix );
1445 msiobj_release( &uirow->hdr );
1446 }
1447 return ERROR_SUCCESS;
1448}
Definition: copy.c:22
INSTALLSTATE action
Definition: msipriv.h:682
LPWSTR Extension
Definition: msipriv.h:675
MSIEXTENSION * Extension
Definition: msipriv.h:712
LPWSTR ContentType
Definition: msipriv.h:711
LPWSTR clsid
Definition: msipriv.h:714
MSICLASS * Class
Definition: msipriv.h:715
LPWSTR suffix
Definition: msipriv.h:713
struct list mimes
Definition: msipriv.h:429

◆ ACTION_RegisterProgIdInfo()

UINT ACTION_RegisterProgIdInfo ( MSIPACKAGE package)

Definition at line 1026 of file classes.c.

1027{
1029 MSIRECORD *uirow;
1030 UINT r;
1031
1032 if (package->script == SCRIPT_NONE)
1033 return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterProgIdInfo" );
1034
1035 r = load_classes_and_such( package );
1036 if (r != ERROR_SUCCESS)
1037 return r;
1038
1040 {
1042 {
1043 TRACE("progid %s not scheduled to be installed\n", debugstr_w(progid->ProgID));
1044 continue;
1045 }
1046 TRACE("Registering progid %s\n", debugstr_w(progid->ProgID));
1047
1049
1050 uirow = MSI_CreateRecord( 1 );
1051 MSI_RecordSetStringW( uirow, 1, progid->ProgID );
1053 msiobj_release( &uirow->hdr );
1054 }
1055 return ERROR_SUCCESS;
1056}
static BOOL has_class_installed(const MSIPROGID *progid)
Definition: classes.c:1008
static BOOL has_one_extension_installed(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1015
static UINT register_progid(const MSIPROGID *progid)
Definition: classes.c:964
struct list progids
Definition: msipriv.h:428

◆ ACTION_RemoveDuplicateFiles()

UINT ACTION_RemoveDuplicateFiles ( MSIPACKAGE package)

Definition at line 1390 of file files.c.

1391{
1392 MSIQUERY *view;
1393 UINT rc;
1394
1395 if (package->script == SCRIPT_NONE)
1396 return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveDuplicateFiles");
1397
1398 rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `DuplicateFile`", &view );
1399 if (rc != ERROR_SUCCESS)
1400 return ERROR_SUCCESS;
1401
1403 msiobj_release( &view->hdr );
1404 return rc;
1405}
static UINT ITERATE_RemoveDuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1332

◆ ACTION_RemoveFiles()

UINT ACTION_RemoveFiles ( MSIPACKAGE package)

Definition at line 1528 of file files.c.

1529{
1530 MSIQUERY *view;
1531 MSICOMPONENT *comp;
1532 MSIFILE *file;
1533 UINT r;
1534
1535 if (package->script == SCRIPT_NONE)
1536 return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveFiles");
1537
1538 r = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `RemoveFile`", &view);
1539 if (r == ERROR_SUCCESS)
1540 {
1542 msiobj_release(&view->hdr);
1543 if (r != ERROR_SUCCESS)
1544 return r;
1545 }
1546
1548 {
1549 MSIRECORD *uirow;
1550 VS_FIXEDFILEINFO *ver;
1551
1552 comp = file->Component;
1553 file_update_ui( package, file, L"RemoveFiles" );
1554
1555 comp->Action = msi_get_component_action( package, comp );
1557 continue;
1558
1559 if (comp->assembly && !comp->assembly->application)
1560 continue;
1561
1563 {
1564 TRACE("permanent component, not removing file\n");
1565 continue;
1566 }
1567
1568 if (file->Version)
1569 {
1570 ver = msi_get_disk_file_version( package, file->TargetPath );
1571 if (ver && msi_compare_file_versions( ver, file->Version ) > 0)
1572 {
1573 TRACE("newer version detected, not removing file\n");
1574 free( ver );
1575 continue;
1576 }
1577 free( ver );
1578 }
1579
1580 if (file->state == msifs_installed)
1581 WARN("removing installed file %s\n", debugstr_w(file->TargetPath));
1582
1583 TRACE("removing %s\n", debugstr_w(file->File) );
1584
1585 msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL );
1586 if (!msi_delete_file( package, file->TargetPath ))
1587 {
1588 WARN( "failed to delete %s (%lu)\n", debugstr_w(file->TargetPath), GetLastError() );
1589 }
1590 file->state = msifs_missing;
1591
1592 uirow = MSI_CreateRecord( 9 );
1593 MSI_RecordSetStringW( uirow, 1, file->FileName );
1594 MSI_RecordSetStringW( uirow, 9, comp->Directory );
1596 msiobj_release( &uirow->hdr );
1597 }
1598
1600 {
1601 comp->Action = msi_get_component_action( package, comp );
1602 if (comp->Action != INSTALLSTATE_ABSENT) continue;
1603
1605 {
1606 TRACE("permanent component, not removing directory\n");
1607 continue;
1608 }
1609 if (comp->assembly && !comp->assembly->application)
1610 msi_uninstall_assembly( package, comp );
1611 else
1612 {
1613 MSIFOLDER *folder = msi_get_loaded_folder( package, comp->Directory );
1614 if (folder) remove_folder( folder );
1615 }
1616 }
1617 return ERROR_SUCCESS;
1618}
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
int msi_compare_file_versions(VS_FIXEDFILEINFO *fi, const WCHAR *version)
Definition: action.c:1929
MSIFOLDER * msi_get_loaded_folder(MSIPACKAGE *package, const WCHAR *dir)
Definition: action.c:583
BOOL msi_set_file_attributes(MSIPACKAGE *package, const WCHAR *filename, DWORD attrs)
Definition: files.c:106
BOOL msi_delete_file(MSIPACKAGE *package, const WCHAR *filename)
Definition: files.c:79
VS_FIXEDFILEINFO * msi_get_disk_file_version(MSIPACKAGE *package, const WCHAR *filename)
Definition: files.c:170
static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1431
static void remove_folder(MSIFOLDER *folder)
Definition: files.c:1514
UINT msi_uninstall_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:402
@ INSTALLSTATE_SOURCE
Definition: msi.h:47
@ msidbComponentAttributesPermanent
Definition: msidefs.h:164
Definition: fci.c:116
LPWSTR application
Definition: msipriv.h:514
INSTALLSTATE Installed
Definition: msipriv.h:530
LPWSTR Directory
Definition: msipriv.h:526
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ ACTION_ShowDialog()

INT ACTION_ShowDialog ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_UnregisterClassInfo()

UINT ACTION_UnregisterClassInfo ( MSIPACKAGE package)

Definition at line 857 of file classes.c.

858{
860 MSIRECORD *uirow;
861 MSICLASS *cls;
862 HKEY hkey, hkey2;
863 UINT r;
864
865 if (package->script == SCRIPT_NONE)
866 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterClassInfo" );
867
868 r = load_classes_and_such( package );
869 if (r != ERROR_SUCCESS)
870 return r;
871
872 if (package->platform == PLATFORM_INTEL)
874 else
876
877 if (RegCreateKeyExW( HKEY_CLASSES_ROOT, L"CLSID", 0, NULL, 0, access, NULL, &hkey, NULL ))
879
880 LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
881 {
883 MSICOMPONENT *comp;
885 LONG res;
886
887 comp = cls->Component;
888 if (!comp)
889 continue;
890
891 if (!comp->Enabled)
892 {
893 TRACE("component is disabled\n");
894 continue;
895 }
896
897 feature = cls->Feature;
898 if (!feature)
899 continue;
900
901 feature->Action = msi_get_feature_action( package, feature );
902 if (feature->Action != INSTALLSTATE_ABSENT)
903 {
904 TRACE("feature %s not scheduled for removal, skipping unregistration of class %s\n",
905 debugstr_w(feature->Feature), debugstr_w(cls->clsid));
906 continue;
907 }
908 TRACE("Unregistering class %s (%p)\n", debugstr_w(cls->clsid), cls);
909
911
912 res = RegDeleteTreeW( hkey, cls->clsid );
913 if (res != ERROR_SUCCESS)
914 WARN("failed to delete class key %ld\n", res);
915
916 if (cls->AppID)
917 {
918 res = RegOpenKeyW( HKEY_CLASSES_ROOT, L"AppID", &hkey2 );
919 if (res == ERROR_SUCCESS)
920 {
921 res = RegDeleteKeyW( hkey2, cls->AppID->AppID );
922 if (res != ERROR_SUCCESS)
923 WARN("failed to delete appid key %ld\n", res);
924 RegCloseKey( hkey2 );
925 }
926 }
927 if (cls->FileTypeMask)
928 {
929 filetype = malloc( sizeof( L"FileType\\" ) + wcslen( cls->clsid ) * sizeof(WCHAR) );
930 if (filetype)
931 {
932 lstrcpyW( filetype, L"FileType\\" );
933 lstrcatW( filetype, cls->clsid );
935 free( filetype );
936
937 if (res != ERROR_SUCCESS)
938 WARN("failed to delete file type %ld\n", res);
939 }
940 }
941
942 uirow = MSI_CreateRecord( 1 );
943 MSI_RecordSetStringW( uirow, 1, cls->clsid );
945 msiobj_release( &uirow->hdr );
946 }
947 RegCloseKey( hkey );
948 return ERROR_SUCCESS;
949}
LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1239
LOCAL char * filetype(int t)
Definition: tree.c:114
LPWSTR AppID
Definition: msipriv.h:638

◆ ACTION_UnregisterExtensionInfo()

UINT ACTION_UnregisterExtensionInfo ( MSIPACKAGE package)

Definition at line 1307 of file classes.c.

1308{
1310 MSIRECORD *uirow;
1311 LONG res;
1312 UINT r;
1313
1314 if (package->script == SCRIPT_NONE)
1315 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterExtensionInfo" );
1316
1317 r = load_classes_and_such( package );
1318 if (r != ERROR_SUCCESS)
1319 return r;
1320
1322 {
1323 LPWSTR extension;
1325
1326 if (!ext->Component)
1327 continue;
1328
1329 if (!ext->Component->Enabled)
1330 {
1331 TRACE("component is disabled\n");
1332 continue;
1333 }
1334
1335 feature = ext->Feature;
1336 if (!feature)
1337 continue;
1338
1339 feature->Action = msi_get_feature_action( package, feature );
1340 if (feature->Action != INSTALLSTATE_ABSENT)
1341 {
1342 TRACE("feature %s not scheduled for removal, skipping unregistration of extension %s\n",
1343 debugstr_w(feature->Feature), debugstr_w(ext->Extension));
1344 continue;
1345 }
1346 TRACE("Unregistering extension %s\n", debugstr_w(ext->Extension));
1347
1348 ext->action = INSTALLSTATE_ABSENT;
1349
1350 extension = malloc( (wcslen( ext->Extension ) + 2) * sizeof(WCHAR) );
1351 if (extension)
1352 {
1353 extension[0] = '.';
1354 lstrcpyW( extension + 1, ext->Extension );
1355 res = RegDeleteTreeW( HKEY_CLASSES_ROOT, extension );
1356 free( extension );
1357 if (res != ERROR_SUCCESS)
1358 WARN("failed to delete extension key %ld\n", res);
1359 }
1360
1361 if (ext->ProgID || ext->ProgIDText)
1362 {
1364 LPWSTR progid_shell;
1365
1366 if (ext->ProgID)
1367 progid = ext->ProgID->ProgID;
1368 else
1369 progid = ext->ProgIDText;
1370
1371 progid_shell = malloc( wcslen( progid ) * sizeof(WCHAR) + sizeof( L"\\shell" ) );
1372 if (progid_shell)
1373 {
1374 lstrcpyW( progid_shell, progid );
1375 lstrcatW( progid_shell, L"\\shell" );
1376 res = RegDeleteTreeW( HKEY_CLASSES_ROOT, progid_shell );
1377 free( progid_shell );
1378 if (res != ERROR_SUCCESS)
1379 WARN("failed to delete shell key %ld\n", res);
1381 }
1382 }
1383
1384 uirow = MSI_CreateRecord( 1 );
1385 MSI_RecordSetStringW( uirow, 1, ext->Extension );
1387 msiobj_release( &uirow->hdr );
1388 }
1389 return ERROR_SUCCESS;
1390}

◆ ACTION_UnregisterFonts()

UINT ACTION_UnregisterFonts ( MSIPACKAGE package)

Definition at line 360 of file font.c.

361{
362 MSIQUERY *view;
363 UINT r;
364
365 if (package->script == SCRIPT_NONE)
366 return msi_schedule_action(package, SCRIPT_INSTALL, L"UnregisterFonts");
367
368 r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `Font`", &view );
369 if (r != ERROR_SUCCESS)
370 return ERROR_SUCCESS;
371
373 msiobj_release( &view->hdr );
374 return r;
375}
static UINT ITERATE_UnregisterFonts(MSIRECORD *row, LPVOID param)
Definition: font.c:296

◆ ACTION_UnregisterMIMEInfo()

UINT ACTION_UnregisterMIMEInfo ( MSIPACKAGE package)

Definition at line 1450 of file classes.c.

1451{
1452 MSIRECORD *uirow;
1453 MSIMIME *mime;
1454 UINT r;
1455
1456 if (package->script == SCRIPT_NONE)
1457 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterMIMEInfo" );
1458
1459 r = load_classes_and_such( package );
1460 if (r != ERROR_SUCCESS)
1461 return r;
1462
1464 {
1465 LONG res;
1466 LPWSTR mime_key;
1467
1468 if ((!mime->Class || mime->Class->action != INSTALLSTATE_ABSENT) &&
1469 (!mime->Extension || mime->Extension->action != INSTALLSTATE_ABSENT))
1470 {
1471 TRACE("MIME %s not scheduled to be removed\n", debugstr_w(mime->ContentType));
1472 continue;
1473 }
1474
1475 TRACE("Unregistering MIME type %s\n", debugstr_w(mime->ContentType));
1476
1477 mime_key = malloc( sizeof( L"MIME\\Database\\Content Type\\" ) +
1478 wcslen( mime->ContentType ) * sizeof(WCHAR) );
1479 if (mime_key)
1480 {
1481 lstrcpyW( mime_key, L"MIME\\Database\\Content Type\\" );
1482 lstrcatW( mime_key, mime->ContentType );
1483 res = RegDeleteKeyW( HKEY_CLASSES_ROOT, mime_key );
1484 if (res != ERROR_SUCCESS)
1485 WARN("failed to delete MIME key %ld\n", res);
1486 free( mime_key );
1487 }
1488
1489 uirow = MSI_CreateRecord( 2 );
1490 MSI_RecordSetStringW( uirow, 1, mime->ContentType );
1491 MSI_RecordSetStringW( uirow, 2, mime->suffix );
1493 msiobj_release( &uirow->hdr );
1494 }
1495 return ERROR_SUCCESS;
1496}
const WCHAR * mime
Definition: mimefilter.c:512

◆ ACTION_UnregisterProgIdInfo()

UINT ACTION_UnregisterProgIdInfo ( MSIPACKAGE package)

Definition at line 1088 of file classes.c.

1089{
1091 MSIRECORD *uirow;
1092 LONG res;
1093 UINT r;
1094
1095 if (package->script == SCRIPT_NONE)
1096 return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterProgIdInfo" );
1097
1098 r = load_classes_and_such( package );
1099 if (r != ERROR_SUCCESS)
1100 return r;
1101
1103 {
1104 if (!has_class_removed( progid ) ||
1105 (has_extensions( package, progid ) && !has_all_extensions_removed( package, progid )))
1106 {
1107 TRACE("progid %s not scheduled to be removed\n", debugstr_w(progid->ProgID));
1108 continue;
1109 }
1110 TRACE("Unregistering progid %s\n", debugstr_w(progid->ProgID));
1111
1113 if (res != ERROR_SUCCESS)
1114 TRACE("failed to delete progid key %ld\n", res);
1115
1116 uirow = MSI_CreateRecord( 1 );
1117 MSI_RecordSetStringW( uirow, 1, progid->ProgID );
1119 msiobj_release( &uirow->hdr );
1120 }
1121 return ERROR_SUCCESS;
1122}
static BOOL has_extensions(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1065
static BOOL has_all_extensions_removed(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1075
static BOOL has_class_removed(const MSIPROGID *progid)
Definition: classes.c:1058

◆ ACTION_UpdateComponentStates()

void ACTION_UpdateComponentStates ( MSIPACKAGE package,
MSIFEATURE feature 
)

Definition at line 833 of file install.c.

834{
835 INSTALLSTATE newstate;
836 ComponentList *cl;
837
838 newstate = feature->ActionRequest;
839 if (newstate == INSTALLSTATE_ABSENT) newstate = INSTALLSTATE_UNKNOWN;
840
842 {
843 MSICOMPONENT *component = cl->component;
844
845 if (!component->Enabled) continue;
846
847 TRACE("Modifying (%d): Component %s (Installed %d, Action %d, Request %d)\n",
848 newstate, debugstr_w(component->Component), component->Installed,
849 component->Action, component->ActionRequest);
850
851 if (newstate == INSTALLSTATE_LOCAL)
852 {
853 component->Action = INSTALLSTATE_LOCAL;
855 }
856 else
857 {
858 ComponentList *clist;
859 MSIFEATURE *f;
860
861 component->hasLocalFeature = FALSE;
862
863 component->Action = newstate;
864 component->ActionRequest = newstate;
865 /* if any other feature wants it local we need to set it local */
867 {
868 if ( f->ActionRequest != INSTALLSTATE_LOCAL &&
869 f->ActionRequest != INSTALLSTATE_SOURCE )
870 {
871 continue;
872 }
873 LIST_FOR_EACH_ENTRY(clist, &f->Components, ComponentList, entry)
874 {
875 if (clist->component == component &&
876 (f->ActionRequest == INSTALLSTATE_LOCAL ||
877 f->ActionRequest == INSTALLSTATE_SOURCE))
878 {
879 TRACE("Saved by %s\n", debugstr_w(f->Feature));
880 component->hasLocalFeature = TRUE;
881
883 {
884 if (f->Attributes & msidbFeatureAttributesFavorSource)
885 {
886 component->Action = INSTALLSTATE_SOURCE;
888 }
889 else
890 {
891 component->Action = INSTALLSTATE_LOCAL;
893 }
894 }
896 {
897 component->Action = INSTALLSTATE_SOURCE;
899 }
900 else
901 {
902 component->Action = INSTALLSTATE_LOCAL;
904 }
905 }
906 }
907 }
908 }
909 TRACE("Result (%d): Component %s (Installed %d, Action %d, Request %d)\n",
910 newstate, debugstr_w(component->Component), component->Installed,
911 component->Action, component->ActionRequest);
912 }
913}
GLfloat f
Definition: glext.h:7540
#define f
Definition: ke_i.h:83
@ INSTALLSTATE_UNKNOWN
Definition: msi.h:42
@ msidbComponentAttributesOptional
Definition: msidefs.h:161
@ msidbComponentAttributesSourceOnly
Definition: msidefs.h:160
@ msidbFeatureAttributesFavorSource
Definition: msidefs.h:149
MSICOMPONENT * component
Definition: msipriv.h:554
unsigned int hasLocalFeature
Definition: msipriv.h:545
INSTALLSTATE ActionRequest
Definition: msipriv.h:531
struct list features
Definition: msipriv.h:402
int INSTALLSTATE
Definition: winemsi.idl:31

Referenced by MSI_SetFeatureStateW(), and seltree_update_feature_installstate().

◆ alloc_msi_remote_handle()

MSIHANDLE alloc_msi_remote_handle ( MSIHANDLE  remote)

Definition at line 135 of file handle.c.

136{
137 struct handle_info *entry;
139
141
143 if (ret)
144 {
145 entry = &handle_table[ ret - 1 ];
146 entry->u.rem = remote;
147 entry->dwThreadId = GetCurrentThreadId();
148 entry->remote = TRUE;
149 }
150
152
153 TRACE( "%lu -> %lu\n", remote, ret );
154
155 return ret;
156}
static MSIHANDLE alloc_handle_table_entry(void)
Definition: handle.c:80
static CRITICAL_SECTION handle_cs
Definition: handle.c:38
BOOL remote
Definition: handle.c:60
int ret
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
unsigned long MSIHANDLE
Definition: winemsi.idl:27

Referenced by __wine_msi_call_dll_function(), MsiDatabaseOpenViewW(), MsiGetActiveDatabase(), and MsiGetSummaryInformationW().

◆ alloc_msihandle()

MSIHANDLE alloc_msihandle ( MSIOBJECTHDR obj)

Definition at line 111 of file handle.c.

112{
113 struct handle_info *entry;
115
117
119 if (ret)
120 {
121 entry = &handle_table[ ret - 1 ];
123 entry->u.obj = obj;
124 entry->dwThreadId = GetCurrentThreadId();
125 entry->remote = FALSE;
126 }
127
129
130 TRACE( "%p -> %lu\n", obj, ret );
131
132 return ret;
133}
void msiobj_addref(MSIOBJECTHDR *info)
Definition: handle.c:217
MSIOBJECTHDR * obj
Definition: handle.c:62

Referenced by ACTION_CallScript(), MSI_ProcessMessageVerbatim(), MsiCreateRecord(), MsiDatabaseGetPrimaryKeysW(), MsiDatabaseOpenViewW(), MsiEnableUIPreview(), MsiGetActiveDatabase(), MsiGetSummaryInformationW(), MsiOpenDatabaseW(), MsiOpenPackageExW(), MsiOpenProductW(), MsiViewFetch(), MsiViewGetColumnInfo(), and s_remote_GetActionInfo().

◆ alloc_msiobject()

void * alloc_msiobject ( UINT  type,
UINT  size,
msihandledestructor  destroy 
)

Definition at line 201 of file handle.c.

202{
204
205 info = calloc( 1, size );
206 if( info )
207 {
208 info->magic = MSIHANDLE_MAGIC;
209 info->type = type;
210 info->refcount = 1;
211 info->destructor = destroy;
212 }
213
214 return info;
215}
void destroy(_Tp *__pointer)
Definition: _construct.h:278
#define MSIHANDLE_MAGIC
Definition: msipriv.h:736

Referenced by create_suminfo(), MSI_CreateRecord(), MSI_DatabaseOpenViewW(), MSI_EnableUIPreview(), and MSI_OpenDatabaseW().

◆ append_storage_to_db()

void append_storage_to_db ( MSIDATABASE db,
IStorage stg 
)

Definition at line 76 of file database.c.

77{
79
80 t = malloc( sizeof *t );
81 t->stg = stg;
82 IStorage_AddRef( stg );
83 list_add_head( &db->transforms, &t->entry );
84}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
GLdouble GLdouble t
Definition: gl.h:2047
struct list transforms
Definition: msipriv.h:119

Referenced by msi_table_apply_transform().

◆ call_script()

DWORD call_script ( MSIHANDLE  hPackage,
INT  type,
LPCWSTR  script,
LPCWSTR  function,
LPCWSTR  action 
)

Definition at line 289 of file script.c.

290{
291 HRESULT hr;
292 IActiveScript *pActiveScript = NULL;
293 IActiveScriptParse *pActiveScriptParse = NULL;
294 struct script_site *scriptsite;
295 IDispatch *pDispatch = NULL;
296 DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
297 DISPID dispid;
298 CLSID clsid;
299 VARIANT var;
301
303
304 /* Create MsiActiveScriptSite object */
305 hr = create_activescriptsite(&scriptsite);
306 if (hr != S_OK) goto done;
307
308 /* Create an installer object */
309 hr = create_msiserver(NULL, (void**)&scriptsite->installer);
310 if (hr != S_OK) goto done;
311
312 /* Create a session object */
313 hr = create_session(hPackage, scriptsite->installer, &scriptsite->session);
314 if (hr != S_OK) goto done;
315
316 /* Create the scripting engine */
319 hr = CLSIDFromProgID(L"JScript", &clsid);
321 hr = CLSIDFromProgID(L"VBScript", &clsid);
322 else {
323 ERR("Unknown script type %d\n", type);
324 goto done;
325 }
326 if (FAILED(hr)) {
327 ERR("Could not find CLSID for Windows Script\n");
328 goto done;
329 }
330 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IActiveScript, (void **)&pActiveScript);
331 if (FAILED(hr)) {
332 ERR("Could not instantiate class for Windows Script\n");
333 goto done;
334 }
335
336 hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (void **)&pActiveScriptParse);
337 if (FAILED(hr)) goto done;
338
339 hr = IActiveScript_SetScriptSite(pActiveScript, &scriptsite->IActiveScriptSite_iface);
340 if (FAILED(hr)) goto done;
341
342 hr = IActiveScriptParse_InitNew(pActiveScriptParse);
343 if (FAILED(hr)) goto done;
344
345 hr = IActiveScript_AddNamedItem(pActiveScript, L"Session", SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE);
346 if (FAILED(hr)) goto done;
347
348 hr = IActiveScriptParse_ParseScriptText(pActiveScriptParse, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL);
349 if (FAILED(hr)) goto done;
350
351 hr = IActiveScript_SetScriptState(pActiveScript, SCRIPTSTATE_CONNECTED);
352 if (FAILED(hr)) goto done;
353
354 /* Call a function if necessary through the IDispatch interface */
355 if (function && function[0]) {
356 TRACE("Calling function %s\n", debugstr_w(function));
357
358 hr = IActiveScript_GetScriptDispatch(pActiveScript, NULL, &pDispatch);
359 if (FAILED(hr)) goto done;
360
361 hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, (WCHAR **)&function, 1,LOCALE_USER_DEFAULT, &dispid);
362 if (FAILED(hr)) goto done;
363
364 hr = IDispatch_Invoke(pDispatch, dispid, &IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &dispparamsNoArgs, &var, NULL, NULL);
365 if (FAILED(hr)) goto done;
366
367 hr = VariantChangeType(&var, &var, 0, VT_I4);
368 if (FAILED(hr)) goto done;
369
371
373 } else {
374 /* If no function to be called, MSI behavior is to succeed */
376 }
377
378done:
379
380 if (pDispatch) IDispatch_Release(pDispatch);
381 if (pActiveScript) IActiveScript_Release(pActiveScript);
382 if (pActiveScriptParse) IActiveScriptParse_Release(pActiveScriptParse);
383 if (scriptsite)
384 {
385 if (scriptsite->session) IDispatch_Release(scriptsite->session);
386 if (scriptsite->installer) IDispatch_Release(scriptsite->installer);
387 IActiveScriptSite_Release(&scriptsite->IActiveScriptSite_iface);
388 }
389 CoUninitialize(); /* must call even if CoInitialize failed */
390 return ret;
391}
@ SCRIPTSTATE_CONNECTED
Definition: activscp.idl:59
@ VT_I4
Definition: compat.h:2298
#define IActiveScriptParse_ParseScriptText
Definition: script.c:41
HRESULT create_session(MSIHANDLE msiHandle, IDispatch *installer, IDispatch **disp)
Definition: automation.c:2442
HRESULT create_msiserver(IUnknown *outer, void **ppObj)
Definition: automation.c:2423
#define IActiveScriptParse_InitNew
Definition: script.c:47
#define IActiveScriptParse_Release
Definition: script.c:46
static HRESULT create_activescriptsite(struct script_site **obj)
Definition: script.c:250
static UINT map_return_value(LONG val)
Definition: script.c:272
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
Definition: compobj.c:2602
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
const char * var
Definition: shader.c:5666
static VARIANTARG static DISPID
Definition: ordinal.c:52
REFCLSID clsid
Definition: msctf.c:82
@ msidbCustomActionTypeJScript
Definition: msidefs.h:119
@ msidbCustomActionTypeVBScript
Definition: msidefs.h:120
script
Definition: msipriv.h:383
struct stdole::DISPPARAMS DISPPARAMS
#define LOCALE_USER_DEFAULT
#define DISPATCH_METHOD
Definition: oleauto.h:1006
#define V_I4(A)
Definition: oleauto.h:247
#define IID_NULL
Definition: guiddef.h:98
HRESULT hr
Definition: shlfolder.c:183
IDispatch * session
Definition: script.c:59
IActiveScriptSite IActiveScriptSite_iface
Definition: script.c:57
IDispatch * installer
Definition: script.c:58
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648

Referenced by ACTION_CallScript().

◆ copy_remote_record()

UINT copy_remote_record ( const struct wire_record rec,
MSIHANDLE  handle 
)

Definition at line 1052 of file record.c.

1053{
1054 MSIRECORD *rec;
1055 unsigned int i;
1057
1059 return ERROR_INVALID_HANDLE;
1060
1061 rec->cookie = in->cookie;
1062 for (i = 0; i <= in->count; i++)
1063 {
1064 switch (in->fields[i].type)
1065 {
1066 case MSIFIELD_NULL:
1067 MSI_FreeField(&rec->fields[i]);
1068 rec->fields[i].type = MSIFIELD_NULL;
1069 break;
1070 case MSIFIELD_INT:
1071 r = MSI_RecordSetInteger(rec, i, in->fields[i].u.iVal);
1072 break;
1073 case MSIFIELD_WSTR:
1074 r = MSI_RecordSetStringW(rec, i, in->fields[i].u.szwVal);
1075 break;
1076 case MSIFIELD_STREAM:
1077 r = MSI_RecordSetIStream(rec, i, in->fields[i].u.stream);
1078 break;
1079 default:
1080 ERR("invalid field type %d\n", in->fields[i].type);
1081 break;
1082 }
1083
1084 if (r)
1085 {
1086 msiobj_release(&rec->hdr);
1087 return r;
1088 }
1089 }
1090
1091 msiobj_release(&rec->hdr);
1092 return ERROR_SUCCESS;
1093}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
Definition: handle.c:158
UINT MSI_RecordSetStringW(MSIRECORD *rec, UINT iField, LPCWSTR szValue)
Definition: record.c:597
#define MSIFIELD_STREAM
Definition: record.c:47
UINT MSI_RecordSetInteger(MSIRECORD *rec, UINT iField, int iVal)
Definition: record.c:280
#define MSIFIELD_INT
Definition: record.c:45
#define MSIFIELD_WSTR
Definition: record.c:46
UINT MSI_RecordSetIStream(MSIRECORD *rec, UINT iField, IStream *stm)
Definition: record.c:836
#define MSIFIELD_NULL
Definition: record.c:44
static void MSI_FreeField(MSIFIELD *field)
Definition: record.c:49
GLuint in
Definition: glext.h:9616
#define MSIHANDLETYPE_RECORD
Definition: msipriv.h:725
static FILE * out
Definition: regtests2xml.c:44
UINT type
Definition: msipriv.h:139
MSIFIELD fields[1]
Definition: msipriv.h:154
UINT64 cookie
Definition: msipriv.h:153

Referenced by MsiViewModify(), and unmarshal_record().

◆ cost_from_size()

static int cost_from_size ( int  size)
inlinestatic

Definition at line 1198 of file msipriv.h.

1199{
1200 /* Cost is size rounded up to the nearest 4096 bytes,
1201 * expressed in units of 512 bytes. */
1202 return ((size + 4095) & ~4095) / 512;
1203}

Referenced by calculate_file_cost(), and MsiEnumComponentCostsW().

◆ create_msiserver()

HRESULT create_msiserver ( IUnknown pOuter,
LPVOID ppObj 
)

◆ create_session()

HRESULT create_session ( MSIHANDLE  msiHandle,
IDispatch pInstaller,
IDispatch **  pDispatch 
)

Definition at line 2442 of file automation.c.

2443{
2444 struct session_object *session;
2445
2446 session = malloc(sizeof(*session));
2447 if (!session) return E_OUTOFMEMORY;
2448
2449 init_automation_object(&session->autoobj, msiHandle, Session_tid);
2450
2451 session->installer = installer;
2452 *disp = &session->autoobj.IDispatch_iface;
2453
2454 return S_OK;
2455}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static void init_automation_object(struct automation_object *This, MSIHANDLE msiHandle, tid_t tid)
Definition: automation.c:545
IDispatch * installer
Definition: automation.c:179

Referenced by call_script(), and InstallerImpl_OpenPackage().

◆ custom_stop_server()

void custom_stop_server ( HANDLE  process,
HANDLE  pipe 
)

Definition at line 682 of file custom.c.

683{
684 DWORD size;
685
686 WriteFile(pipe, &GUID_NULL, sizeof(GUID_NULL), &size, NULL);
689 CloseHandle(pipe);
690}
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define INFINITE
Definition: serial.h:102
#define GUID_NULL
Definition: ks.h:106
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82

Referenced by MSI_FreePackage().

◆ decode_base85_guid()

BOOL decode_base85_guid ( LPCWSTR  str,
GUID guid 
)

Definition at line 132 of file registry.c.

133{
134 DWORD i, val = 0, base = 1, *p;
135
136 if (!str)
137 return FALSE;
138
139 p = (DWORD*) guid;
140 for( i=0; i<20; i++ )
141 {
142 if( (i%5) == 0 )
143 {
144 val = 0;
145 base = 1;
146 }
147 val += table_dec85[str[i]] * base;
148 if( str[i] >= 0x80 )
149 return FALSE;
150 if( table_dec85[str[i]] == 0xff )
151 return FALSE;
152 if( (i%5) == 4 )
153 p[i/5] = val;
154 base *= 85;
155 }
156 return TRUE;
157}
static const unsigned char table_dec85[0x80]
Definition: registry.c:110
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat GLfloat p
Definition: glext.h:8902
const WCHAR * str

Referenced by MSI_ProvideQualifiedComponentEx(), MsiDecomposeDescriptorW(), and query_feature_state().

◆ decode_streamname()

BOOL decode_streamname ( LPCWSTR  in,
LPWSTR  out 
)

Definition at line 180 of file table.c.

181{
182 WCHAR ch;
183 DWORD count = 0;
184
185 while ( (ch = *in++) )
186 {
187 if( (ch >= 0x3800 ) && (ch < 0x4840 ) )
188 {
189 if( ch >= 0x4800 )
190 ch = mime2utf(ch-0x4800);
191 else
192 {
193 ch -= 0x3800;
194 *out++ = mime2utf(ch&0x3f);
195 count++;
196 ch = mime2utf((ch>>6)&0x3f);
197 }
198 }
199 *out++ = ch;
200 count++;
201 }
202 *out = 0;
203 return count;
204}
static int mime2utf(int x)
Definition: table.c:167
GLuint GLuint GLsizei count
Definition: gl.h:1545

Referenced by enum_stream_names(), load_streams(), and msi_table_apply_transform().

◆ deformat_string()

DWORD deformat_string ( MSIPACKAGE package,
LPCWSTR  ptr,
WCHAR **  data 
)

◆ dump_record()

void dump_record ( MSIRECORD rec)

Definition at line 1028 of file record.c.

1029{
1030 int i;
1031 if (!rec)
1032 {
1033 TRACE("(null)\n");
1034 return;
1035 }
1036
1037 TRACE("[");
1038 for (i = 0; i <= rec->count; i++)
1039 {
1040 switch(rec->fields[i].type)
1041 {
1042 case MSIFIELD_NULL: TRACE("(null)"); break;
1043 case MSIFIELD_INT: TRACE("%d", rec->fields[i].u.iVal); break;
1044 case MSIFIELD_WSTR: TRACE("%s", debu