ReactOS  0.4.12-dev-409-g9f418243
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 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   30000
 
#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 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 tagMSICOLUMNHASHENTRYMSIITERHANDLE
 
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_UNKNOWN, PLATFORM_INTEL, PLATFORM_INTEL64, PLATFORM_X64,
  PLATFORM_ARM
}
 
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  StringPersistence { StringPersistent = 0, StringNonPersistent = 1 }
 
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, 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 *) DECLSPEC_HIDDEN
 
HRESULT create_msi_custom_remote (IUnknown *pOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT create_msi_remote_package (IUnknown *pOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT create_msi_remote_database (IUnknown *pOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
IUnknownmsi_get_remote (MSIHANDLE handle) DECLSPEC_HIDDEN
 
voidmsihandle2msiinfo (MSIHANDLE handle, UINT type) DECLSPEC_HIDDEN
 
MSIHANDLE alloc_msihandle (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
MSIHANDLE alloc_msi_remote_handle (IUnknown *unk) DECLSPEC_HIDDEN
 
voidalloc_msiobject (UINT type, UINT size, msihandledestructor destroy) DECLSPEC_HIDDEN
 
void msiobj_addref (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
int msiobj_release (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
void msiobj_lock (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
void msiobj_unlock (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
void msi_free_handle_table (void) DECLSPEC_HIDDEN
 
void free_cached_tables (MSIDATABASE *db) DECLSPEC_HIDDEN
 
UINT MSI_CommitTables (MSIDATABASE *db) DECLSPEC_HIDDEN
 
UINT msi_commit_streams (MSIDATABASE *db) DECLSPEC_HIDDEN
 
BOOL msi_add_string (string_table *st, const WCHAR *data, int len, enum StringPersistence persistence) DECLSPEC_HIDDEN
 
UINT msi_string2id (const string_table *st, const WCHAR *data, int len, UINT *id) DECLSPEC_HIDDEN
 
VOID msi_destroy_stringtable (string_table *st) DECLSPEC_HIDDEN
 
const WCHARmsi_string_lookup (const string_table *st, UINT id, int *len) DECLSPEC_HIDDEN
 
HRESULT msi_init_string_table (IStorage *stg) DECLSPEC_HIDDEN
 
string_tablemsi_load_string_table (IStorage *stg, UINT *bytes_per_strref) DECLSPEC_HIDDEN
 
UINT msi_save_string_table (const string_table *st, IStorage *storage, UINT *bytes_per_strref) DECLSPEC_HIDDEN
 
UINT msi_get_string_table_codepage (const string_table *st) DECLSPEC_HIDDEN
 
UINT msi_set_string_table_codepage (string_table *st, UINT codepage) DECLSPEC_HIDDEN
 
WCHARmsi_strdupW (const WCHAR *value, int len) DECLSPEC_HIDDEN
 
BOOL TABLE_Exists (MSIDATABASE *db, LPCWSTR name) DECLSPEC_HIDDEN
 
MSICONDITION MSI_DatabaseIsTablePersistent (MSIDATABASE *db, LPCWSTR table) DECLSPEC_HIDDEN
 
UINT read_stream_data (IStorage *stg, LPCWSTR stname, BOOL table, BYTE **pdata, UINT *psz) DECLSPEC_HIDDEN
 
UINT write_stream_data (IStorage *stg, LPCWSTR stname, LPCVOID data, UINT sz, BOOL bTable) DECLSPEC_HIDDEN
 
UINT msi_table_apply_transform (MSIDATABASE *db, IStorage *stg) DECLSPEC_HIDDEN
 
UINT MSI_DatabaseApplyTransformW (MSIDATABASE *db, LPCWSTR szTransformFile, int iErrorCond) DECLSPEC_HIDDEN
 
void append_storage_to_db (MSIDATABASE *db, IStorage *stg) DECLSPEC_HIDDEN
 
UINT msi_apply_transforms (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_check_patch_applicable (MSIPACKAGE *package, MSISUMMARYINFO *si) DECLSPEC_HIDDEN
 
UINT msi_apply_patches (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_apply_registered_patch (MSIPACKAGE *package, LPCWSTR patch_code) DECLSPEC_HIDDEN
 
void msi_free_patchinfo (MSIPATCHINFO *patch) DECLSPEC_HIDDEN
 
UINT MSI_InstallPackage (MSIPACKAGE *, LPCWSTR, LPCWSTR) DECLSPEC_HIDDEN
 
INT ACTION_ShowDialog (MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
 
INT ACTION_DialogBox (MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
 
UINT ACTION_ForceReboot (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT MSI_Sequence (MSIPACKAGE *package, LPCWSTR szTable) DECLSPEC_HIDDEN
 
UINT MSI_SetFeatureStates (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_parse_command_line (MSIPACKAGE *package, LPCWSTR szCommandLine, BOOL preserve_case) DECLSPEC_HIDDEN
 
UINT msi_schedule_action (MSIPACKAGE *package, UINT script, const WCHAR *action) DECLSPEC_HIDDEN
 
INSTALLSTATE msi_get_component_action (MSIPACKAGE *package, MSICOMPONENT *comp) DECLSPEC_HIDDEN
 
INSTALLSTATE msi_get_feature_action (MSIPACKAGE *package, MSIFEATURE *feature) DECLSPEC_HIDDEN
 
UINT msi_load_all_components (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_load_all_features (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT msi_validate_product_id (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
void MSI_CloseRecord (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetIStream (MSIRECORD *, UINT, IStream *) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetIStream (MSIRECORD *, UINT, IStream **) DECLSPEC_HIDDEN
 
const WCHARMSI_RecordGetString (const MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
MSIRECORDMSI_CreateRecord (UINT) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetInteger (MSIRECORD *, UINT, int) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetIntPtr (MSIRECORD *, UINT, INT_PTR) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetStringW (MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
 
BOOL MSI_RecordIsNull (MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetStringW (MSIRECORD *, UINT, LPWSTR, LPDWORD) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetStringA (MSIRECORD *, UINT, LPSTR, LPDWORD) DECLSPEC_HIDDEN
 
int MSI_RecordGetInteger (MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
INT_PTR MSI_RecordGetIntPtr (MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
UINT MSI_RecordReadStream (MSIRECORD *, UINT, char *, LPDWORD) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetStream (MSIRECORD *, UINT, IStream *) DECLSPEC_HIDDEN
 
UINT MSI_RecordGetFieldCount (const MSIRECORD *rec) DECLSPEC_HIDDEN
 
UINT MSI_RecordStreamToFile (MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_RecordSetStreamFromFileW (MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_RecordCopyField (MSIRECORD *, UINT, MSIRECORD *, UINT) DECLSPEC_HIDDEN
 
MSIRECORDMSI_CloneRecord (MSIRECORD *) DECLSPEC_HIDDEN
 
BOOL MSI_RecordsAreEqual (MSIRECORD *, MSIRECORD *) DECLSPEC_HIDDEN
 
BOOL MSI_RecordsAreFieldsEqual (MSIRECORD *a, MSIRECORD *b, UINT field) DECLSPEC_HIDDEN
 
UINT msi_record_set_string (MSIRECORD *, UINT, const WCHAR *, int) DECLSPEC_HIDDEN
 
const WCHARmsi_record_get_string (const MSIRECORD *, UINT, int *) DECLSPEC_HIDDEN
 
void dump_record (MSIRECORD *) DECLSPEC_HIDDEN
 
void enum_stream_names (IStorage *stg) DECLSPEC_HIDDEN
 
LPWSTR encode_streamname (BOOL bTable, LPCWSTR in) DECLSPEC_HIDDEN
 
BOOL decode_streamname (LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
 
UINT msi_get_stream (MSIDATABASE *, const WCHAR *, IStream **) DECLSPEC_HIDDEN
 
UINT MSI_OpenDatabaseW (LPCWSTR, LPCWSTR, MSIDATABASE **) DECLSPEC_HIDDEN
 
UINT MSI_DatabaseOpenViewW (MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
 
UINT MSI_OpenQuery (MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
 
UINT MSI_IterateRecords (MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
 
MSIRECORDMSI_QueryGetRecord (MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
 
UINT MSI_DatabaseGetPrimaryKeys (MSIDATABASE *, LPCWSTR, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_ViewExecute (MSIQUERY *, MSIRECORD *) DECLSPEC_HIDDEN
 
UINT MSI_ViewFetch (MSIQUERY *, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_ViewClose (MSIQUERY *) DECLSPEC_HIDDEN
 
UINT MSI_ViewGetColumnInfo (MSIQUERY *, MSICOLINFO, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_ViewModify (MSIQUERY *, MSIMODIFY, MSIRECORD *) DECLSPEC_HIDDEN
 
UINT VIEW_find_column (MSIVIEW *, LPCWSTR, LPCWSTR, UINT *) DECLSPEC_HIDDEN
 
UINT msi_view_get_row (MSIDATABASE *, MSIVIEW *, UINT, MSIRECORD **) DECLSPEC_HIDDEN
 
UINT MSI_SetInstallLevel (MSIPACKAGE *package, int iInstallLevel) DECLSPEC_HIDDEN
 
MSIPACKAGEMSI_CreatePackage (MSIDATABASE *, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_OpenPackageW (LPCWSTR szPackage, MSIPACKAGE **pPackage) DECLSPEC_HIDDEN
 
UINT MSI_SetTargetPathW (MSIPACKAGE *, LPCWSTR, LPCWSTR) DECLSPEC_HIDDEN
 
INT MSI_ProcessMessageVerbatim (MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
 
INT MSI_ProcessMessage (MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
 
MSICONDITION MSI_EvaluateConditionW (MSIPACKAGE *, LPCWSTR) DECLSPEC_HIDDEN
 
UINT MSI_GetComponentStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE *) DECLSPEC_HIDDEN
 
UINT MSI_GetFeatureStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE *, INSTALLSTATE *) DECLSPEC_HIDDEN
 
UINT MSI_SetFeatureStateW (MSIPACKAGE *, LPCWSTR, INSTALLSTATE) DECLSPEC_HIDDEN
 
UINT msi_download_file (LPCWSTR szUrl, LPWSTR filename) DECLSPEC_HIDDEN
 
UINT msi_package_add_info (MSIPACKAGE *, DWORD, DWORD, LPCWSTR, LPWSTR) DECLSPEC_HIDDEN
 
UINT msi_package_add_media_disk (MSIPACKAGE *, DWORD, DWORD, DWORD, LPWSTR, LPWSTR) DECLSPEC_HIDDEN
 
UINT msi_clone_properties (MSIDATABASE *) DECLSPEC_HIDDEN
 
UINT msi_set_context (MSIPACKAGE *) DECLSPEC_HIDDEN
 
void msi_adjust_privilege_properties (MSIPACKAGE *) DECLSPEC_HIDDEN
 
UINT MSI_GetFeatureCost (MSIPACKAGE *, MSIFEATURE *, MSICOSTTREE, INSTALLSTATE, LPINT) DECLSPEC_HIDDEN
 
UINT MSI_FormatRecordW (MSIPACKAGE *, MSIRECORD *, LPWSTR, LPDWORD) DECLSPEC_HIDDEN
 
BOOL unsquash_guid (LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
 
BOOL squash_guid (LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
 
BOOL encode_base85_guid (GUID *, LPWSTR) DECLSPEC_HIDDEN
 
BOOL decode_base85_guid (LPCWSTR, GUID *) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUninstallKey (const WCHAR *, enum platform, HKEY *, BOOL) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUninstallKey (const WCHAR *, enum platform) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenProductKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenFeaturesKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserPatchesKey (LPCWSTR szPatch, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataFeaturesKey (LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserComponentsKey (LPCWSTR szComponent, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataComponentKey (LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenPatchesKey (LPCWSTR szPatch, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataProductKey (LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataPatchKey (LPCWSTR szPatch, MSIINSTALLCONTEXT dwContext, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserDataProductPatchesKey (LPCWSTR product, MSIINSTALLCONTEXT context, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenInstallProps (LPCWSTR szProduct, MSIINSTALLCONTEXT dwContext, LPCWSTR szUserSid, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUpgradeCodesKey (LPCWSTR szProduct, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenUserUpgradeCodesKey (LPCWSTR szProduct, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteProductKey (LPCWSTR szProduct) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserProductKey (LPCWSTR szProduct) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserDataPatchKey (LPCWSTR patch, MSIINSTALLCONTEXT context) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserDataProductKey (LPCWSTR, MSIINSTALLCONTEXT) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserFeaturesKey (LPCWSTR szProduct) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserDataComponentKey (LPCWSTR szComponent, LPCWSTR szUserSid) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUserUpgradeCodesKey (LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteUpgradeCodesKey (const WCHAR *) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteClassesUpgradeCodesKey (LPCWSTR szUpgradeCode) DECLSPEC_HIDDEN
 
UINT MSIREG_OpenClassesUpgradeCodesKey (LPCWSTR szUpgradeCode, HKEY *key, BOOL create) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteLocalClassesProductKey (LPCWSTR szProductCode) DECLSPEC_HIDDEN
 
UINT MSIREG_DeleteLocalClassesFeaturesKey (LPCWSTR szProductCode) DECLSPEC_HIDDEN
 
UINT msi_locate_product (LPCWSTR szProduct, MSIINSTALLCONTEXT *context) DECLSPEC_HIDDEN
 
LPWSTR msi_reg_get_val_str (HKEY hkey, LPCWSTR name) DECLSPEC_HIDDEN
 
BOOL msi_reg_get_val_dword (HKEY hkey, LPCWSTR name, DWORD *val) DECLSPEC_HIDDEN
 
DWORD msi_version_str_to_dword (LPCWSTR p) DECLSPEC_HIDDEN
 
void msi_parse_version_string (LPCWSTR, PDWORD, PDWORD) DECLSPEC_HIDDEN
 
VS_FIXEDFILEINFOmsi_get_disk_file_version (LPCWSTR) DECLSPEC_HIDDEN
 
int msi_compare_file_versions (VS_FIXEDFILEINFO *, const WCHAR *) DECLSPEC_HIDDEN
 
int msi_compare_font_versions (const WCHAR *, const WCHAR *) DECLSPEC_HIDDEN
 
DWORD msi_get_disk_file_size (LPCWSTR) DECLSPEC_HIDDEN
 
BOOL msi_file_hash_matches (MSIFILE *) DECLSPEC_HIDDEN
 
UINT msi_get_filehash (const WCHAR *, MSIFILEHASHINFO *) DECLSPEC_HIDDEN
 
LONG msi_reg_set_val_str (HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
 
LONG msi_reg_set_val_multi_str (HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
 
LONG msi_reg_set_val_dword (HKEY hkey, LPCWSTR name, DWORD val) DECLSPEC_HIDDEN
 
LONG msi_reg_set_subkey_val (HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val) DECLSPEC_HIDDEN
 
void msi_dialog_check_messages (HANDLE) DECLSPEC_HIDDEN
 
void msi_dialog_destroy (msi_dialog *) DECLSPEC_HIDDEN
 
void msi_dialog_unregister_class (void) DECLSPEC_HIDDEN
 
UINT msi_get_suminfo (IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **si) DECLSPEC_HIDDEN
 
UINT msi_get_db_suminfo (MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **si) DECLSPEC_HIDDEN
 
LPWSTR msi_suminfo_dup_string (MSISUMMARYINFO *si, UINT uiProperty) DECLSPEC_HIDDEN
 
INT msi_suminfo_get_int32 (MSISUMMARYINFO *si, UINT uiProperty) DECLSPEC_HIDDEN
 
LPWSTR msi_get_suminfo_product (IStorage *stg) DECLSPEC_HIDDEN
 
UINT msi_add_suminfo (MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns) DECLSPEC_HIDDEN
 
UINT msi_export_suminfo (MSIDATABASE *db, HANDLE handle) DECLSPEC_HIDDEN
 
UINT msi_load_suminfo_properties (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
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, UINT script) DECLSPEC_HIDDEN
 
void ACTION_FinishCustomActions (const MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_CustomAction (MSIPACKAGE *, const WCHAR *, UINT) DECLSPEC_HIDDEN
 
UINT ACTION_AppSearch (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_CCPSearch (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_FindRelatedProducts (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_InstallFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_PatchFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RemoveFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_MoveFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_DuplicateFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RemoveDuplicateFiles (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterClassInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterProgIdInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterExtensionInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterMIMEInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_RegisterFonts (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterClassInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterExtensionInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterFonts (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterMIMEInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_UnregisterProgIdInfo (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_MsiPublishAssemblies (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_MsiUnpublishAssemblies (MSIPACKAGE *package) DECLSPEC_HIDDEN
 
DWORD deformat_string (MSIPACKAGE *package, LPCWSTR ptr, WCHAR **data) DECLSPEC_HIDDEN
 
WCHARmsi_dup_record_field (MSIRECORD *row, INT index) DECLSPEC_HIDDEN
 
LPWSTR msi_dup_property (MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
 
UINT msi_set_property (MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
 
UINT msi_get_property (MSIDATABASE *, LPCWSTR, LPWSTR, LPDWORD) DECLSPEC_HIDDEN
 
int msi_get_property_int (MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
 
WCHARmsi_resolve_source_folder (MSIPACKAGE *package, const WCHAR *name, MSIFOLDER **folder) DECLSPEC_HIDDEN
 
void msi_resolve_target_folder (MSIPACKAGE *package, const WCHAR *name, BOOL load_prop) DECLSPEC_HIDDEN
 
WCHARmsi_normalize_path (const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_resolve_file_source (MSIPACKAGE *package, MSIFILE *file) DECLSPEC_HIDDEN
 
const WCHARmsi_get_target_folder (MSIPACKAGE *package, const WCHAR *name) DECLSPEC_HIDDEN
 
void msi_reset_folders (MSIPACKAGE *package, BOOL source) DECLSPEC_HIDDEN
 
MSICOMPONENTmsi_get_loaded_component (MSIPACKAGE *package, const WCHAR *Component) DECLSPEC_HIDDEN
 
MSIFEATUREmsi_get_loaded_feature (MSIPACKAGE *package, const WCHAR *Feature) DECLSPEC_HIDDEN
 
MSIFILEmsi_get_loaded_file (MSIPACKAGE *package, const WCHAR *file) DECLSPEC_HIDDEN
 
MSIFOLDERmsi_get_loaded_folder (MSIPACKAGE *package, const WCHAR *dir) DECLSPEC_HIDDEN
 
WCHARmsi_create_temp_file (MSIDATABASE *db) DECLSPEC_HIDDEN
 
void msi_free_action_script (MSIPACKAGE *package, UINT script) DECLSPEC_HIDDEN
 
WCHARmsi_build_icon_path (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_build_directory_name (DWORD,...) DECLSPEC_HIDDEN
 
BOOL msi_create_full_path (const WCHAR *path) DECLSPEC_HIDDEN
 
void msi_reduce_to_long_filename (WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_create_component_advertise_string (MSIPACKAGE *, MSICOMPONENT *, const WCHAR *) DECLSPEC_HIDDEN
 
void ACTION_UpdateComponentStates (MSIPACKAGE *package, MSIFEATURE *feature) DECLSPEC_HIDDEN
 
UINT msi_register_unique_action (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
BOOL msi_action_is_unique (const MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
UINT msi_set_last_used_source (LPCWSTR product, LPCWSTR usersid, MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value) DECLSPEC_HIDDEN
 
UINT msi_create_empty_local_file (LPWSTR path, LPCWSTR suffix) DECLSPEC_HIDDEN
 
UINT msi_set_sourcedir_props (MSIPACKAGE *package, BOOL replace) DECLSPEC_HIDDEN
 
MSIASSEMBLYmsi_load_assembly (MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN
 
UINT msi_install_assembly (MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN
 
UINT msi_uninstall_assembly (MSIPACKAGE *, MSICOMPONENT *) DECLSPEC_HIDDEN
 
BOOL msi_init_assembly_caches (MSIPACKAGE *) DECLSPEC_HIDDEN
 
void msi_destroy_assembly_caches (MSIPACKAGE *) DECLSPEC_HIDDEN
 
BOOL msi_is_global_assembly (MSICOMPONENT *) DECLSPEC_HIDDEN
 
IAssemblyEnummsi_create_assembly_enum (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_get_assembly_path (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_font_version_from_file (const WCHAR *) DECLSPEC_HIDDEN
 
WCHAR ** msi_split_string (const WCHAR *, WCHAR) DECLSPEC_HIDDEN
 
UINT msi_set_original_database_property (MSIDATABASE *, const WCHAR *) DECLSPEC_HIDDEN
 
WCHARmsi_get_error_message (MSIDATABASE *, int) DECLSPEC_HIDDEN
 
UINT ready_media (MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi) DECLSPEC_HIDDEN
 
UINT msi_load_media_info (MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi) DECLSPEC_HIDDEN
 
void msi_free_media_info (MSIMEDIAINFO *mi) DECLSPEC_HIDDEN
 
BOOL msi_cabextract (MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data) DECLSPEC_HIDDEN
 
UINT msi_add_cabinet_stream (MSIPACKAGE *, UINT, IStorage *, const WCHAR *) DECLSPEC_HIDDEN
 
void msi_event_fire (MSIPACKAGE *, const WCHAR *, MSIRECORD *) DECLSPEC_HIDDEN
 
void msi_event_cleanup_all_subscriptions (MSIPACKAGE *) DECLSPEC_HIDDEN
 
HRESULT create_msiserver (IUnknown *pOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT create_session (MSIHANDLE msiHandle, IDispatch *pInstaller, IDispatch **pDispatch) DECLSPEC_HIDDEN
 
HRESULT get_typeinfo (tid_t tid, ITypeInfo **ti) DECLSPEC_HIDDEN
 
void release_typelib (void) DECLSPEC_HIDDEN
 
DWORD call_script (MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action) DECLSPEC_HIDDEN
 
void msi_ui_progress (MSIPACKAGE *, int, int, int, int) DECLSPEC_HIDDEN
 
static voidmsi_alloc (size_t len) __WINE_ALLOC_SIZE(1)
 
static voidmsi_alloc_zero (size_t len) __WINE_ALLOC_SIZE(1)
 
static voidmsi_realloc (void *mem, size_t len) __WINE_ALLOC_SIZE(2)
 
static voidmsi_realloc_zero (void *mem, size_t len) __WINE_ALLOC_SIZE(2)
 
static BOOL msi_free (void *mem)
 
static charstrdupWtoA (LPCWSTR str)
 
static LPWSTR strdupAtoW (LPCSTR str)
 
static LPWSTR strdupW (LPCWSTR src)
 

Variables

static const BOOL is_64bit = sizeof(void *) > sizeof(int)
 
BOOL is_wow64 DECLSPEC_HIDDEN
 
static const WCHAR szSourceDir [] = {'S','o','u','r','c','e','D','i','r',0}
 
static const WCHAR szSOURCEDIR [] = {'S','O','U','R','C','E','D','I','R',0}
 
static const WCHAR szRootDrive [] = {'R','O','O','T','D','R','I','V','E',0}
 
static const WCHAR szTargetDir [] = {'T','A','R','G','E','T','D','I','R',0}
 
static const WCHAR szLocalSid [] = {'S','-','1','-','5','-','1','8',0}
 
static const WCHAR szAllSid [] = {'S','-','1','-','1','-','0',0}
 
static const WCHAR szEmpty [] = {0}
 
static const WCHAR szAll [] = {'A','L','L',0}
 
static const WCHAR szOne [] = {'1',0}
 
static const WCHAR szZero [] = {'0',0}
 
static const WCHAR szSpace [] = {' ',0}
 
static const WCHAR szBackSlash [] = {'\\',0}
 
static const WCHAR szForwardSlash [] = {'/',0}
 
static const WCHAR szDot [] = {'.',0}
 
static const WCHAR szDotDot [] = {'.','.',0}
 
static const WCHAR szSemiColon [] = {';',0}
 
static const WCHAR szPreselected [] = {'P','r','e','s','e','l','e','c','t','e','d',0}
 
static const WCHAR szPatches [] = {'P','a','t','c','h','e','s',0}
 
static const WCHAR szState [] = {'S','t','a','t','e',0}
 
static const WCHAR szMsi [] = {'m','s','i',0}
 
static const WCHAR szPatch [] = {'P','A','T','C','H',0}
 
static const WCHAR szSourceList [] = {'S','o','u','r','c','e','L','i','s','t',0}
 
static const WCHAR szInstalled [] = {'I','n','s','t','a','l','l','e','d',0}
 
static const WCHAR szReinstall [] = {'R','E','I','N','S','T','A','L','L',0}
 
static const WCHAR szReinstallMode [] = {'R','E','I','N','S','T','A','L','L','M','O','D','E',0}
 
static const WCHAR szRemove [] = {'R','E','M','O','V','E',0}
 
static const WCHAR szUserSID [] = {'U','s','e','r','S','I','D',0}
 
static const WCHAR szProductCode [] = {'P','r','o','d','u','c','t','C','o','d','e',0}
 
static const WCHAR szRegisterClassInfo [] = {'R','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0}
 
static const WCHAR szRegisterProgIdInfo [] = {'R','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0}
 
static const WCHAR szRegisterExtensionInfo [] = {'R','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0}
 
static const WCHAR szRegisterMIMEInfo [] = {'R','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}
 
static const WCHAR szDuplicateFiles [] = {'D','u','p','l','i','c','a','t','e','F','i','l','e','s',0}
 
static const WCHAR szRemoveDuplicateFiles [] = {'R','e','m','o','v','e','D','u','p','l','i','c','a','t','e','F','i','l','e','s',0}
 
static const WCHAR szInstallFiles [] = {'I','n','s','t','a','l','l','F','i','l','e','s',0}
 
static const WCHAR szPatchFiles [] = {'P','a','t','c','h','F','i','l','e','s',0}
 
static const WCHAR szRemoveFiles [] = {'R','e','m','o','v','e','F','i','l','e','s',0}
 
static const WCHAR szFindRelatedProducts [] = {'F','i','n','d','R','e','l','a','t','e','d','P','r','o','d','u','c','t','s',0}
 
static const WCHAR szAllUsers [] = {'A','L','L','U','S','E','R','S',0}
 
static const WCHAR szCustomActionData [] = {'C','u','s','t','o','m','A','c','t','i','o','n','D','a','t','a',0}
 
static const WCHAR szUILevel [] = {'U','I','L','e','v','e','l',0}
 
static const WCHAR szProductID [] = {'P','r','o','d','u','c','t','I','D',0}
 
static const WCHAR szPIDTemplate [] = {'P','I','D','T','e','m','p','l','a','t','e',0}
 
static const WCHAR szPIDKEY [] = {'P','I','D','K','E','Y',0}
 
static const WCHAR szTYPELIB [] = {'T','Y','P','E','L','I','B',0}
 
static const WCHAR szSumInfo [] = {5 ,'S','u','m','m','a','r','y','I','n','f','o','r','m','a','t','i','o','n',0}
 
static const WCHAR szHCR [] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T','\\',0}
 
static const WCHAR szHCU [] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','U','S','E','R','\\',0}
 
static const WCHAR szHLM [] = {'H','K','E','Y','_','L','O','C','A','L','_','M','A','C','H','I','N','E','\\',0}
 
static const WCHAR szHU [] = {'H','K','E','Y','_','U','S','E','R','S','\\',0}
 
static const WCHAR szWindowsFolder [] = {'W','i','n','d','o','w','s','F','o','l','d','e','r',0}
 
static const WCHAR szAppSearch [] = {'A','p','p','S','e','a','r','c','h',0}
 
static const WCHAR szMoveFiles [] = {'M','o','v','e','F','i','l','e','s',0}
 
static const WCHAR szCCPSearch [] = {'C','C','P','S','e','a','r','c','h',0}
 
static const WCHAR szUnregisterClassInfo [] = {'U','n','r','e','g','i','s','t','e','r','C','l','a','s','s','I','n','f','o',0}
 
static const WCHAR szUnregisterExtensionInfo [] = {'U','n','r','e','g','i','s','t','e','r','E','x','t','e','n','s','i','o','n','I','n','f','o',0}
 
static const WCHAR szUnregisterMIMEInfo [] = {'U','n','r','e','g','i','s','t','e','r','M','I','M','E','I','n','f','o',0}
 
static const WCHAR szUnregisterProgIdInfo [] = {'U','n','r','e','g','i','s','t','e','r','P','r','o','g','I','d','I','n','f','o',0}
 
static const WCHAR szRegisterFonts [] = {'R','e','g','i','s','t','e','r','F','o','n','t','s',0}
 
static const WCHAR szUnregisterFonts [] = {'U','n','r','e','g','i','s','t','e','r','F','o','n','t','s',0}
 
static const WCHAR szCLSID [] = {'C','L','S','I','D',0}
 
static const WCHAR szProgID [] = {'P','r','o','g','I','D',0}
 
static const WCHAR szVIProgID [] = {'V','e','r','s','i','o','n','I','n','d','e','p','e','n','d','e','n','t','P','r','o','g','I','D',0}
 
static const WCHAR szAppID [] = {'A','p','p','I','D',0}
 
static const WCHAR szDefaultIcon [] = {'D','e','f','a','u','l','t','I','c','o','n',0}
 
static const WCHAR szInprocHandler [] = {'I','n','p','r','o','c','H','a','n','d','l','e','r',0}
 
static const WCHAR szInprocHandler32 [] = {'I','n','p','r','o','c','H','a','n','d','l','e','r','3','2',0}
 
static const WCHAR szMIMEDatabase [] = {'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\','C','o','n','t','e','n','t',' ','T','y','p','e','\\',0}
 
static const WCHAR szLocalPackage [] = {'L','o','c','a','l','P','a','c','k','a','g','e',0}
 
static const WCHAR szOriginalDatabase [] = {'O','r','i','g','i','n','a','l','D','a','t','a','b','a','s','e',0}
 
static const WCHAR szUpgradeCode [] = {'U','p','g','r','a','d','e','C','o','d','e',0}
 
static const WCHAR szAdminUser [] = {'A','d','m','i','n','U','s','e','r',0}
 
static const WCHAR szIntel [] = {'I','n','t','e','l',0}
 
static const WCHAR szIntel64 [] = {'I','n','t','e','l','6','4',0}
 
static const WCHAR szX64 [] = {'x','6','4',0}
 
static const WCHAR szAMD64 [] = {'A','M','D','6','4',0}
 
static const WCHAR szARM [] = {'A','r','m',0}
 
static const WCHAR szWow6432NodeCLSID [] = {'W','o','w','6','4','3','2','N','o','d','e','\\','C','L','S','I','D',0}
 
static const WCHAR szStreams [] = {'_','S','t','r','e','a','m','s',0}
 
static const WCHAR szStorages [] = {'_','S','t','o','r','a','g','e','s',0}
 
static const WCHAR szMsiPublishAssemblies [] = {'M','s','i','P','u','b','l','i','s','h','A','s','s','e','m','b','l','i','e','s',0}
 
static const WCHAR szCostingComplete [] = {'C','o','s','t','i','n','g','C','o','m','p','l','e','t','e',0}
 
static const WCHAR szTempFolder [] = {'T','e','m','p','F','o','l','d','e','r',0}
 
static const WCHAR szDatabase [] = {'D','A','T','A','B','A','S','E',0}
 
static const WCHAR szCRoot [] = {'C',':','\\',0}
 
static const WCHAR szProductLanguage [] = {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0}
 
static const WCHAR szProductVersion [] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0}
 
static const WCHAR szWindowsInstaller [] = {'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0}
 
static const WCHAR szStringData [] = {'_','S','t','r','i','n','g','D','a','t','a',0}
 
static const WCHAR szStringPool [] = {'_','S','t','r','i','n','g','P','o','o','l',0}
 
static const WCHAR szInstallLevel [] = {'I','N','S','T','A','L','L','L','E','V','E','L',0}
 
static const WCHAR szCostInitialize [] = {'C','o','s','t','I','n','i','t','i','a','l','i','z','e',0}
 
static const WCHAR szAppDataFolder [] = {'A','p','p','D','a','t','a','F','o','l','d','e','r',0}
 
static const WCHAR szRollbackDisabled [] = {'R','o','l','l','b','a','c','k','D','i','s','a','b','l','e','d',0}
 
static const WCHAR szName [] = {'N','a','m','e',0}
 
static const WCHAR szData [] = {'D','a','t','a',0}
 
static const WCHAR szLangResource [] = {'\\','V','a','r','F','i','l','e','I','n','f','o','\\','T','r','a','n','s','l','a','t','i','o','n',0}
 
static const WCHAR szInstallLocation [] = {'I','n','s','t','a','l','l','L','o','c','a','t','i','o','n',0}
 
static const WCHAR szProperty [] = {'P','r','o','p','e','r','t','y',0}
 
static const WCHAR szUninstallable [] = {'U','n','i','n','s','t','a','l','l','a','b','l','e',0}
 
static const WCHAR szEXECUTEACTION [] = {'E','X','E','C','U','T','E','A','C','T','I','O','N',0}
 

Macro Definition Documentation

◆ GUID_SIZE

#define GUID_SIZE   39

Definition at line 710 of file msipriv.h.

◆ INSTALLUILEVEL_MASK

#define INSTALLUILEVEL_MASK   0x0007

Definition at line 57 of file msipriv.h.

◆ LONG_STR_BYTES

#define LONG_STR_BYTES   3

Definition at line 54 of file msipriv.h.

◆ MAX_STREAM_NAME_LEN

#define MAX_STREAM_NAME_LEN   62

Definition at line 53 of file msipriv.h.

◆ MSI_BUILDNUMBER

#define MSI_BUILDNUMBER   6001

Definition at line 708 of file msipriv.h.

◆ MSI_DATASIZEMASK

#define MSI_DATASIZEMASK   0x00ff

Definition at line 44 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_DISKID

#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID   30000

Definition at line 81 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_OFFSET

#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET   10000

Definition at line 80 of file msipriv.h.

◆ MSI_MAJORVERSION

#define MSI_MAJORVERSION   4

Definition at line 706 of file msipriv.h.

◆ MSI_MAX_PROPS

#define MSI_MAX_PROPS   20

Definition at line 459 of file msipriv.h.

◆ MSI_MINORVERSION

#define MSI_MINORVERSION   5

Definition at line 707 of file msipriv.h.

◆ MSICABEXTRACT_BEGINEXTRACT

#define MSICABEXTRACT_BEGINEXTRACT   0x01

Definition at line 1054 of file msipriv.h.

◆ MSICABEXTRACT_FILEEXTRACTED

#define MSICABEXTRACT_FILEEXTRACTED   0x02

Definition at line 1055 of file msipriv.h.

◆ MSIHANDLE_MAGIC

#define MSIHANDLE_MAGIC   0x4d434923

Definition at line 713 of file msipriv.h.

◆ MSIHANDLETYPE_ANY

#define MSIHANDLETYPE_ANY   0

Definition at line 698 of file msipriv.h.

◆ MSIHANDLETYPE_DATABASE

#define MSIHANDLETYPE_DATABASE   1

Definition at line 699 of file msipriv.h.

◆ MSIHANDLETYPE_PACKAGE

#define MSIHANDLETYPE_PACKAGE   5

Definition at line 703 of file msipriv.h.

◆ MSIHANDLETYPE_PREVIEW

#define MSIHANDLETYPE_PREVIEW   6

Definition at line 704 of file msipriv.h.

◆ MSIHANDLETYPE_RECORD

#define MSIHANDLETYPE_RECORD   4

Definition at line 702 of file msipriv.h.

◆ MSIHANDLETYPE_SUMMARYINFO

#define MSIHANDLETYPE_SUMMARYINFO   2

Definition at line 700 of file msipriv.h.

◆ MSIHANDLETYPE_VIEW

#define MSIHANDLETYPE_VIEW   3

Definition at line 701 of file msipriv.h.

◆ MSITYPE_IS_BINARY

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

Definition at line 59 of file msipriv.h.

◆ MSITYPE_KEY

#define MSITYPE_KEY   0x2000

Definition at line 49 of file msipriv.h.

◆ MSITYPE_LOCALIZABLE

#define MSITYPE_LOCALIZABLE   0x200

Definition at line 46 of file msipriv.h.

◆ MSITYPE_NULLABLE

#define MSITYPE_NULLABLE   0x1000

Definition at line 48 of file msipriv.h.

◆ MSITYPE_STRING

#define MSITYPE_STRING   0x0800

Definition at line 47 of file msipriv.h.

◆ MSITYPE_TEMPORARY

#define MSITYPE_TEMPORARY   0x4000

Definition at line 50 of file msipriv.h.

◆ MSITYPE_UNKNOWN

#define MSITYPE_UNKNOWN   0x8000

Definition at line 51 of file msipriv.h.

◆ MSITYPE_VALID

#define MSITYPE_VALID   0x0100

Definition at line 45 of file msipriv.h.

◆ SEQUENCE_EXEC

#define SEQUENCE_EXEC   0x2

Definition at line 696 of file msipriv.h.

◆ SEQUENCE_UI

#define SEQUENCE_UI   0x1

Definition at line 695 of file msipriv.h.

◆ SQUASHED_GUID_SIZE

#define SQUASHED_GUID_SIZE   33

Definition at line 711 of file msipriv.h.

Typedef Documentation

◆ column_info

◆ ComponentList

◆ FeatureList

◆ FolderList

◆ msi_dialog

Definition at line 354 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 70 of file msipriv.h.

◆ MSIITERHANDLE

Definition at line 219 of file msipriv.h.

◆ MSIMEDIADISK

◆ MSIMEDIAINFO

◆ MSIMIME

Definition at line 647 of file msipriv.h.

◆ MSIOBJECTHDR

Definition at line 68 of file msipriv.h.

◆ MSIPACKAGE

◆ MSIPATCHINFO

◆ MSIPREVIEW

◆ MSIPROGID

Definition at line 624 of file msipriv.h.

◆ MSIQUERY

◆ MSIRECORD

◆ MSISOURCELISTINFO

◆ MSISTREAM

◆ MSISUMMARYINFO

◆ MSITABLE

Definition at line 62 of file msipriv.h.

◆ MSITRANSFORM

◆ MSIVERB

◆ MSIVIEW

Definition at line 114 of file msipriv.h.

◆ MSIVIEWOPS

◆ PMSICABEXTRACTCB

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

Definition at line 1052 of file msipriv.h.

◆ record_func

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

Definition at line 847 of file msipriv.h.

◆ string_table

Definition at line 65 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 570 of file msipriv.h.

◆ clr_version

Enumerator
CLR_VERSION_V10 
CLR_VERSION_V11 
CLR_VERSION_V20 
CLR_VERSION_V40 
CLR_VERSION_MAX 

Definition at line 365 of file msipriv.h.

◆ folder_state

Enumerator
FOLDER_STATE_UNINITIALIZED 
FOLDER_STATE_EXISTS 
FOLDER_STATE_CREATED 
FOLDER_STATE_CREATED_PERSISTENT 
FOLDER_STATE_REMOVED 

Definition at line 538 of file msipriv.h.

◆ platform

Enumerator
PLATFORM_UNKNOWN 
PLATFORM_INTEL 
PLATFORM_INTEL64 
PLATFORM_X64 
PLATFORM_ARM 

Definition at line 356 of file msipriv.h.

◆ script

Enumerator
SCRIPT_NONE 
SCRIPT_INSTALL 
SCRIPT_COMMIT 
SCRIPT_ROLLBACK 
SCRIPT_MAX 

Definition at line 374 of file msipriv.h.

375 {
376  SCRIPT_NONE = -1,
377  SCRIPT_INSTALL = 0,
378  SCRIPT_COMMIT = 1,
379  SCRIPT_ROLLBACK = 2,
380  SCRIPT_MAX = 3
381 };

◆ StringPersistence

Enumerator
StringPersistent 
StringNonPersistent 

Definition at line 757 of file msipriv.h.

758 {
759  StringPersistent = 0,
761 };

◆ 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 
LAST_tid 
NULL_tid 
IWshCollection_tid 
IWshEnvironment_tid 
IWshExec_tid 
IWshShell3_tid 
IWshShortcut_tid 
LAST_tid 

Definition at line 1077 of file msipriv.h.

1077  {
1078  Database_tid,
1079  Installer_tid,
1080  Record_tid,
1081  Session_tid,
1084  View_tid,
1085  LAST_tid
1086 } tid_t;
tid_t
Definition: msipriv.h:1077

Function Documentation

◆ ACTION_AppSearch()

UINT ACTION_AppSearch ( MSIPACKAGE package)

Definition at line 1126 of file appsearch.c.

1127 {
1128  static const WCHAR query[] = {
1129  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1130  'A','p','p','S','e','a','r','c','h',0};
1131  MSIQUERY *view;
1132  UINT r;
1133 
1134  if (msi_action_is_unique(package, szAppSearch))
1135  {
1136  TRACE("Skipping AppSearch action: already done in UI sequence\n");
1137  return ERROR_SUCCESS;
1138  }
1139  else
1141 
1142  r = MSI_OpenQuery( package->db, &view, query );
1143  if (r != ERROR_SUCCESS)
1144  return ERROR_SUCCESS;
1145 
1147  msiobj_release( &view->hdr );
1148  return r;
1149 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:112
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:143
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static const WCHAR szAppSearch[]
Definition: msipriv.h:1151
static UINT iterate_appsearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1091
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:94

◆ ACTION_CCPSearch()

UINT ACTION_CCPSearch ( MSIPACKAGE package)

Definition at line 1179 of file appsearch.c.

1180 {
1181  static const WCHAR query[] = {
1182  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1183  'C','C','P','S','e','a','r','c','h',0};
1184  MSIQUERY *view;
1185  UINT r;
1186 
1187  if (msi_action_is_unique(package, szCCPSearch))
1188  {
1189  TRACE("Skipping AppSearch action: already done in UI sequence\n");
1190  return ERROR_SUCCESS;
1191  }
1192  else
1194 
1195  r = MSI_OpenQuery(package->db, &view, query);
1196  if (r != ERROR_SUCCESS)
1197  return ERROR_SUCCESS;
1198 
1200  msiobj_release(&view->hdr);
1201  return r;
1202 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:112
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:143
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static const WCHAR szCCPSearch[]
Definition: msipriv.h:1153
static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1151
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:94

◆ ACTION_CustomAction()

UINT ACTION_CustomAction ( MSIPACKAGE ,
const WCHAR ,
UINT   
)

◆ ACTION_DialogBox()

INT ACTION_DialogBox ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_DuplicateFiles()

UINT ACTION_DuplicateFiles ( MSIPACKAGE package)

Definition at line 1127 of file files.c.

1128 {
1129  static const WCHAR query[] = {
1130  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1131  '`','D','u','p','l','i','c','a','t','e','F','i','l','e','`',0};
1132  MSIQUERY *view;
1133  UINT rc;
1134 
1135  rc = MSI_DatabaseOpenViewW(package->db, query, &view);
1136  if (rc != ERROR_SUCCESS)
1137  return ERROR_SUCCESS;
1138 
1140  msiobj_release(&view->hdr);
1141  return rc;
1142 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1064
smooth NULL
Definition: ftsmooth.c:416
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
Definition: msiquery.c:111

◆ ACTION_FindRelatedProducts()

UINT ACTION_FindRelatedProducts ( MSIPACKAGE package)

Definition at line 204 of file upgrade.c.

205 {
206  static const WCHAR query[] = {
207  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
208  '`','U','p','g','r','a','d','e','`',0};
209  MSIQUERY *view;
210  UINT rc;
211 
212  if (msi_get_property_int(package->db, szInstalled, 0))
213  {
214  TRACE("Skipping FindRelatedProducts action: product already installed\n");
215  return ERROR_SUCCESS;
216  }
218  {
219  TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n");
220  return ERROR_SUCCESS;
221  }
222  else
224 
225  rc = MSI_DatabaseOpenViewW(package->db, query, &view);
226  if (rc != ERROR_SUCCESS)
227  return ERROR_SUCCESS;
228 
230  msiobj_release(&view->hdr);
231  return rc;
232 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2392
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:112
static const WCHAR szFindRelatedProducts[]
Definition: msipriv.h:1137
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static IOleDocumentView * view
Definition: activex.c:1749
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
Definition: upgrade.c:102
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
static const WCHAR szInstalled[]
Definition: msipriv.h:1122
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:94
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
Definition: msiquery.c:111

◆ ACTION_FinishCustomActions()

void ACTION_FinishCustomActions ( const MSIPACKAGE package)

Definition at line 1339 of file custom.c.

1340 {
1341  struct list *item;
1342  HANDLE *wait_handles;
1343  unsigned int handle_count, i;
1345 
1346  while ((item = list_head( &package->RunningActions )))
1347  {
1349 
1350  list_remove( &action->entry );
1351 
1352  TRACE("waiting for %s\n", debugstr_w( action->name ) );
1353  msi_dialog_check_messages( action->handle );
1354 
1355  CloseHandle( action->handle );
1356  msi_free( action->name );
1357  msi_free( action );
1358  }
1359 
1361 
1362  handle_count = list_count( &msi_pending_custom_actions );
1363  wait_handles = msi_alloc( handle_count * sizeof(HANDLE) );
1364 
1365  handle_count = 0;
1367  {
1368  if (info->package == package )
1369  {
1370  if (DuplicateHandle(GetCurrentProcess(), info->handle, GetCurrentProcess(), &wait_handles[handle_count], SYNCHRONIZE, FALSE, 0))
1371  handle_count++;
1372  }
1373  }
1374 
1376 
1377  for (i = 0; i < handle_count; i++)
1378  {
1379  msi_dialog_check_messages( wait_handles[i] );
1380  CloseHandle( wait_handles[i] );
1381  }
1382  msi_free( wait_handles );
1383 
1386  {
1387  if (info->package == package) release_custom_action_data( info );
1388  }
1390 }
#define CloseHandle
Definition: compat.h:398
struct list RunningActions
Definition: msipriv.h:422
uint8_t entry
Definition: isohybrid.c:63
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
struct _test_info info[]
Definition: SetCursorPos.c:19
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
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
#define debugstr_w
Definition: kernel32.h:32
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1168
static CRITICAL_SECTION msi_custom_action_cs
Definition: custom.c:59
Definition: _list.h:228
#define SYNCHRONIZE
Definition: nt_native.h:61
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
const WCHAR * action
Definition: action.c:7779
static ATOM item
Definition: dde.c:856
const char cursor[]
Definition: icontest.c:13
static struct list msi_pending_custom_actions
Definition: custom.c:69
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define LIST_ENTRY(type)
Definition: queue.h:175
static void release_custom_action_data(msi_custom_action_info *info)
Definition: custom.c:390
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
void msi_dialog_check_messages(HANDLE handle)
Definition: dialog.c:3972

Referenced by MSI_InstallPackage().

◆ ACTION_ForceReboot()

UINT ACTION_ForceReboot ( MSIPACKAGE package)

Definition at line 5407 of file action.c.

5408 {
5409  static const WCHAR RunOnce[] = {
5410  'S','o','f','t','w','a','r','e','\\',
5411  'M','i','c','r','o','s','o','f','t','\\',
5412  'W','i','n','d','o','w','s','\\',
5413  'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
5414  'R','u','n','O','n','c','e',0};
5415  static const WCHAR InstallRunOnce[] = {
5416  'S','o','f','t','w','a','r','e','\\',
5417  'M','i','c','r','o','s','o','f','t','\\',
5418  'W','i','n','d','o','w','s','\\',
5419  'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
5420  'I','n','s','t','a','l','l','e','r','\\',
5421  'R','u','n','O','n','c','e','E','n','t','r','i','e','s',0};
5422 
5423  static const WCHAR msiexec_fmt[] = {
5424  '%','s',
5425  '\\','M','s','i','E','x','e','c','.','e','x','e',' ','/','@',' ',
5426  '\"','%','s','\"',0};
5427  static const WCHAR install_fmt[] = {
5428  '/','I',' ','\"','%','s','\"',' ',
5429  'A','F','T','E','R','R','E','B','O','O','T','=','1',' ',
5430  'R','U','N','O','N','C','E','E','N','T','R','Y','=','\"','%','s','\"',0};
5431  WCHAR buffer[256], sysdir[MAX_PATH], squashed_pc[SQUASHED_GUID_SIZE];
5432  HKEY hkey;
5433 
5434  squash_guid( package->ProductCode, squashed_pc );
5435 
5436  GetSystemDirectoryW(sysdir, sizeof(sysdir)/sizeof(sysdir[0]));
5437  RegCreateKeyW(HKEY_LOCAL_MACHINE,RunOnce,&hkey);
5438  snprintfW( buffer, sizeof(buffer)/sizeof(buffer[0]), msiexec_fmt, sysdir, squashed_pc );
5439 
5440  msi_reg_set_val_str( hkey, squashed_pc, buffer );
5441  RegCloseKey(hkey);
5442 
5443  TRACE("Reboot command %s\n",debugstr_w(buffer));
5444 
5446  sprintfW( buffer, install_fmt, package->ProductCode, squashed_pc );
5447 
5448  msi_reg_set_val_str( hkey, squashed_pc, buffer );
5449  RegCloseKey(hkey);
5450 
5451  return ERROR_INSTALL_SUSPEND;
5452 }
LPWSTR ProductCode
Definition: msipriv.h:426
#define snprintfW
Definition: unicode.h:60
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLuint buffer
Definition: glext.h:5915
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define debugstr_w
Definition: kernel32.h:32
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:360
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR InstallRunOnce[]
Definition: msiexec.c:51
#define MAX_PATH
Definition: compat.h:26
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1202
#define ERROR_INSTALL_SUSPEND
Definition: winerror.h:962
#define SQUASHED_GUID_SIZE
Definition: msipriv.h:711
#define sprintfW
Definition: unicode.h:58
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2312
BOOL squash_guid(LPCWSTR in, LPWSTR out) DECLSPEC_HIDDEN
Definition: registry.c:225
#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 354 of file files.c.

355 {
356  MSIMEDIAINFO *mi;
357  UINT rc = ERROR_SUCCESS;
358  MSIFILE *file;
359 
360  schedule_install_files(package);
361  mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
362 
363  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
364  {
365  BOOL is_global_assembly = msi_is_global_assembly( file->Component );
366 
368 
369  rc = msi_load_media_info( package, file->Sequence, mi );
370  if (rc != ERROR_SUCCESS)
371  {
372  ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
374  goto done;
375  }
376 
377  if (file->state != msifs_hashmatch &&
378  file->state != msifs_skipped &&
379  (file->state != msifs_present || !msi_get_property_int( package->db, szInstalled, 0 )) &&
380  (rc = ready_media( package, file->IsCompressed, mi )))
381  {
382  ERR("Failed to ready media for %s\n", debugstr_w(file->File));
383  goto done;
384  }
385 
386  if (file->state != msifs_missing && !mi->is_continuous && file->state != msifs_overwrite)
387  continue;
388 
389  if (file->Sequence > mi->last_sequence || mi->is_continuous ||
390  (file->IsCompressed && !mi->is_extracted))
391  {
393  MSIFILE *cursor = file;
394 
395  data.mi = mi;
396  data.package = package;
397  data.cb = installfiles_cb;
398  data.user = &cursor;
399 
400  if (file->IsCompressed && !msi_cabextract(package, mi, &data))
401  {
402  ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
404  goto done;
405  }
406  }
407 
408  if (!file->IsCompressed)
409  {
411 
412  TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath));
413 
414  if (!is_global_assembly)
415  {
416  msi_create_directory(package, file->Component->Directory);
417  }
418  rc = copy_install_file(package, file, source);
419  if (rc != ERROR_SUCCESS)
420  {
421  ERR("Failed to copy %s to %s (%u)\n", debugstr_w(source), debugstr_w(file->TargetPath), rc);
423  msi_free(source);
424  goto done;
425  }
426  if (!is_global_assembly) file->state = msifs_installed;
427  msi_free(source);
428  }
429  else if (!is_global_assembly && file->state != msifs_installed &&
430  !(file->Attributes & msidbFileAttributesPatchAdded))
431  {
432  ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
434  goto done;
435  }
436  }
437  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
438  {
439  MSICOMPONENT *comp = file->Component;
440 
441  if (!msi_is_global_assembly( comp ) || comp->assembly->installed ||
442  (file->state != msifs_missing && file->state != msifs_overwrite)) continue;
443 
444  rc = msi_install_assembly( package, comp );
445  if (rc != ERROR_SUCCESS)
446  {
447  ERR("Failed to install assembly\n");
449  break;
450  }
451  file->state = msifs_installed;
452  }
453 
454 done:
456  return rc;
457 }
static void schedule_install_files(MSIPACKAGE *package)
Definition: files.c:177
UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
Definition: media.c:681
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:517
__wchar_t WCHAR
Definition: xmlstorage.h:180
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2392
uint8_t entry
Definition: isohybrid.c:63
BOOL msi_is_global_assembly(MSICOMPONENT *comp)
Definition: action.c:2193
static MONITORINFO mi
Definition: win.c:7331
static const WCHAR szInstallFiles[]
Definition: msipriv.h:1134
UINT ready_media(MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
Definition: media.c:844
struct list files
Definition: msipriv.h:394
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1210
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
const char file[]
Definition: icontest.c:11
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static void msi_file_update_ui(MSIPACKAGE *package, MSIFILE *f, const WCHAR *action)
Definition: files.c:53
UINT msi_install_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:444
BOOL installed
Definition: msipriv.h:495
#define ERR(fmt,...)
Definition: debug.h:109
const char cursor[]
Definition: icontest.c:13
WCHAR * msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file)
Definition: files.c:326
static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
Definition: files.c:206
BOOL msi_cabextract(MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
Definition: media.c:653
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
void msi_free_media_info(MSIMEDIAINFO *mi)
Definition: media.c:662
static const WCHAR szInstalled[]
Definition: msipriv.h:1122
static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR filename, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:295
Definition: fci.c:126
static UINT msi_create_directory(MSIPACKAGE *package, const WCHAR *dir)
Definition: files.c:265

◆ ACTION_MoveFiles()

UINT ACTION_MoveFiles ( MSIPACKAGE package)

Definition at line 995 of file files.c.

996 {
997  static const WCHAR query[] = {
998  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
999  '`','M','o','v','e','F','i','l','e','`',0};
1000  MSIQUERY *view;
1001  UINT rc;
1002 
1003  rc = MSI_DatabaseOpenViewW(package->db, query, &view);
1004  if (rc != ERROR_SUCCESS)
1005  return ERROR_SUCCESS;
1006 
1007  rc = MSI_IterateRecords(view, NULL, ITERATE_MoveFiles, package);
1008  msiobj_release(&view->hdr);
1009  return rc;
1010 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
smooth NULL
Definition: ftsmooth.c:416
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static UINT ITERATE_MoveFiles(MSIRECORD *rec, LPVOID param)
Definition: files.c:869
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
Definition: msiquery.c:111

◆ ACTION_MsiPublishAssemblies()

UINT ACTION_MsiPublishAssemblies ( MSIPACKAGE package)

Definition at line 651 of file assembly.c.

652 {
653  MSICOMPONENT *comp;
654 
656  {
657  LONG res;
658  HKEY hkey;
659  GUID guid;
660  DWORD size;
661  WCHAR buffer[43];
662  MSIRECORD *uirow;
663  MSIASSEMBLY *assembly = comp->assembly;
664  BOOL win32;
665 
666  if (!assembly || !comp->ComponentId) continue;
667 
668  comp->Action = msi_get_component_action( package, comp );
669  if (comp->Action != INSTALLSTATE_LOCAL)
670  {
671  TRACE("component not scheduled for installation %s\n", debugstr_w(comp->Component));
672  continue;
673  }
674  TRACE("publishing %s\n", debugstr_w(comp->Component));
675 
676  CLSIDFromString( package->ProductCode, &guid );
678  buffer[20] = '>';
679  CLSIDFromString( comp->ComponentId, &guid );
680  encode_base85_guid( &guid, buffer + 21 );
681  buffer[42] = 0;
682 
683  win32 = assembly->attributes & msidbAssemblyAttributesWin32;
684  if (assembly->application)
685  {
686  MSIFILE *file = msi_get_loaded_file( package, assembly->application );
687  if ((res = open_local_assembly_key( package->Context, win32, file->TargetPath, &hkey )))
688  {
689  WARN("failed to open local assembly key %d\n", res);
690  return ERROR_FUNCTION_FAILED;
691  }
692  }
693  else
694  {
695  if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
696  {
697  WARN("failed to open global assembly key %d\n", res);
698  return ERROR_FUNCTION_FAILED;
699  }
700  }
701  size = sizeof(buffer);
702  if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size )))
703  {
704  WARN("failed to set assembly value %d\n", res);
705  }
706  RegCloseKey( hkey );
707 
708  uirow = MSI_CreateRecord( 2 );
709  MSI_RecordSetStringW( uirow, 2, assembly->display_name );
711  msiobj_release( &uirow->hdr );
712  }
713  return ERROR_SUCCESS;
714 }
LPWSTR ProductCode
Definition: msipriv.h:426
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:517
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIOBJECTHDR hdr
Definition: msipriv.h:141
uint8_t entry
Definition: isohybrid.c:63
#define WARN(fmt,...)
Definition: debug.h:111
GLuint buffer
Definition: glext.h:5915
INSTALLSTATE Action
Definition: msipriv.h:510
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:755
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
const GUID * guid
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
static LONG open_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename, HKEY *hkey)
Definition: assembly.c:578
long LONG
Definition: pedump.c:60
#define REG_MULTI_SZ
Definition: nt_native.h:1501
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:674
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:4917
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
GLsizeiptr size
Definition: glext.h:5919
unsigned long DWORD
Definition: ntddk_ex.h:95
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
LPWSTR Component
Definition: msipriv.h:502
struct list components
Definition: msipriv.h:392
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
unsigned char BYTE
Definition: mem.h:68
LPWSTR ComponentId
Definition: msipriv.h:503
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
Definition: assembly.c:618
UINT Context
Definition: msipriv.h:437
GLuint res
Definition: glext.h:9613
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2250
BOOL encode_base85_guid(GUID *, LPWSTR) DECLSPEC_HIDDEN
Definition: registry.c:316
Definition: fci.c:126

◆ ACTION_MsiUnpublishAssemblies()

UINT ACTION_MsiUnpublishAssemblies ( MSIPACKAGE package)

Definition at line 716 of file assembly.c.

717 {
718  MSICOMPONENT *comp;
719 
721  {
722  LONG res;
723  MSIRECORD *uirow;
724  MSIASSEMBLY *assembly = comp->assembly;
725  BOOL win32;
726 
727  if (!assembly || !comp->ComponentId) continue;
728 
729  comp->Action = msi_get_component_action( package, comp );
730  if (comp->Action != INSTALLSTATE_ABSENT)
731  {
732  TRACE("component not scheduled for removal %s\n", debugstr_w(comp->Component));
733  continue;
734  }
735  TRACE("unpublishing %s\n", debugstr_w(comp->Component));
736 
737  win32 = assembly->attributes & msidbAssemblyAttributesWin32;
738  if (assembly->application)
739  {
740  MSIFILE *file = msi_get_loaded_file( package, assembly->application );
741  if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath )))
742  WARN("failed to delete local assembly key %d\n", res);
743  }
744  else
745  {
746  HKEY hkey;
747  if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
748  WARN("failed to delete global assembly key %d\n", res);
749  else
750  {
751  if ((res = RegDeleteValueW( hkey, assembly->display_name )))
752  WARN("failed to delete global assembly value %d\n", res);
753  RegCloseKey( hkey );
754  }
755  }
756 
757  uirow = MSI_CreateRecord( 2 );
758  MSI_RecordSetStringW( uirow, 2, assembly->display_name );
760  msiobj_release( &uirow->hdr );
761  }
762  return ERROR_SUCCESS;
763 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:517
MSIOBJECTHDR hdr
Definition: msipriv.h:141
uint8_t entry
Definition: isohybrid.c:63
#define WARN(fmt,...)
Definition: debug.h:111
INSTALLSTATE Action
Definition: msipriv.h:510
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:755
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:674
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
LPWSTR Component
Definition: msipriv.h:502
struct list components
Definition: msipriv.h:392
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
static LONG delete_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename)
Definition: assembly.c:598
LPWSTR ComponentId
Definition: msipriv.h:503
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2368
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
Definition: assembly.c:618
UINT Context
Definition: msipriv.h:437
GLuint res
Definition: glext.h:9613
Definition: fci.c:126

◆ ACTION_PatchFiles()

UINT ACTION_PatchFiles ( MSIPACKAGE package)

Definition at line 577 of file files.c.

578 {
579  MSIFILEPATCH *patch;
580  MSIMEDIAINFO *mi;
581  UINT rc = ERROR_SUCCESS;
582 
583  TRACE("%p\n", package);
584 
585  mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
586 
587  TRACE("extracting files\n");
588 
589  LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry )
590  {
591  MSIFILE *file = patch->File;
592  MSICOMPONENT *comp = file->Component;
593 
594  rc = msi_load_media_info( package, patch->Sequence, mi );
595  if (rc != ERROR_SUCCESS)
596  {
597  ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
599  goto done;
600  }
601  comp->Action = msi_get_component_action( package, comp );
602  if (!comp->Enabled || comp->Action != INSTALLSTATE_LOCAL) continue;
603 
604  if (!patch->extracted)
605  {
607  MSIFILEPATCH *cursor = patch;
608 
609  rc = ready_media( package, TRUE, mi );
610  if (rc != ERROR_SUCCESS)
611  {
612  ERR("Failed to ready media for %s\n", debugstr_w(file->File));
613  goto done;
614  }
615  data.mi = mi;
616  data.package = package;
617  data.cb = patchfiles_cb;
618  data.user = &cursor;
619 
620  if (!msi_cabextract( package, mi, &data ))
621  {
622  ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
624  goto done;
625  }
626  }
627  }
628 
629  TRACE("applying patches\n");
630 
631  LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry )
632  {
633  MSICOMPONENT *comp = patch->File->Component;
634 
635  if (!patch->path) continue;
636 
637  if (msi_is_global_assembly( comp ))
638  rc = patch_assembly( package, comp->assembly, patch );
639  else
640  rc = patch_file( package, patch );
641 
642  if (rc && !(patch->Attributes & msidbPatchAttributesNonVital))
643  {
644  ERR("Failed to apply patch to file: %s\n", debugstr_w(patch->File->File));
645  break;
646  }
647 
648  if (msi_is_global_assembly( comp ))
649  {
650  if ((rc = msi_install_assembly( package, comp )))
651  {
652  ERR("Failed to install patched assembly\n");
653  break;
654  }
655  }
656  }
657 
658 done:
660  return rc;
661 }
#define TRUE
Definition: types.h:120
UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
Definition: media.c:681
BOOL extracted
Definition: msipriv.h:607
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:517
uint8_t entry
Definition: isohybrid.c:63
BOOL msi_is_global_assembly(MSICOMPONENT *comp)
Definition: action.c:2193
LPWSTR File
Definition: msipriv.h:583
static MONITORINFO mi
Definition: win.c:7331
INSTALLSTATE Action
Definition: msipriv.h:510
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:755
UINT ready_media(MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
Definition: media.c:844
MSIFILE * File
Definition: msipriv.h:603
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1210
static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:471
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
WCHAR * path
Definition: msipriv.h:609
#define TRACE(s)
Definition: solgame.cpp:4
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
unsigned int UINT
Definition: ndis.h:50
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
UINT msi_install_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:444
#define ERR(fmt,...)
Definition: debug.h:109
MSICOMPONENT * Component
Definition: msipriv.h:584
const char cursor[]
Definition: icontest.c:13
BOOL msi_cabextract(MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
Definition: media.c:653
void msi_free_media_info(MSIMEDIAINFO *mi)
Definition: media.c:662
struct list filepatches
Definition: msipriv.h:395
static UINT patch_assembly(MSIPACKAGE *package, MSIASSEMBLY *assembly, MSIFILEPATCH *patch)
Definition: files.c:527
Definition: fci.c:126
static UINT patch_file(MSIPACKAGE *package, MSIFILEPATCH *patch)
Definition: files.c:505

◆ ACTION_PerformAction()

UINT ACTION_PerformAction ( MSIPACKAGE package,
const WCHAR action,
UINT  script 
)

Definition at line 7909 of file action.c.

7910 {
7911  UINT rc;
7912 
7913  TRACE("Performing action (%s)\n", debugstr_w(action));
7914 
7915  package->action_progress_increment = 0;
7916  rc = ACTION_HandleStandardAction(package, action);
7917 
7918  if (rc == ERROR_FUNCTION_NOT_CALLED)
7919  rc = ACTION_HandleCustomAction(package, action, script);
7920 
7921  if (rc == ERROR_FUNCTION_NOT_CALLED)
7922  WARN("unhandled msi action %s\n", debugstr_w(action));
7923 
7924  return rc;
7925 }
#define WARN(fmt,...)
Definition: debug.h:111
#define debugstr_w
Definition: kernel32.h:32
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
script
Definition: msipriv.h:374
#define TRACE(s)
Definition: solgame.cpp:4
static UINT ACTION_HandleCustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script)
Definition: action.c:614
unsigned int UINT
Definition: ndis.h:50
const WCHAR * action
Definition: action.c:7779
UINT action_progress_increment
Definition: msipriv.h:404
static UINT ACTION_HandleStandardAction(MSIPACKAGE *package, LPCWSTR action)
Definition: action.c:7867

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 747 of file classes.c.

748 {
749  static const WCHAR szFileType_fmt[] = {'F','i','l','e','T','y','p','e','\\','%','s','\\','%','i',0};
750  const WCHAR *keypath;
751  MSIRECORD *uirow;
752  HKEY hkey, hkey2, hkey3;
753  MSICLASS *cls;
754  UINT r;
755 
756  r = load_classes_and_such( package );
757  if (r != ERROR_SUCCESS)
758  return r;
759 
760  if (is_64bit && package->platform == PLATFORM_INTEL)
761  keypath = szWow6432NodeCLSID;
762  else
763  keypath = szCLSID;
764 
765  if (RegCreateKeyW(HKEY_CLASSES_ROOT, keypath, &hkey) != ERROR_SUCCESS)
766  return ERROR_FUNCTION_FAILED;
767 
768  LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
769  {
770  MSICOMPONENT *comp;
771  MSIFILE *file;
772  DWORD size;
773  LPWSTR argument;
775 
776  comp = cls->Component;
777  if ( !comp )
778  continue;
779 
780  if (!comp->Enabled)
781  {
782  TRACE("component is disabled\n");
783  continue;
784  }
785 
786  feature = cls->Feature;
787  if (!feature)
788  continue;
789 
790  feature->Action = msi_get_feature_action( package, feature );
791  if (feature->Action != INSTALLSTATE_LOCAL &&
792  feature->Action != INSTALLSTATE_ADVERTISED )
793  {
794  TRACE("feature %s not scheduled for installation, skipping registration of class %s\n",
795  debugstr_w(feature->Feature), debugstr_w(cls->clsid));
796  continue;
797  }
798 
799  if (!comp->KeyPath || !(file = msi_get_loaded_file( package, comp->KeyPath )))
800  {
801  TRACE("COM server not provided, skipping class %s\n", debugstr_w(cls->clsid));
802  continue;
803  }
804  TRACE("Registering class %s (%p)\n", debugstr_w(cls->clsid), cls);
805 
806  cls->action = INSTALLSTATE_LOCAL;
807 
808  RegCreateKeyW( hkey, cls->clsid, &hkey2 );
809 
810  if (cls->Description)
811  msi_reg_set_val_str( hkey2, NULL, cls->Description );
812 
813  RegCreateKeyW( hkey2, cls->Context, &hkey3 );
814 
815  /*
816  * FIXME: Implement install on demand (advertised components).
817  *
818  * ole32.dll should call msi.MsiProvideComponentFromDescriptor()
819  * when it needs an InProcServer that doesn't exist.
820  * The component advertise string should be in the "InProcServer" value.
821  */
822  size = lstrlenW( file->TargetPath )+1;
823  if (cls->Argument)
824  size += lstrlenW(cls->Argument)+1;
825 
826  argument = msi_alloc( size * sizeof(WCHAR) );
827  lstrcpyW( argument, file->TargetPath );
828 
829  if (cls->Argument)
830  {
831  lstrcatW( argument, szSpace );
832  lstrcatW( argument, cls->Argument );
833  }
834 
835  msi_reg_set_val_str( hkey3, NULL, argument );
836  msi_free(argument);
837 
838  RegCloseKey(hkey3);
839 
840  if (cls->ProgID || cls->ProgIDText)
841  {
842  LPCWSTR progid;
843 
844  if (cls->ProgID)
845  progid = cls->ProgID->ProgID;
846  else
847  progid = cls->ProgIDText;
848 
850 
851  if (cls->ProgID && cls->ProgID->VersionInd)
852  {
854  cls->ProgID->VersionInd->ProgID );
855  }
856  }
857 
858  if (cls->AppID)
859  {
860  MSIAPPID *appid = cls->AppID;
861  msi_reg_set_val_str( hkey2, szAppID, appid->AppID );
863  }
864 
865  if (cls->IconPath)
867 
868  if (cls->DefInprocHandler)
870 
871  if (cls->DefInprocHandler32)
873 
874  RegCloseKey(hkey2);
875 
876  /* if there is a FileTypeMask, register the FileType */
877  if (cls->FileTypeMask)
878  {
879  LPWSTR ptr, ptr2;
880  LPWSTR keyname;
881  INT index = 0;
882  ptr = cls->FileTypeMask;
883  while (ptr && *ptr)
884  {
885  ptr2 = strchrW(ptr,';');
886  if (ptr2)
887  *ptr2 = 0;
888  keyname = msi_alloc( (strlenW(szFileType_fmt) + strlenW(cls->clsid) + 4) * sizeof(WCHAR));
889  sprintfW( keyname, szFileType_fmt, cls->clsid, index );
890 
892  msi_free(keyname);
893 
894  if (ptr2)
895  ptr = ptr2+1;
896  else
897  ptr = NULL;
898 
899  index ++;
900  }
901  }
902 
903  uirow = MSI_CreateRecord(1);
904  MSI_RecordSetStringW( uirow, 1, cls->clsid );
906  msiobj_release(&uirow->hdr);
907  }
908  RegCloseKey(hkey);
909  return ERROR_SUCCESS;
910 }
LONG msi_reg_set_subkey_val(HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val) DECLSPEC_HIDDEN
Definition: registry.c:381
INTERNETFEATURELIST feature
Definition: misc.c:1697
enum platform platform
Definition: msipriv.h:388
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
INSTALLSTATE msi_get_feature_action(MSIPACKAGE *package, MSIFEATURE *feature)
Definition: action.c:771
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIFEATURE * Feature
Definition: msipriv.h:641
MSIOBJECTHDR hdr
Definition: msipriv.h:141
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
MSICOMPONENT * Component
Definition: msipriv.h:631
LPWSTR IconPath
Definition: msipriv.h:637
uint8_t entry
Definition: isohybrid.c:63
static const WCHAR szCLSID[]
Definition: msipriv.h:1160
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
LPWSTR KeyPath
Definition: msipriv.h:507
MSIPROGID * VersionInd
Definition: msipriv.h:673
#define lstrlenW
Definition: compat.h:407
LPWSTR FileTypeMask
Definition: msipriv.h:636
int32_t INT
Definition: typedefs.h:56
static const BOOL is_64bit
Definition: msipriv.h:41
static const WCHAR szProgID[]
Definition: msipriv.h:1161
static const WCHAR szSpace[]
Definition: msipriv.h:1110
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:673
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
static const WCHAR szAppID[]
Definition: msipriv.h:1163
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
static PVOID ptr
Definition: dispmode.c:27
char * appid
Definition: mkisofs.c:161
smooth NULL
Definition: ftsmooth.c:416
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:360
GLuint index
Definition: glext.h:6031
static const WCHAR szWow6432NodeCLSID[]
Definition: msipriv.h:1177
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:674
LPWSTR DefInprocHandler
Definition: msipriv.h:638
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
LPWSTR Context
Definition: msipriv.h:630
struct list classes
Definition: msipriv.h:409
LPWSTR ProgIDText
Definition: msipriv.h:633
LPWSTR Description
Definition: msipriv.h:634
const char file[]
Definition: icontest.c:11
unsigned int UINT
Definition: ndis.h:50
static const WCHAR szVIProgID[]
Definition: msipriv.h:1162
unsigned long DWORD
Definition: ntddk_ex.h:95
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1202
static const WCHAR szInprocHandler[]
Definition: msipriv.h:1165
MSIAPPID * AppID
Definition: msipriv.h:635
LPWSTR clsid
Definition: msipriv.h:629
#define lstrcpyW
Definition: compat.h:406
#define sprintfW
Definition: unicode.h:58
LPWSTR ProgID
Definition: msipriv.h:666
MSIPROGID * ProgID
Definition: msipriv.h:632
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
#define progid(str)
Definition: exdisp.idl:31
static UINT register_appid(const MSIAPPID *appid, LPCWSTR app)
Definition: classes.c:701
LPWSTR DefInprocHandler32
Definition: msipriv.h:639
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static const WCHAR szDefaultIcon[]
Definition: msipriv.h:1164
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static const WCHAR szInprocHandler32[]
Definition: msipriv.h:1166
LPWSTR Argument
Definition: msipriv.h:640
INSTALLSTATE action
Definition: msipriv.h:644
Definition: fci.c:126

◆ ACTION_RegisterExtensionInfo()

UINT ACTION_RegisterExtensionInfo ( MSIPACKAGE package)

Definition at line 1248 of file classes.c.

1249 {
1250  static const WCHAR szContentType[] = {'C','o','n','t','e','n','t',' ','T','y','p','e',0};
1251  HKEY hkey = NULL;
1252  MSIEXTENSION *ext;
1253  MSIRECORD *uirow;
1254  BOOL install_on_demand = TRUE;
1255  LONG res;
1256  UINT r;
1257 
1258  r = load_classes_and_such( package );
1259  if (r != ERROR_SUCCESS)
1260  return r;
1261 
1262  /* We need to set install_on_demand based on if the shell handles advertised
1263  * shortcuts and the like. Because Mike McCormack is working on this i am
1264  * going to default to TRUE
1265  */
1266 
1268  {
1269  LPWSTR extension;
1271 
1272  if (!ext->Component)
1273  continue;
1274 
1275  if (!ext->Component->Enabled)
1276  {
1277  TRACE("component is disabled\n");
1278  continue;
1279  }
1280 
1281  feature = ext->Feature;
1282  if (!feature)
1283  continue;
1284 
1285  /*
1286  * yes. MSDN says that these are based on _Feature_ not on
1287  * Component. So verify the feature is to be installed
1288  */
1289  feature->Action = msi_get_feature_action( package, feature );
1290  if (feature->Action != INSTALLSTATE_LOCAL &&
1291  !(install_on_demand && feature->Action == INSTALLSTATE_ADVERTISED))
1292  {
1293  TRACE("feature %s not scheduled for installation, skipping registration of extension %s\n",
1294  debugstr_w(feature->Feature), debugstr_w(ext->Extension));
1295  continue;
1296  }
1297  TRACE("Registering extension %s (%p)\n", debugstr_w(ext->Extension), ext);
1298 
1299  ext->action = INSTALLSTATE_LOCAL;
1300 
1301  extension = msi_alloc( (strlenW( ext->Extension ) + 2) * sizeof(WCHAR) );
1302  if (extension)
1303  {
1304  extension[0] = '.';
1305  strcpyW( extension + 1, ext->Extension );
1306  res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey );
1307  msi_free( extension );
1308  if (res != ERROR_SUCCESS)
1309  WARN("Failed to create extension key %d\n", res);
1310  }
1311 
1312  if (ext->Mime)
1313  msi_reg_set_val_str( hkey, szContentType, ext->Mime->ContentType );
1314 
1315  if (ext->ProgID || ext->ProgIDText)
1316  {
1317  static const WCHAR szSN[] =
1318  {'\\','S','h','e','l','l','N','e','w',0};
1319  HKEY hkey2;
1320  LPWSTR newkey;
1321  LPCWSTR progid;
1322  MSIVERB *verb;
1323  INT Sequence = MSI_NULL_INTEGER;
1324 
1325  if (ext->ProgID)
1326  progid = ext->ProgID->ProgID;
1327  else
1328  progid = ext->ProgIDText;
1329 
1330  msi_reg_set_val_str( hkey, NULL, progid );
1331 
1332  newkey = msi_alloc( (strlenW(progid)+strlenW(szSN)+1) * sizeof(WCHAR));
1333 
1334  strcpyW(newkey,progid);
1335  strcatW(newkey,szSN);
1336  RegCreateKeyW(hkey,newkey,&hkey2);
1337  RegCloseKey(hkey2);
1338 
1339  msi_free(newkey);
1340 
1341  /* do all the verbs */
1342  LIST_FOR_EACH_ENTRY( verb, &ext->verbs, MSIVERB, entry )
1343  {
1344  register_verb( package, progid, ext->Component,
1345  ext, verb, &Sequence);
1346  }
1347  }
1348 
1349  RegCloseKey(hkey);
1350 
1351  uirow = MSI_CreateRecord(1);
1352  MSI_RecordSetStringW( uirow, 1, ext->Extension );
1354  msiobj_release(&uirow->hdr);
1355  }
1356  return ERROR_SUCCESS;
1357 }
INTERNETFEATURELIST feature
Definition: misc.c:1697
#define TRUE
Definition: types.h:120
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
INSTALLSTATE msi_get_feature_action(MSIPACKAGE *package, MSIFEATURE *feature)
Definition: action.c:771
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIOBJECTHDR hdr
Definition: msipriv.h:141
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
uint8_t entry
Definition: isohybrid.c:63
#define WARN(fmt,...)
Definition: debug.h:111
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define MSI_NULL_INTEGER
Definition: msiquery.h:32
static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid, MSICOMPONENT *component, const MSIEXTENSION *extension, MSIVERB *verb, INT *Sequence)
Definition: classes.c:1172
int32_t INT
Definition: typedefs.h:56
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:673
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
smooth NULL
Definition: ftsmooth.c:416
char ext[3]
Definition: mkdosfs.c:358
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:360
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned int UINT
Definition: ndis.h:50
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1202
struct list extensions
Definition: msipriv.h:410
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
GLuint res
Definition: glext.h:9613
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
#define progid(str)
Definition: exdisp.idl:31
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ ACTION_RegisterFonts()

UINT ACTION_RegisterFonts ( MSIPACKAGE package)

Definition at line 290 of file font.c.

291 {
292  static const WCHAR query[] = {
293  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','F','o','n','t','`',0};
294  MSIQUERY *view;
295  UINT rc;
296 
297  rc = MSI_DatabaseOpenViewW(package->db, query, &view);
298  if (rc != ERROR_SUCCESS)
299  return ERROR_SUCCESS;
300 
302  msiobj_release(&view->hdr);
303  return rc;
304 }
static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
Definition: font.c:226
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
smooth NULL
Definition: ftsmooth.c:416
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
Definition: msiquery.c:111

◆ ACTION_RegisterMIMEInfo()

UINT ACTION_RegisterMIMEInfo ( MSIPACKAGE package)

Definition at line 1442 of file classes.c.

1443 {
1444  static const WCHAR szExtension[] = {'E','x','t','e','n','s','i','o','n',0};
1445  MSIRECORD *uirow;
1446  MSIMIME *mt;
1447  UINT r;
1448 
1449  r = load_classes_and_such( package );
1450  if (r != ERROR_SUCCESS)
1451  return r;
1452 
1453  LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
1454  {
1455  LPWSTR extension = NULL, key;
1456 
1457  /*
1458  * check if the MIME is to be installed. Either as requested by an
1459  * extension or Class
1460  */
1461  if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) &&
1462  (!mt->Extension || mt->Extension->action != INSTALLSTATE_LOCAL))
1463  {
1464  TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType));
1465  continue;
1466  }
1467 
1468  TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType));
1469 
1470  if (mt->Extension) extension = msi_alloc( (strlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) );
1471  key = msi_alloc( (strlenW( mt->ContentType ) + strlenW( szMIMEDatabase ) + 1) * sizeof(WCHAR) );
1472 
1473  if (extension && key)
1474  {
1475  extension[0] = '.';
1476  strcpyW( extension + 1, mt->Extension->Extension );
1477 
1479  strcatW( key, mt->ContentType );
1480  msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, szExtension, extension );
1481 
1482  if (mt->clsid)
1484  }
1485  msi_free( extension );
1486  msi_free( key );
1487 
1488  uirow = MSI_CreateRecord( 2 );
1489  MSI_RecordSetStringW( uirow, 1, mt->ContentType );
1490  MSI_RecordSetStringW( uirow, 2, mt->suffix );
1492  msiobj_release( &uirow->hdr );
1493  }
1494  return ERROR_SUCCESS;
1495 }
LONG msi_reg_set_subkey_val(HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val) DECLSPEC_HIDDEN
Definition: registry.c:381
MSICLASS * Class
Definition: msipriv.h:692
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIOBJECTHDR hdr
Definition: msipriv.h:141
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
MSIEXTENSION * Extension
Definition: msipriv.h:689
uint8_t entry
Definition: isohybrid.c:63
INSTALLSTATE action
Definition: msipriv.h:659
static const WCHAR szCLSID[]
Definition: msipriv.h:1160
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:673
LPWSTR suffix
Definition: msipriv.h:690
LPWSTR clsid
Definition: msipriv.h:691
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
smooth NULL
Definition: ftsmooth.c:416
struct list mimes
Definition: msipriv.h:412
LPWSTR Extension
Definition: msipriv.h:652
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
HKEY key
Definition: reg.c:42
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static const WCHAR szMIMEDatabase[]
Definition: msipriv.h:1167
LPWSTR ContentType
Definition: msipriv.h:688
INSTALLSTATE action
Definition: msipriv.h:644
Definition: path.c:42

◆ ACTION_RegisterProgIdInfo()

UINT ACTION_RegisterProgIdInfo ( MSIPACKAGE package)

Definition at line 1080 of file classes.c.

1081 {
1082  MSIPROGID *progid;
1083  MSIRECORD *uirow;
1084  UINT r;
1085 
1086  r = load_classes_and_such( package );
1087  if (r != ERROR_SUCCESS)
1088  return r;
1089 
1091  {
1093  {
1094  TRACE("progid %s not scheduled to be installed\n", debugstr_w(progid->ProgID));
1095  continue;
1096  }
1097  TRACE("Registering progid %s\n", debugstr_w(progid->ProgID));
1098 
1100 
1101  uirow = MSI_CreateRecord( 1 );
1102  MSI_RecordSetStringW( uirow, 1, progid->ProgID );
1104  msiobj_release( &uirow->hdr );
1105  }
1106  return ERROR_SUCCESS;
1107 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIOBJECTHDR hdr
Definition: msipriv.h:141
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
uint8_t entry
Definition: isohybrid.c:63
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:673
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int UINT
Definition: ndis.h:50
struct list progids
Definition: msipriv.h:411
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:79
static UINT register_progid(const MSIPROGID *progid)
Definition: classes.c:1017
static BOOL has_one_extension_installed(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1069
#define progid(str)
Definition: exdisp.idl:31
static BOOL has_class_installed(const MSIPROGID *progid)
Definition: classes.c:1062

◆ ACTION_RemoveDuplicateFiles()

UINT ACTION_RemoveDuplicateFiles ( MSIPACKAGE package)

Definition at line 1203 of file files.c.

1204 {
1205  static const WCHAR query[] = {
1206  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1207  '`','D','u','p','l','i','c','a','t','e','F','i','l','e','`',0};
1208  MSIQUERY *view;
1209  UINT rc;
1210 
1211  rc = MSI_DatabaseOpenViewW( package->db, query, &view );
1212  if (rc != ERROR_SUCCESS)
1213  return ERROR_SUCCESS;
1214 
1216  msiobj_release( &view->hdr );
1217  return rc;
1218 }
#define ERROR_SUCCESS
Definition: deptool.c:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
smooth NULL
Definition: ftsmooth.c:416
unsigned int UINT
Definition: ndis.h:50
MSIDATABASE * db
Definition: msipriv.h:386
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:168
static UINT ITERATE_RemoveDuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1144
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN
Definition: msiquery.c:111

◆ ACTION_RemoveFiles()

UINT ACTION_RemoveFiles ( MSIPACKAGE package)

Definition at line 1341 of file files.c.

1342 {
1343  static const WCHAR query[] = {
1344  'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
1345  '`','R','e','m','o','v','e','F','i','l','e','`',0};
1346  MSIQUERY *view;
1347  MSICOMPONENT *comp;
1348  MSIFILE *file;
1349  UINT r;
1350 
1351  r = MSI_DatabaseOpenViewW(package->db, query, &view);
1352  if (r == ERROR_SUCCESS)
1353  {
1355  msiobj_release(&view->hdr);
1356  if (r != ERROR_SUCCESS)
1357  return r;
1358  }
1359 
1360  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
1361  {
1362  MSIRECORD *uirow;
1363  VS_FIXEDFILEINFO *ver;
1364 
1365  comp = file->Component;
1366  msi_file_update_ui( package, file, szRemoveFiles );
1367 
1368  comp->Action = msi_get_component_action( package, comp );
1369  if (comp->Action != INSTALLSTATE_ABSENT || comp->Installed == INSTALLSTATE_SOURCE)
1370  continue;
1371 
1372  if (comp->assembly && !comp->assembly->application)
1373  continue;
1374 
1376  {
1377  TRACE("permanent component, not removing file\n");
1378  continue;
1379  }
1380 
1381  if (file->Version)
1382  {
1383  ver = msi_get_disk_file_version( file->TargetPath );
1384  if (ver && msi_compare_file_versions( ver, file->Version ) > 0)
1385  {
1386  TRACE("newer version detected, not removing file\n");
1387  msi_free( ver );
1388  continue;
1389  }
1390  msi_free( ver );
1391  }
1392 
1393  if (file->state == msifs_installed)
1394  WARN("removing installed file %s\n", debugstr_w(file->TargetPath));
1395 
1396  TRACE("removing %s\n", debugstr_w(file->File) );
1397 
1399  if (!DeleteFileW( file->TargetPath ))
1400  {
1401  WARN("failed to delete %s (%u)\n", debugstr_w(file->TargetPath), GetLastError());
1402  }
1403  file->state = msifs_missing;
1404 
1405  uirow = MSI_CreateRecord( 9 );
1406  MSI_RecordSetStringW( uirow, 1, file->FileName );
1407  MSI_RecordSetStringW( uirow, 9, comp->Directory );
1409  msiobj_release( &uirow->hdr );
1410  }
1411 
1412  LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
1413  {
1414  comp->Action = msi_get_component_action( package, comp );
1415  if (comp->Action != INSTALLSTATE_ABSENT) continue;
1416 
1418  {
1419  TRACE("permanent component, not removing directory\n");
1420  continue;
1421  }
1422  if (comp->assembly && !comp->assembly->application)
1423  msi_uninstall_assembly( package, comp );
1424  else
1425  {
1426  MSIFOLDER *folder = msi_get_loaded_folder( package, comp->Directory );
1427  remove_folder( folder );
1428  }
1429  }
1430  return ERROR_SUCCESS;
1431 }
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:944
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:649
Definition: fci.c:115
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:517
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIOBJECTHDR hdr
Definition: msipriv.h:141
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
uint8_t entry
Definition: isohybrid.c:63
#define WARN(fmt,...)
Definition: debug.h:111
static const WCHAR szRemoveFiles[]
Definition: msipriv.h:1136
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
INSTALLSTATE Action
Definition: msipriv.h:510
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:755
struct list files
Definition: msipriv.h:394
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1946
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39