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

Go to the source code of this file.

Classes

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

Macros

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

Typedefs

typedef struct tagMSITABLE MSITABLE
 
typedef struct string_table string_table
 
typedef struct tagMSIOBJECTHDR MSIOBJECTHDR
 
typedef VOID(* msihandledestructor) (MSIOBJECTHDR *)
 
typedef struct tagMSISTREAM MSISTREAM
 
typedef struct tagMSITRANSFORM MSITRANSFORM
 
typedef struct tagMSIDATABASE MSIDATABASE
 
typedef struct tagMSIVIEW MSIVIEW
 
typedef struct tagMSIQUERY MSIQUERY
 
typedef struct tagMSIFIELD MSIFIELD
 
typedef struct tagMSIRECORD MSIRECORD
 
typedef struct tagMSISOURCELISTINFO MSISOURCELISTINFO
 
typedef struct tagMSIMEDIADISK MSIMEDIADISK
 
typedef struct tagMSIMEDIAINFO MSIMEDIAINFO
 
typedef struct tagMSICABINETSTREAM MSICABINETSTREAM
 
typedef struct tagMSIPATCHINFO MSIPATCHINFO
 
typedef struct tagMSIBINARY MSIBINARY
 
typedef struct _column_info column_info
 
typedef const struct 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_UNRECOGNIZED, PLATFORM_INTEL, PLATFORM_INTEL64, PLATFORM_X64,
  PLATFORM_ARM, PLATFORM_ARM64
}
 
enum  clr_version {
  CLR_VERSION_V10, CLR_VERSION_V11, CLR_VERSION_V20, CLR_VERSION_V40,
  CLR_VERSION_MAX
}
 
enum  script {
  SCRIPT_NONE = -1, SCRIPT_INSTALL = 0, SCRIPT_COMMIT = 1, SCRIPT_ROLLBACK = 2,
  SCRIPT_MAX = 3
}
 
enum  folder_state {
  FOLDER_STATE_UNINITIALIZED, FOLDER_STATE_EXISTS, FOLDER_STATE_CREATED, FOLDER_STATE_CREATED_PERSISTENT,
  FOLDER_STATE_REMOVED
}
 
enum  _msi_file_state {
  msifs_invalid, msifs_missing, msifs_overwrite, msifs_present,
  msifs_installed, msifs_skipped, msifs_hashmatch
}
 
enum  tid_t {
  LAST_tid, LAST_tid, Database_tid, Installer_tid,
  Record_tid, Session_tid, StringList_tid, SummaryInfo_tid,
  View_tid, LAST_tid, NULL_tid, IXMLDOMAttribute_tid,
  IXMLDOMCDATASection_tid, IXMLDOMComment_tid, IXMLDOMDocument_tid, IXMLDOMDocument2_tid,
  IXMLDOMDocument3_tid, IXMLDOMDocumentFragment_tid, IXMLDOMDocumentType_tid, IXMLDOMElement_tid,
  IXMLDOMEntityReference_tid, IXMLDOMImplementation_tid, IXMLDOMNamedNodeMap_tid, IXMLDOMNode_tid,
  IXMLDOMNodeList_tid, IXMLDOMParseError2_tid, IXMLDOMProcessingInstruction_tid, IXMLDOMSchemaCollection_tid,
  IXMLDOMSchemaCollection2_tid, IXMLDOMSelection_tid, IXMLDOMText_tid, IXMLElement_tid,
  IXMLDocument_tid, IXMLHTTPRequest_tid, IXSLProcessor_tid, IXSLTemplate_tid,
  IVBSAXAttributes_tid, IVBSAXContentHandler_tid, IVBSAXDeclHandler_tid, IVBSAXDTDHandler_tid,
  IVBSAXEntityResolver_tid, IVBSAXErrorHandler_tid, IVBSAXLexicalHandler_tid, IVBSAXLocator_tid,
  IVBSAXXMLFilter_tid, IVBSAXXMLReader_tid, IMXAttributes_tid, IMXReaderControl_tid,
  IMXWriter_tid, IVBMXNamespaceManager_tid, IServerXMLHTTPRequest_tid, LAST_tid,
  NULL_tid, ITextDocument_tid, ITextRange_tid, ITextSelection_tid,
  ITextFont_tid, ITextPara_tid, LAST_tid, NULL_tid,
  IDictionary_tid, IDrive_tid, IDriveCollection_tid, IFile_tid,
  IFileCollection_tid, IFileSystem3_tid, IFolder_tid, IFolderCollection_tid,
  ITextStream_tid, LAST_tid, NULL_tid, IWshCollection_tid,
  IWshEnvironment_tid, IWshExec_tid, IWshShell3_tid, IWshShortcut_tid,
  LAST_tid
}
 

Functions

UINT msi_strcpy_to_awstring (const WCHAR *, int, awstring *, DWORD *) DECLSPEC_HIDDEN
 
MSIHANDLE msi_get_remote (MSIHANDLE handle) DECLSPEC_HIDDEN
 
LONG WINAPI rpc_filter (EXCEPTION_POINTERS *eptr) DECLSPEC_HIDDEN
 
voidmsihandle2msiinfo (MSIHANDLE handle, UINT type) DECLSPEC_HIDDEN
 
MSIHANDLE alloc_msihandle (MSIOBJECTHDR *) DECLSPEC_HIDDEN
 
MSIHANDLE alloc_msi_remote_handle (MSIHANDLE remote) 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, BOOL persistent) 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, int err_cond) 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
 
const WCHARmsi_get_command_line_option (const WCHAR *cmd, const WCHAR *option, UINT *len) 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_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
 
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
 
UINT unmarshal_record (const struct wire_record *in, MSIHANDLE *out) DECLSPEC_HIDDEN
 
struct wire_recordmarshal_record (MSIHANDLE handle) DECLSPEC_HIDDEN
 
void free_remote_record (struct wire_record *rec) DECLSPEC_HIDDEN
 
UINT copy_remote_record (const struct wire_record *rec, MSIHANDLE handle) 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 WINAPIV MSI_OpenQuery (MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
 
UINT MSI_IterateRecords (MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
 
MSIRECORD *WINAPIV MSI_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 *) DECLSPEC_HIDDEN
 
UINT MSI_OpenPackageW (LPCWSTR szPackage, DWORD dwOptions, 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
 
int msi_compare_file_versions (VS_FIXEDFILEINFO *, const WCHAR *) DECLSPEC_HIDDEN
 
int msi_compare_font_versions (const WCHAR *, const WCHAR *) 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) DECLSPEC_HIDDEN
 
void ACTION_FinishCustomActions (const MSIPACKAGE *package) DECLSPEC_HIDDEN
 
UINT ACTION_CustomAction (MSIPACKAGE *package, const WCHAR *action) DECLSPEC_HIDDEN
 
void custom_stop_server (HANDLE process, HANDLE pipe) 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_source_folders (MSIPACKAGE *package) 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
 
WCHAR *WINAPIV msi_build_directory_name (DWORD,...) 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
 
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 msi_strncpyWtoA (const WCHAR *str, int len, char *buf, DWORD *sz, BOOL remote) DECLSPEC_HIDDEN
 
UINT msi_strncpyW (const WCHAR *str, int len, WCHAR *buf, DWORD *sz) DECLSPEC_HIDDEN
 
WCHARmsi_get_package_code (MSIDATABASE *db) DECLSPEC_HIDDEN
 
static void msi_disable_fs_redirection (MSIPACKAGE *package)
 
static void msi_revert_fs_redirection (MSIPACKAGE *package)
 
HANDLE msi_create_file (MSIPACKAGE *, const WCHAR *, DWORD, DWORD, DWORD, DWORD) DECLSPEC_HIDDEN
 
BOOL msi_delete_file (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
BOOL msi_remove_directory (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
DWORD msi_get_file_attributes (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
BOOL msi_set_file_attributes (MSIPACKAGE *, const WCHAR *, DWORD) DECLSPEC_HIDDEN
 
HANDLE msi_find_first_file (MSIPACKAGE *, const WCHAR *, WIN32_FIND_DATAW *) DECLSPEC_HIDDEN
 
BOOL msi_find_next_file (MSIPACKAGE *, HANDLE, WIN32_FIND_DATAW *) DECLSPEC_HIDDEN
 
BOOL msi_move_file (MSIPACKAGE *, const WCHAR *, const WCHAR *, DWORD) DECLSPEC_HIDDEN
 
DWORD msi_get_file_version_info (MSIPACKAGE *, const WCHAR *, DWORD, BYTE *) DECLSPEC_HIDDEN
 
BOOL msi_create_full_path (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
DWORD msi_get_disk_file_size (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
VS_FIXEDFILEINFOmsi_get_disk_file_version (MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN
 
UINT msi_get_filehash (MSIPACKAGE *, const WCHAR *, MSIFILEHASHINFO *) DECLSPEC_HIDDEN
 
WCHARmsi_get_font_file_version (MSIPACKAGE *, const WCHAR *) 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 void 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
 

Macro Definition Documentation

◆ GUID_SIZE

#define GUID_SIZE   39

Definition at line 733 of file msipriv.h.

◆ INSTALLUILEVEL_MASK

#define INSTALLUILEVEL_MASK   0x0007

Definition at line 60 of file msipriv.h.

◆ LONG_STR_BYTES

#define LONG_STR_BYTES   3

Definition at line 57 of file msipriv.h.

◆ MAX_STREAM_NAME_LEN

#define MAX_STREAM_NAME_LEN   62

Definition at line 56 of file msipriv.h.

◆ MSI_BUILDNUMBER

#define MSI_BUILDNUMBER   6001

Definition at line 731 of file msipriv.h.

◆ MSI_DATASIZEMASK

#define MSI_DATASIZEMASK   0x00ff

Definition at line 47 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_DISKID

#define MSI_INITIAL_MEDIA_TRANSFORM_DISKID   32000

Definition at line 84 of file msipriv.h.

◆ MSI_INITIAL_MEDIA_TRANSFORM_OFFSET

#define MSI_INITIAL_MEDIA_TRANSFORM_OFFSET   10000

Definition at line 83 of file msipriv.h.

◆ MSI_MAJORVERSION

#define MSI_MAJORVERSION   4

Definition at line 729 of file msipriv.h.

◆ MSI_MAX_PROPS

#define MSI_MAX_PROPS   20

Definition at line 482 of file msipriv.h.

◆ MSI_MINORVERSION

#define MSI_MINORVERSION   5

Definition at line 730 of file msipriv.h.

◆ MSI_OPEN_CREATE

#define MSI_OPEN_CREATE   3

Definition at line 102 of file msipriv.h.

◆ MSI_OPEN_CREATEDIRECT

#define MSI_OPEN_CREATEDIRECT   4

Definition at line 103 of file msipriv.h.

◆ MSI_OPEN_DIRECT

#define MSI_OPEN_DIRECT   2

Definition at line 101 of file msipriv.h.

◆ MSI_OPEN_PATCHFILE

#define MSI_OPEN_PATCHFILE   32

Definition at line 104 of file msipriv.h.

◆ MSI_OPEN_READONLY

#define MSI_OPEN_READONLY   0

Definition at line 99 of file msipriv.h.

◆ MSI_OPEN_TRANSACT

#define MSI_OPEN_TRANSACT   1

Definition at line 100 of file msipriv.h.

◆ MSICABEXTRACT_BEGINEXTRACT

#define MSICABEXTRACT_BEGINEXTRACT   0x01

Definition at line 1095 of file msipriv.h.

◆ MSICABEXTRACT_FILEEXTRACTED

#define MSICABEXTRACT_FILEEXTRACTED   0x02

Definition at line 1096 of file msipriv.h.

◆ MSIHANDLE_MAGIC

#define MSIHANDLE_MAGIC   0x4d434923

Definition at line 736 of file msipriv.h.

◆ MSIHANDLETYPE_ANY

#define MSIHANDLETYPE_ANY   0

Definition at line 721 of file msipriv.h.

◆ MSIHANDLETYPE_DATABASE

#define MSIHANDLETYPE_DATABASE   1

Definition at line 722 of file msipriv.h.

◆ MSIHANDLETYPE_PACKAGE

#define MSIHANDLETYPE_PACKAGE   5

Definition at line 726 of file msipriv.h.

◆ MSIHANDLETYPE_PREVIEW

#define MSIHANDLETYPE_PREVIEW   6

Definition at line 727 of file msipriv.h.

◆ MSIHANDLETYPE_RECORD

#define MSIHANDLETYPE_RECORD   4

Definition at line 725 of file msipriv.h.

◆ MSIHANDLETYPE_SUMMARYINFO

#define MSIHANDLETYPE_SUMMARYINFO   2

Definition at line 723 of file msipriv.h.

◆ MSIHANDLETYPE_VIEW

#define MSIHANDLETYPE_VIEW   3

Definition at line 724 of file msipriv.h.

◆ MSITYPE_IS_BINARY

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

Definition at line 62 of file msipriv.h.

◆ MSITYPE_KEY

#define MSITYPE_KEY   0x2000

Definition at line 52 of file msipriv.h.

◆ MSITYPE_LOCALIZABLE

#define MSITYPE_LOCALIZABLE   0x200

Definition at line 49 of file msipriv.h.

◆ MSITYPE_NULLABLE

#define MSITYPE_NULLABLE   0x1000

Definition at line 51 of file msipriv.h.

◆ MSITYPE_STRING

#define MSITYPE_STRING   0x0800

Definition at line 50 of file msipriv.h.

◆ MSITYPE_TEMPORARY

#define MSITYPE_TEMPORARY   0x4000

Definition at line 53 of file msipriv.h.

◆ MSITYPE_UNKNOWN

#define MSITYPE_UNKNOWN   0x8000

Definition at line 54 of file msipriv.h.

◆ MSITYPE_VALID

#define MSITYPE_VALID   0x0100

Definition at line 48 of file msipriv.h.

◆ SEQUENCE_EXEC

#define SEQUENCE_EXEC   0x2

Definition at line 719 of file msipriv.h.

◆ SEQUENCE_UI

#define SEQUENCE_UI   0x1

Definition at line 718 of file msipriv.h.

◆ SQUASHED_GUID_SIZE

#define SQUASHED_GUID_SIZE   33

Definition at line 734 of file msipriv.h.

◆ WINE_OPENPACKAGEFLAGS_RECACHE

#define WINE_OPENPACKAGEFLAGS_RECACHE   0x80000000

Definition at line 883 of file msipriv.h.

Typedef Documentation

◆ column_info

◆ ComponentList

◆ FeatureList

◆ FolderList

◆ msi_dialog

Definition at line 361 of file msipriv.h.

◆ msi_file_state

◆ MSIAPPID

◆ MSIASSEMBLY

◆ MSIBINARY

◆ MSICABINETSTREAM

◆ MSICLASS

◆ MSICOMPONENT

◆ MSIDATABASE

◆ MSIEXTENSION

◆ MSIFEATURE

◆ MSIFIELD

◆ MSIFILE

◆ MSIFILEPATCH

◆ MSIFOLDER

◆ msihandledestructor

typedef VOID(* msihandledestructor) (MSIOBJECTHDR *)

Definition at line 73 of file msipriv.h.

◆ MSIITERHANDLE

Definition at line 229 of file msipriv.h.

◆ MSIMEDIADISK

◆ MSIMEDIAINFO

◆ MSIMIME

Definition at line 670 of file msipriv.h.

◆ MSIOBJECTHDR

Definition at line 71 of file msipriv.h.

◆ MSIPACKAGE

◆ MSIPATCHINFO

◆ MSIPREVIEW

◆ MSIPROGID

Definition at line 647 of file msipriv.h.

◆ MSIQUERY

◆ MSIRECORD

◆ MSISOURCELISTINFO

◆ MSISTREAM

◆ MSISUMMARYINFO

◆ MSITABLE

Definition at line 65 of file msipriv.h.

◆ MSITRANSFORM

◆ MSIVERB

◆ MSIVIEW

Definition at line 125 of file msipriv.h.

◆ MSIVIEWOPS

◆ PMSICABEXTRACTCB

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

Definition at line 1093 of file msipriv.h.

◆ record_func

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

Definition at line 865 of file msipriv.h.

◆ string_table

Definition at line 68 of file msipriv.h.

◆ tid_t

typedef enum tid_t tid_t

Enumeration Type Documentation

◆ _msi_file_state

Enumerator
msifs_invalid 
msifs_missing 
msifs_overwrite 
msifs_present 
msifs_installed 
msifs_skipped 
msifs_hashmatch 

Definition at line 593 of file msipriv.h.

◆ clr_version

Enumerator
CLR_VERSION_V10 
CLR_VERSION_V11 
CLR_VERSION_V20 
CLR_VERSION_V40 
CLR_VERSION_MAX 

Definition at line 373 of file msipriv.h.

◆ folder_state

Enumerator
FOLDER_STATE_UNINITIALIZED 
FOLDER_STATE_EXISTS 
FOLDER_STATE_CREATED 
FOLDER_STATE_CREATED_PERSISTENT 
FOLDER_STATE_REMOVED 

Definition at line 563 of file msipriv.h.

◆ platform

Enumerator
PLATFORM_UNRECOGNIZED 
PLATFORM_INTEL 
PLATFORM_INTEL64 
PLATFORM_X64 
PLATFORM_ARM 
PLATFORM_ARM64 

Definition at line 363 of file msipriv.h.

◆ script

Enumerator
SCRIPT_NONE 
SCRIPT_INSTALL 
SCRIPT_COMMIT 
SCRIPT_ROLLBACK 
SCRIPT_MAX 

Definition at line 382 of file msipriv.h.

383 {
384  SCRIPT_NONE = -1,
385  SCRIPT_INSTALL = 0,
386  SCRIPT_COMMIT = 1,
387  SCRIPT_ROLLBACK = 2,
388  SCRIPT_MAX = 3
389 };

◆ tid_t

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

Definition at line 1118 of file msipriv.h.

1118  {
1119  Database_tid,
1120  Installer_tid,
1121  Record_tid,
1122  Session_tid,
1125  View_tid,
1126  LAST_tid
1127 } tid_t;
tid_t
Definition: msipriv.h:1118

Function Documentation

◆ ACTION_AppSearch()

UINT ACTION_AppSearch ( MSIPACKAGE package)

Definition at line 1071 of file appsearch.c.

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

◆ ACTION_CCPSearch()

UINT ACTION_CCPSearch ( MSIPACKAGE package)

Definition at line 1118 of file appsearch.c.

1119 {
1120  MSIQUERY *view;
1121  UINT r;
1122 
1123  if (msi_action_is_unique(package, L"CCPSearch"))
1124  {
1125  TRACE("Skipping AppSearch action: already done in UI sequence\n");
1126  return ERROR_SUCCESS;
1127  }
1128  else
1129  msi_register_unique_action(package, L"CCPSearch");
1130 
1131  r = MSI_OpenQuery(package->db, &view, L"SELECT * FROM `CCPSearch`");
1132  if (r != ERROR_SUCCESS)
1133  return ERROR_SUCCESS;
1134 
1136  msiobj_release(&view->hdr);
1137  return r;
1138 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:131
UINT WINAPIV MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
Definition: msiquery.c:138
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT ITERATE_CCPSearch(MSIRECORD *row, LPVOID param)
Definition: appsearch.c:1093
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:113

◆ ACTION_CustomAction()

UINT ACTION_CustomAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 1460 of file custom.c.

1461 {
1462  UINT rc = ERROR_SUCCESS;
1463  MSIRECORD *row;
1464  UINT type;
1465  const WCHAR *source, *target, *ptr, *deferred_data = NULL;
1466  WCHAR *deformated = NULL;
1467  int len;
1468 
1469  /* deferred action: [properties]Action */
1470  if ((ptr = wcsrchr(action, ']')))
1471  {
1472  deferred_data = action;
1473  action = ptr + 1;
1474  }
1475 
1476  row = MSI_QueryGetRecord( package->db, L"SELECT * FROM `CustomAction` WHERE `Action` = '%s'", action );
1477  if (!row)
1479 
1483 
1484  TRACE("Handling custom action %s (%x %s %s)\n",debugstr_w(action),type,
1486 
1487  /* handle some of the deferred actions */
1489  FIXME("msidbCustomActionTypeTSAware not handled\n");
1490 
1492  {
1494  WARN("msidbCustomActionTypeNoImpersonate not handled\n");
1495 
1496  if (!action_type_matches_script(type, package->script))
1497  {
1498  rc = defer_custom_action( package, action, type );
1499  goto end;
1500  }
1501  else
1502  {
1503  LPWSTR actiondata = msi_dup_property( package->db, action );
1504 
1506  package->scheduled_action_running = TRUE;
1507 
1509  package->commit_action_running = TRUE;
1510 
1512  package->rollback_action_running = TRUE;
1513 
1514  if (deferred_data)
1515  set_deferred_action_props(package, deferred_data);
1516  else if (actiondata)
1517  msi_set_property( package->db, L"CustomActionData", actiondata, -1 );
1518  else
1519  msi_set_property( package->db, L"CustomActionData", L"", -1 );
1520 
1521  msi_free(actiondata);
1522  }
1523  }
1524  else if (!check_execution_scheduling_options(package,action,type))
1525  {
1526  rc = ERROR_SUCCESS;
1527  goto end;
1528  }
1529 
1530  switch (type & CUSTOM_ACTION_TYPE_MASK)
1531  {
1532  case 1: /* DLL file stored in a Binary table stream */
1533  rc = HANDLE_CustomType1( package, source, target, type, action );
1534  break;
1535  case 2: /* EXE file stored in a Binary table stream */
1536  rc = HANDLE_CustomType2( package, source, target, type, action );
1537  break;
1538  case 5:
1539  case 6: /* JScript/VBScript file stored in a Binary table stream */
1540  rc = HANDLE_CustomType5_6( package, source, target, type, action );
1541  break;
1542  case 7: /* Concurrent install from substorage */
1543  deformat_string( package, target, &deformated );
1544  rc = HANDLE_CustomType7( package, source, target, type, action );
1545  msi_free( deformated );
1546  break;
1547  case 17:
1548  rc = HANDLE_CustomType17( package, source, target, type, action );
1549  break;
1550  case 18: /* EXE file installed with package */
1551  rc = HANDLE_CustomType18( package, source, target, type, action );
1552  break;
1553  case 19: /* Error that halts install */
1554  rc = HANDLE_CustomType19( package, source, target, type, action );
1555  break;
1556  case 21: /* JScript/VBScript file installed with the product */
1557  case 22:
1558  rc = HANDLE_CustomType21_22( package, source, target, type, action );
1559  break;
1560  case 23: /* Installs another package in the source tree */
1561  deformat_string( package, target, &deformated );
1562  rc = HANDLE_CustomType23( package, source, deformated, type, action );
1563  msi_free( deformated );
1564  break;
1565  case 34: /* EXE to be run in specified directory */
1566  rc = HANDLE_CustomType34( package, source, target, type, action );
1567  break;
1568  case 35: /* Directory set with formatted text */
1569  deformat_string( package, target, &deformated );
1570  MSI_SetTargetPathW( package, source, deformated );
1571  msi_free( deformated );
1572  break;
1573  case 37: /* JScript/VBScript text stored in target column */
1574  case 38:
1575  rc = HANDLE_CustomType37_38( package, source, target, type, action );
1576  break;
1577  case 50: /* EXE file specified by a property value */
1578  rc = HANDLE_CustomType50( package, source, target, type, action );
1579  break;
1580  case 51: /* Property set with formatted text */
1581  if (!source) break;
1582  len = deformat_string( package, target, &deformated );
1583  rc = msi_set_property( package->db, source, deformated, len );
1584  if (rc == ERROR_SUCCESS && !wcscmp( source, L"SourceDir" )) msi_reset_source_folders( package );
1585  msi_free( deformated );
1586  break;
1587  case 53: /* JScript/VBScript text specified by a property value */
1588  case 54:
1589  rc = HANDLE_CustomType53_54( package, source, target, type, action );
1590  break;
1591  default:
1592  FIXME( "unhandled action type %u (%s %s)\n", type & CUSTOM_ACTION_TYPE_MASK, debugstr_w(source),
1593  debugstr_w(target) );
1594  }
1595 
1596 end:
1597  package->scheduled_action_running = FALSE;
1598  package->commit_action_running = FALSE;
1599  package->rollback_action_running = FALSE;
1600  msiobj_release(&row->hdr);
1601  return rc;
1602 }
static UINT HANDLE_CustomType17(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:963
static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR action, UINT options)
Definition: custom.c:142
static UINT HANDLE_CustomType18(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:983
#define CUSTOM_ACTION_TYPE_MASK
Definition: custom.c:51
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT HANDLE_CustomType53_54(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1389
#define TRUE
Definition: types.h:120
#define WARN(fmt,...)
Definition: debug.h:112
static void msi_free(void *mem)
Definition: msipriv.h:1159
static UINT HANDLE_CustomType1(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:861
static UINT HANDLE_CustomType19(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1001
#define L(x)
Definition: ntvdm.h:50
static UINT HANDLE_CustomType34(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1174
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static PVOID ptr
Definition: dispmode.c:27
unsigned char rollback_action_running
Definition: msipriv.h:468
#define ERROR_FUNCTION_NOT_CALLED
Definition: winerror.h:984
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:433
static void set_deferred_action_props(MSIPACKAGE *package, const WCHAR *deferred_data)
Definition: custom.c:199
static UINT HANDLE_CustomType50(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1156
unsigned char commit_action_running
Definition: msipriv.h:467
MSIRECORD *WINAPIV MSI_QueryGetRecord(MSIDATABASE *db, LPCWSTR query,...) DECLSPEC_HIDDEN
Definition: msiquery.c:201
DWORD deformat_string(MSIPACKAGE *package, const WCHAR *fmt, WCHAR **data)
Definition: format.c:1016
#define TRACE(s)
Definition: solgame.cpp:4
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder, LPCWSTR szFolderPath)
Definition: install.c:564
__wchar_t WCHAR
Definition: xmlstorage.h:180
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
static UINT HANDLE_CustomType2(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:944
GLuint GLuint end
Definition: gl.h:1545
static UINT defer_custom_action(MSIPACKAGE *package, const WCHAR *action, UINT type)
Definition: custom.c:1423
static UINT HANDLE_CustomType5_6(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1282
GLenum GLsizei len
Definition: glext.h:6722
#define wcsrchr
Definition: compat.h:16
unsigned char scheduled_action_running
Definition: msipriv.h:466
static UINT HANDLE_CustomType23(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1043
static UINT HANDLE_CustomType7(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1122
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
Definition: record.c:213
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
const WCHAR * action
Definition: action.c:7479
GLsizei GLsizei GLchar * source
Definition: glext.h:6048
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int) DECLSPEC_HIDDEN
Definition: package.c:2100
static BOOL action_type_matches_script(UINT type, UINT script)
Definition: custom.c:1405
GLenum target
Definition: glext.h:7315
static UINT HANDLE_CustomType21_22(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1330
static UINT HANDLE_CustomType37_38(MSIPACKAGE *package, const WCHAR *source, const WCHAR *target, INT type, const WCHAR *action)
Definition: custom.c:1271
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
WCHAR * LPWSTR
Definition: xmlstorage.h:184
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2283
void msi_reset_source_folders(MSIPACKAGE *package) DECLSPEC_HIDDEN
Definition: package.c:2089

Referenced by ACTION_HandleCustomAction().

◆ ACTION_DialogBox()

INT ACTION_DialogBox ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_DuplicateFiles()

UINT ACTION_DuplicateFiles ( MSIPACKAGE package)

Definition at line 1336 of file files.c.

1337 {
1338  MSIQUERY *view;
1339  UINT rc;
1340 
1341  if (package->script == SCRIPT_NONE)
1342  return msi_schedule_action(package, SCRIPT_INSTALL, L"DuplicateFiles");
1343 
1344  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `DuplicateFile`", &view);
1345  if (rc != ERROR_SUCCESS)
1346  return ERROR_SUCCESS;
1347 
1349  msiobj_release(&view->hdr);
1350  return rc;
1351 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT ITERATE_DuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1275
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_FindRelatedProducts()

UINT ACTION_FindRelatedProducts ( MSIPACKAGE package)

Definition at line 217 of file upgrade.c.

218 {
219  MSIQUERY *view;
220  UINT rc;
221 
222  if (msi_get_property_int(package->db, L"Installed", 0))
223  {
224  TRACE("Skipping FindRelatedProducts action: product already installed\n");
225  return ERROR_SUCCESS;
226  }
227  if (msi_action_is_unique(package, L"FindRelatedProducts"))
228  {
229  TRACE("Skipping FindRelatedProducts action: already done in UI sequence\n");
230  return ERROR_SUCCESS;
231  }
232  else
233  msi_register_unique_action(package, L"FindRelatedProducts");
234 
235  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Upgrade`", &view);
236  if (rc != ERROR_SUCCESS)
237  return ERROR_SUCCESS;
238 
240  msiobj_release(&view->hdr);
241  return rc;
242 }
#define ERROR_SUCCESS
Definition: deptool.c:10
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
BOOL msi_action_is_unique(const MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:131
#define L(x)
Definition: ntvdm.h:50
#define TRACE(s)
Definition: solgame.cpp:4
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
static UINT ITERATE_FindRelatedProducts(MSIRECORD *rec, LPVOID param)
Definition: upgrade.c:115
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_register_unique_action(MSIPACKAGE *package, const WCHAR *action)
Definition: custom.c:113
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_FinishCustomActions()

void ACTION_FinishCustomActions ( const MSIPACKAGE package)

Definition at line 1604 of file custom.c.

1605 {
1606  struct list *item;
1607  HANDLE *wait_handles;
1608  unsigned int handle_count, i;
1610 
1611  while ((item = list_head( &package->RunningActions )))
1612  {
1614 
1615  list_remove( &action->entry );
1616 
1617  TRACE("waiting for %s\n", debugstr_w( action->name ) );
1618  msi_dialog_check_messages( action->handle );
1619 
1620  CloseHandle( action->handle );
1621  msi_free( action->name );
1622  msi_free( action );
1623  }
1624 
1626 
1627  handle_count = list_count( &msi_pending_custom_actions );
1628  wait_handles = msi_alloc( handle_count * sizeof(HANDLE) );
1629 
1630  handle_count = 0;
1632  {
1633  if (info->package == package )
1634  {
1635  if (DuplicateHandle(GetCurrentProcess(), info->handle, GetCurrentProcess(), &wait_handles[handle_count], SYNCHRONIZE, FALSE, 0))
1636  handle_count++;
1637  }
1638  }
1639 
1641 
1642  for (i = 0; i < handle_count; i++)
1643  {
1644  msi_dialog_check_messages( wait_handles[i] );
1645  CloseHandle( wait_handles[i] );
1646  }
1647  msi_free( wait_handles );
1648 
1651  {
1652  if (info->package == package)
1654  }
1656 }
#define CloseHandle
Definition: compat.h:598
struct list RunningActions
Definition: msipriv.h:440
static void msi_free(void *mem)
Definition: msipriv.h:1159
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
#define FALSE
Definition: types.h:117
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
static struct _test_info info[]
Definition: SetCursorPos.c:19
#define debugstr_w
Definition: kernel32.h:32
static void free_custom_action_data(msi_custom_action_info *info)
Definition: custom.c:395
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define TRACE(s)
Definition: solgame.cpp:4
static CRITICAL_SECTION msi_custom_action_cs
Definition: custom.c:63
uint32_t entry
Definition: isohybrid.c:63
#define GetCurrentProcess()
Definition: compat.h:618
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:7479
static ATOM item
Definition: dde.c:856
const char cursor[]
Definition: icontest.c:13
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
static struct list msi_pending_custom_actions
Definition: custom.c:73
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define LIST_ENTRY(type)
Definition: queue.h:175
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:4052

Referenced by MSI_InstallPackage().

◆ ACTION_ForceReboot()

UINT ACTION_ForceReboot ( MSIPACKAGE package)

Definition at line 5183 of file action.c.

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

Referenced by custom_get_thread_return(), and ITERATE_Actions().

◆ ACTION_InstallFiles()

UINT ACTION_InstallFiles ( MSIPACKAGE package)

Definition at line 556 of file files.c.

557 {
558  MSIMEDIAINFO *mi;
559  UINT rc = ERROR_SUCCESS;
560  MSIFILE *file;
561 
562  msi_set_sourcedir_props(package, FALSE);
563 
564  if (package->script == SCRIPT_NONE)
565  return msi_schedule_action(package, SCRIPT_INSTALL, L"InstallFiles");
566 
567  schedule_install_files(package);
568  mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
569 
570  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
571  {
572  BOOL is_global_assembly = msi_is_global_assembly( file->Component );
573 
574  msi_file_update_ui( package, file, L"InstallFiles" );
575 
576  rc = msi_load_media_info( package, file->Sequence, mi );
577  if (rc != ERROR_SUCCESS)
578  {
579  ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
581  goto done;
582  }
583 
584  if (file->state != msifs_hashmatch &&
585  file->state != msifs_skipped &&
586  (file->state != msifs_present || !msi_get_property_int( package->db, L"Installed", 0 )) &&
587  (rc = ready_media( package, file->IsCompressed, mi )))
588  {
589  ERR("Failed to ready media for %s\n", debugstr_w(file->File));
590  goto done;
591  }
592 
593  if (file->state != msifs_missing && !mi->is_continuous && file->state != msifs_overwrite)
594  continue;
595 
596  if (file->Sequence > mi->last_sequence || mi->is_continuous ||
597  (file->IsCompressed && !mi->is_extracted))
598  {
600  MSIFILE *cursor = file;
601 
602  data.mi = mi;
603  data.package = package;
604  data.cb = installfiles_cb;
605  data.user = &cursor;
606 
607  if (file->IsCompressed && !msi_cabextract(package, mi, &data))
608  {
609  ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
611  goto done;
612  }
613  }
614 
615  if (!file->IsCompressed)
616  {
618 
619  TRACE("copying %s to %s\n", debugstr_w(source), debugstr_w(file->TargetPath));
620 
621  if (!is_global_assembly)
622  {
623  create_directory(package, file->Component->Directory);
624  }
625  rc = copy_install_file(package, file, source);
626  if (rc != ERROR_SUCCESS)
627  {
628  ERR("Failed to copy %s to %s (%u)\n", debugstr_w(source), debugstr_w(file->TargetPath), rc);
630  msi_free(source);
631  goto done;
632  }
633  if (!is_global_assembly) file->state = msifs_installed;
634  msi_free(source);
635  }
636  else if (!is_global_assembly && file->state != msifs_installed &&
637  !(file->Attributes & msidbFileAttributesPatchAdded))
638  {
639  ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
641  goto done;
642  }
643  }
644  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
645  {
646  MSICOMPONENT *comp = file->Component;
647 
648  if (!msi_is_global_assembly( comp ) || comp->assembly->installed ||
649  (file->state != msifs_missing && file->state != msifs_overwrite)) continue;
650 
651  rc = msi_install_assembly( package, comp );
652  if (rc != ERROR_SUCCESS)
653  {
654  ERR("Failed to install assembly\n");
656  break;
657  }
658  file->state = msifs_installed;
659  }
660 
661 done:
663  return rc;
664 }
static void schedule_install_files(MSIPACKAGE *package)
Definition: files.c:379
UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
Definition: media.c:689
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:540
int msi_get_property_int(MSIDATABASE *package, LPCWSTR prop, int def) DECLSPEC_HIDDEN
Definition: package.c:2305
UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
Definition: action.c:354
BOOL msi_is_global_assembly(MSICOMPONENT *comp)
Definition: action.c:2037
static MONITORINFO mi
Definition: win.c:7338
static void msi_free(void *mem)
Definition: msipriv.h:1159
UINT ready_media(MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
Definition: media.c:850
struct list files
Definition: msipriv.h:403
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
static UINT create_directory(MSIPACKAGE *package, const WCHAR *dir)
Definition: files.c:467
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
const char file[]
Definition: icontest.c:11
MSIDATABASE * db
Definition: msipriv.h:394
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:242
UINT msi_install_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:411
BOOL installed
Definition: msipriv.h:518
uint32_t entry
Definition: isohybrid.c:63
#define ERR(fmt,...)
Definition: debug.h:110
const char cursor[]
Definition: icontest.c:13
unsigned int UINT
Definition: ndis.h:50
WCHAR * msi_resolve_file_source(MSIPACKAGE *package, MSIFILE *file)
Definition: files.c:528
static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
Definition: files.c:408
BOOL msi_cabextract(MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
Definition: media.c:652
void msi_free_media_info(MSIMEDIAINFO *mi)
Definition: media.c:661
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR filename, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:497
Definition: fci.c:126

◆ ACTION_MoveFiles()

UINT ACTION_MoveFiles ( MSIPACKAGE package)

Definition at line 1206 of file files.c.

1207 {
1208  MSIQUERY *view;
1209  UINT rc;
1210 
1211  if (package->script == SCRIPT_NONE)
1212  return msi_schedule_action(package, SCRIPT_INSTALL, L"MoveFiles");
1213 
1214  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `MoveFile`", &view);
1215  if (rc != ERROR_SUCCESS)
1216  return ERROR_SUCCESS;
1217 
1218  rc = MSI_IterateRecords(view, NULL, ITERATE_MoveFiles, package);
1219  msiobj_release(&view->hdr);
1220  return rc;
1221 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static UINT ITERATE_MoveFiles(MSIRECORD *rec, LPVOID param)
Definition: files.c:1080
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_MsiPublishAssemblies()

UINT ACTION_MsiPublishAssemblies ( MSIPACKAGE package)

Definition at line 595 of file assembly.c.

596 {
597  MSICOMPONENT *comp;
598 
599  if (package->script == SCRIPT_NONE)
600  return msi_schedule_action(package, SCRIPT_INSTALL, L"MsiPublishAssemblies");
601 
603  {
604  LONG res;
605  HKEY hkey;
606  GUID guid;
607  DWORD size;
608  WCHAR buffer[43];
609  MSIRECORD *uirow;
610  MSIASSEMBLY *assembly = comp->assembly;
611  BOOL win32;
612 
613  if (!assembly || !comp->ComponentId) continue;
614 
615  comp->Action = msi_get_component_action( package, comp );
616  if (comp->Action != INSTALLSTATE_LOCAL)
617  {
618  TRACE("component not scheduled for installation %s\n", debugstr_w(comp->Component));
619  continue;
620  }
621  TRACE("publishing %s\n", debugstr_w(comp->Component));
622 
623  CLSIDFromString( package->ProductCode, &guid );
625  buffer[20] = '>';
626  CLSIDFromString( comp->ComponentId, &guid );
627  encode_base85_guid( &guid, buffer + 21 );
628  buffer[42] = 0;
629 
630  win32 = assembly->attributes & msidbAssemblyAttributesWin32;
631  if (assembly->application)
632  {
633  MSIFILE *file = msi_get_loaded_file( package, assembly->application );
634  if (!file)
635  {
636  WARN("no matching file %s for local assembly\n", debugstr_w(assembly->application));
637  continue;
638  }
639  if ((res = open_local_assembly_key( package->Context, win32, file->TargetPath, &hkey )))
640  {
641  WARN( "failed to open local assembly key %ld\n", res );
642  return ERROR_FUNCTION_FAILED;
643  }
644  }
645  else
646  {
647  if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
648  {
649  WARN( "failed to open global assembly key %ld\n", res );
650  return ERROR_FUNCTION_FAILED;
651  }
652  }
653  size = sizeof(buffer);
654  if ((res = RegSetValueExW( hkey, assembly->display_name, 0, REG_MULTI_SZ, (const BYTE *)buffer, size )))
655  {
656  WARN( "failed to set assembly value %ld\n", res );
657  }
658  RegCloseKey( hkey );
659 
660  uirow = MSI_CreateRecord( 2 );
661  MSI_RecordSetStringW( uirow, 2, assembly->display_name );
663  msiobj_release( &uirow->hdr );
664  }
665  return ERROR_SUCCESS;
666 }
LPWSTR ProductCode
Definition: msipriv.h:448
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:540
MSIOBJECTHDR hdr
Definition: msipriv.h:151
#define WARN(fmt,...)
Definition: debug.h:112
GLuint buffer
Definition: glext.h:5915
INSTALLSTATE Action
Definition: msipriv.h:533
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:611
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
const GUID * guid
#define L(x)
Definition: ntvdm.h:50
#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:535
unsigned int BOOL
Definition: ntddk_ex.h:94
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:1914
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:574
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4899
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
LPWSTR Component
Definition: msipriv.h:525
struct list components
Definition: msipriv.h:401
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
uint32_t entry
Definition: isohybrid.c:63
unsigned char BYTE
Definition: xxhash.c:193
LPWSTR ComponentId
Definition: msipriv.h:526
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
Definition: assembly.c:575
UINT Context
Definition: msipriv.h:459
GLuint res
Definition: glext.h:9613
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
#define RegCloseKey(hKey)
Definition: registry.h:47
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
BOOL encode_base85_guid(GUID *, LPWSTR) DECLSPEC_HIDDEN
Definition: registry.c:165
Definition: fci.c:126

◆ ACTION_MsiUnpublishAssemblies()

UINT ACTION_MsiUnpublishAssemblies ( MSIPACKAGE package)

Definition at line 668 of file assembly.c.

669 {
670  MSICOMPONENT *comp;
671 
672  if (package->script == SCRIPT_NONE)
673  return msi_schedule_action(package, SCRIPT_INSTALL, L"MsiUnpublishAssemblies");
674 
676  {
677  LONG res;
678  MSIRECORD *uirow;
679  MSIASSEMBLY *assembly = comp->assembly;
680  BOOL win32;
681 
682  if (!assembly || !comp->ComponentId) continue;
683 
684  comp->Action = msi_get_component_action( package, comp );
685  if (comp->Action != INSTALLSTATE_ABSENT)
686  {
687  TRACE("component not scheduled for removal %s\n", debugstr_w(comp->Component));
688  continue;
689  }
690  TRACE("unpublishing %s\n", debugstr_w(comp->Component));
691 
692  win32 = assembly->attributes & msidbAssemblyAttributesWin32;
693  if (assembly->application)
694  {
695  MSIFILE *file = msi_get_loaded_file( package, assembly->application );
696  if (!file)
697  {
698  WARN("no matching file %s for local assembly\n", debugstr_w(assembly->application));
699  continue;
700  }
701  if ((res = delete_local_assembly_key( package->Context, win32, file->TargetPath )))
702  WARN( "failed to delete local assembly key %ld\n", res );
703  }
704  else
705  {
706  HKEY hkey;
707  if ((res = open_global_assembly_key( package->Context, win32, &hkey )))
708  WARN( "failed to delete global assembly key %ld\n", res );
709  else
710  {
711  if ((res = RegDeleteValueW( hkey, assembly->display_name )))
712  WARN( "failed to delete global assembly value %ld\n", res );
713  RegCloseKey( hkey );
714  }
715  }
716 
717  uirow = MSI_CreateRecord( 2 );
718  MSI_RecordSetStringW( uirow, 2, assembly->display_name );
720  msiobj_release( &uirow->hdr );
721  }
722  return ERROR_SUCCESS;
723 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:540
MSIOBJECTHDR hdr
Definition: msipriv.h:151
#define WARN(fmt,...)
Definition: debug.h:112
INSTALLSTATE Action
Definition: msipriv.h:533
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:611
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
Definition: action.c:574
#define TRACE(s)
Definition: solgame.cpp:4
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
LPWSTR Component
Definition: msipriv.h:525
struct list components
Definition: msipriv.h:401
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
uint32_t entry
Definition: isohybrid.c:63
static LONG delete_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename)
Definition: assembly.c:555
LPWSTR ComponentId
Definition: msipriv.h:526
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2355
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
Definition: assembly.c:575
UINT Context
Definition: msipriv.h:459
GLuint res
Definition: glext.h:9613
#define RegCloseKey(hKey)
Definition: registry.h:47
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
Definition: fci.c:126

◆ ACTION_PatchFiles()

UINT ACTION_PatchFiles ( MSIPACKAGE package)

Definition at line 784 of file files.c.

785 {
786  MSIFILEPATCH *patch;
787  MSIMEDIAINFO *mi;
788  UINT rc = ERROR_SUCCESS;
789 
790  TRACE("%p\n", package);
791 
792  if (package->script == SCRIPT_NONE)
793  return msi_schedule_action(package, SCRIPT_INSTALL, L"PatchFiles");
794 
795  mi = msi_alloc_zero( sizeof(MSIMEDIAINFO) );
796 
797  TRACE("extracting files\n");
798 
799  LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry )
800  {
801  MSIFILE *file = patch->File;
802  MSICOMPONENT *comp = file->Component;
803 
804  rc = msi_load_media_info( package, patch->Sequence, mi );
805  if (rc != ERROR_SUCCESS)
806  {
807  ERR("Unable to load media info for %s (%u)\n", debugstr_w(file->File), rc);
809  goto done;
810  }
811  comp->Action = msi_get_component_action( package, comp );
812  if (!comp->Enabled || comp->Action != INSTALLSTATE_LOCAL) continue;
813 
814  if (!patch->extracted)
815  {
817  MSIFILEPATCH *cursor = patch;
818 
819  rc = ready_media( package, TRUE, mi );
820  if (rc != ERROR_SUCCESS)
821  {
822  ERR("Failed to ready media for %s\n", debugstr_w(file->File));
823  goto done;
824  }
825  data.mi = mi;
826  data.package = package;
827  data.cb = patchfiles_cb;
828  data.user = &cursor;
829 
830  if (!msi_cabextract( package, mi, &data ))
831  {
832  ERR("Failed to extract cabinet: %s\n", debugstr_w(mi->cabinet));
834  goto done;
835  }
836  }
837  }
838 
839  TRACE("applying patches\n");
840 
841  LIST_FOR_EACH_ENTRY( patch, &package->filepatches, MSIFILEPATCH, entry )
842  {
843  MSICOMPONENT *comp = patch->File->Component;
844 
845  if (!patch->path) continue;
846 
847  if (msi_is_global_assembly( comp ))
848  rc = patch_assembly( package, comp->assembly, patch );
849  else
850  rc = patch_file( package, patch );
851 
852  if (rc && !(patch->Attributes & msidbPatchAttributesNonVital))
853  {
854  ERR("Failed to apply patch to file: %s\n", debugstr_w(patch->File->File));
855  break;
856  }
857 
858  if (msi_is_global_assembly( comp ))
859  {
860  if ((rc = msi_install_assembly( package, comp )))
861  {
862  ERR("Failed to install patched assembly\n");
863  break;
864  }
865  }
866  }
867 
868 done:
870  return rc;
871 }
UINT msi_load_media_info(MSIPACKAGE *package, UINT Sequence, MSIMEDIAINFO *mi)
Definition: media.c:689
enum script script
Definition: msipriv.h:432
BOOL extracted
Definition: msipriv.h:630
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:540
#define TRUE
Definition: types.h:120
BOOL msi_is_global_assembly(MSICOMPONENT *comp)
Definition: action.c:2037
LPWSTR File
Definition: msipriv.h:606
static MONITORINFO mi
Definition: win.c:7338
INSTALLSTATE Action
Definition: msipriv.h:533
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:611
UINT ready_media(MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi)
Definition: media.c:850
MSIFILE * File
Definition: msipriv.h:626
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1148
static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action, LPWSTR *path, DWORD *attrs, PVOID user)
Definition: files.c:678
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
WCHAR * path
Definition: msipriv.h:632
#define TRACE(s)
Definition: solgame.cpp:4
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
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:411
uint32_t entry
Definition: isohybrid.c:63
#define ERR(fmt,...)
Definition: debug.h:110
MSICOMPONENT * Component
Definition: msipriv.h:607
const char cursor[]
Definition: icontest.c:13
unsigned int UINT
Definition: ndis.h:50
BOOL msi_cabextract(MSIPACKAGE *package, MSIMEDIAINFO *mi, LPVOID data)
Definition: media.c:652
void msi_free_media_info(MSIMEDIAINFO *mi)
Definition: media.c:661
struct list filepatches
Definition: msipriv.h:404
static UINT patch_assembly(MSIPACKAGE *package, MSIASSEMBLY *assembly, MSIFILEPATCH *patch)
Definition: files.c:734
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
Definition: fci.c:126
static UINT patch_file(MSIPACKAGE *package, MSIFILEPATCH *patch)
Definition: files.c:712

◆ ACTION_PerformAction()

UINT ACTION_PerformAction ( MSIPACKAGE package,
const WCHAR action 
)

Definition at line 7610 of file action.c.

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

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

◆ ACTION_RegisterClassInfo()

UINT ACTION_RegisterClassInfo ( MSIPACKAGE package)

Definition at line 690 of file classes.c.

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

◆ ACTION_RegisterExtensionInfo()

UINT ACTION_RegisterExtensionInfo ( MSIPACKAGE package)

Definition at line 1196 of file classes.c.

1197 {
1198  HKEY hkey = NULL;
1199  MSIEXTENSION *ext;
1200  MSIRECORD *uirow;
1201  BOOL install_on_demand = TRUE;
1202  LONG res;
1203  UINT r;
1204 
1205  if (package->script == SCRIPT_NONE)
1206  return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterExtensionInfo" );
1207 
1208  r = load_classes_and_such( package );
1209  if (r != ERROR_SUCCESS)
1210  return r;
1211 
1212  /* We need to set install_on_demand based on if the shell handles advertised
1213  * shortcuts and the like. Because Mike McCormack is working on this i am
1214  * going to default to TRUE
1215  */
1216 
1218  {
1219  LPWSTR extension;
1221 
1222  if (!ext->Component)
1223  continue;
1224 
1225  if (!ext->Component->Enabled)
1226  {
1227  TRACE("component is disabled\n");
1228  continue;
1229  }
1230 
1231  feature = ext->Feature;
1232  if (!feature)
1233  continue;
1234 
1235  /*
1236  * yes. MSDN says that these are based on _Feature_ not on
1237  * Component. So verify the feature is to be installed
1238  */
1239  feature->Action = msi_get_feature_action( package, feature );
1240  if (feature->Action != INSTALLSTATE_LOCAL &&
1241  !(install_on_demand && feature->Action == INSTALLSTATE_ADVERTISED))
1242  {
1243  TRACE("feature %s not scheduled for installation, skipping registration of extension %s\n",
1244  debugstr_w(feature->Feature), debugstr_w(ext->Extension));
1245  continue;
1246  }
1247  TRACE("Registering extension %s (%p)\n", debugstr_w(ext->Extension), ext);
1248 
1249  ext->action = INSTALLSTATE_LOCAL;
1250 
1251  extension = msi_alloc( (lstrlenW( ext->Extension ) + 2) * sizeof(WCHAR) );
1252  if (extension)
1253  {
1254  extension[0] = '.';
1255  lstrcpyW( extension + 1, ext->Extension );
1256  res = RegCreateKeyW( HKEY_CLASSES_ROOT, extension, &hkey );
1257  msi_free( extension );
1258  if (res != ERROR_SUCCESS)
1259  WARN("failed to create extension key %ld\n", res);
1260  }
1261 
1262  if (ext->Mime)
1263  msi_reg_set_val_str( hkey, L"Content Type", ext->Mime->ContentType );
1264 
1265  if (ext->ProgID || ext->ProgIDText)
1266  {
1267  HKEY hkey2;
1268  LPWSTR newkey;
1269  LPCWSTR progid;
1270  MSIVERB *verb;
1271  INT Sequence = MSI_NULL_INTEGER;
1272 
1273  if (ext->ProgID)
1274  progid = ext->ProgID->ProgID;
1275  else
1276  progid = ext->ProgIDText;
1277 
1278  msi_reg_set_val_str( hkey, NULL, progid );
1279 
1280  newkey = msi_alloc( (lstrlenW(progid) + lstrlenW(L"\\ShellNew") + 1) * sizeof(WCHAR));
1281 
1282  lstrcpyW(newkey, progid);
1283  lstrcatW(newkey, L"\\ShellNew");
1284  RegCreateKeyW(hkey, newkey, &hkey2);
1285  RegCloseKey(hkey2);
1286 
1287  msi_free(newkey);
1288 
1289  /* do all the verbs */
1290  LIST_FOR_EACH_ENTRY( verb, &ext->verbs, MSIVERB, entry )
1291  {
1292  register_verb( package, progid, ext->Component,
1293  ext, verb, &Sequence);
1294  }
1295  }
1296 
1297  RegCloseKey(hkey);
1298 
1299  uirow = MSI_CreateRecord(1);
1300  MSI_RecordSetStringW( uirow, 1, ext->Extension );
1302  msiobj_release(&uirow->hdr);
1303  }
1304  return ERROR_SUCCESS;
1305 }
INTERNETFEATURELIST feature
Definition: misc.c:1719
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
INSTALLSTATE msi_get_feature_action(MSIPACKAGE *package, MSIFEATURE *feature)
Definition: action.c:627
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TRUE
Definition: types.h:120
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WARN(fmt,...)
Definition: debug.h:112
#define MSI_NULL_INTEGER
Definition: msiquery.h:32
static void msi_free(void *mem)
Definition: msipriv.h:1159
static UINT register_verb(MSIPACKAGE *package, LPCWSTR progid, MSICOMPONENT *component, const MSIEXTENSION *extension, MSIVERB *verb, INT *Sequence)
Definition: classes.c:1124
#define lstrlenW
Definition: compat.h:609
int32_t INT
Definition: typedefs.h:58
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:631
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
char ext[3]
Definition: mkdosfs.c:358
LONG msi_reg_set_val_str(HKEY hkey, LPCWSTR name, LPCWSTR value) DECLSPEC_HIDDEN
Definition: registry.c:209
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
uint32_t entry
Definition: isohybrid.c:63
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1199
struct list extensions
Definition: msipriv.h:427
#define lstrcpyW
Definition: compat.h:608
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
GLuint res
Definition: glext.h:9613
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
#define progid(str)
Definition: exdisp.idl:31
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define RegCloseKey(hKey)
Definition: registry.h:47
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90

◆ ACTION_RegisterFonts()

UINT ACTION_RegisterFonts ( MSIPACKAGE package)

Definition at line 276 of file font.c.

277 {
278  MSIQUERY *view;
279  UINT rc;
280 
281  if (package->script == SCRIPT_NONE)
282  return msi_schedule_action(package, SCRIPT_INSTALL, L"RegisterFonts");
283 
284  rc = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `Font`", &view);
285  if (rc != ERROR_SUCCESS)
286  return ERROR_SUCCESS;
287 
289  msiobj_release(&view->hdr);
290  return rc;
291 }
static UINT ITERATE_RegisterFonts(MSIRECORD *row, LPVOID param)
Definition: font.c:212
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RegisterMIMEInfo()

UINT ACTION_RegisterMIMEInfo ( MSIPACKAGE package)

Definition at line 1392 of file classes.c.

1393 {
1394  MSIRECORD *uirow;
1395  MSIMIME *mt;
1396  UINT r;
1397 
1398  if (package->script == SCRIPT_NONE)
1399  return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterMIMEInfo" );
1400 
1401  r = load_classes_and_such( package );
1402  if (r != ERROR_SUCCESS)
1403  return r;
1404 
1405  LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry )
1406  {
1407  LPWSTR extension = NULL, key;
1408 
1409  /*
1410  * check if the MIME is to be installed. Either as requested by an
1411  * extension or Class
1412  */
1413  if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) &&
1414  (!mt->Extension || mt->Extension->action != INSTALLSTATE_LOCAL))
1415  {
1416  TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType));
1417  continue;
1418  }
1419 
1420  TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType));
1421 
1422  if (mt->Extension) extension = msi_alloc( (lstrlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) );
1423  key = msi_alloc( (lstrlenW( mt->ContentType ) +
1424  lstrlenW( L"MIME\\Database\\Content Type\\" ) + 1) * sizeof(WCHAR) );
1425 
1426  if (extension && key)
1427  {
1428  extension[0] = '.';
1429  lstrcpyW( extension + 1, mt->Extension->Extension );
1430 
1431  lstrcpyW( key, L"MIME\\Database\\Content Type\\" );
1432  lstrcatW( key, mt->ContentType );
1433  msi_reg_set_subkey_val( HKEY_CLASSES_ROOT, key, L"Extension", extension );
1434 
1435  if (mt->clsid)
1437  }
1438  msi_free( extension );
1439  msi_free( key );
1440 
1441  uirow = MSI_CreateRecord( 2 );
1442  MSI_RecordSetStringW( uirow, 1, mt->ContentType );
1443  MSI_RecordSetStringW( uirow, 2, mt->suffix );
1445  msiobj_release( &uirow->hdr );
1446  }
1447  return ERROR_SUCCESS;
1448 }
LONG msi_reg_set_subkey_val(HKEY hkey, LPCWSTR path, LPCWSTR name, LPCWSTR val) DECLSPEC_HIDDEN
Definition: registry.c:230
MSICLASS * Class
Definition: msipriv.h:715
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
MSIEXTENSION * Extension
Definition: msipriv.h:712
INSTALLSTATE action
Definition: msipriv.h:682
static void msi_free(void *mem)
Definition: msipriv.h:1159
#define lstrlenW
Definition: compat.h:609
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:631
LPWSTR suffix
Definition: msipriv.h:713
LPWSTR clsid
Definition: msipriv.h:714
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
struct list mimes
Definition: msipriv.h:429
LPWSTR Extension
Definition: msipriv.h:675
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
HKEY key
Definition: reg.c:28
uint32_t entry
Definition: isohybrid.c:63
#define lstrcpyW
Definition: compat.h:608
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1142
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LPWSTR ContentType
Definition: msipriv.h:711
INSTALLSTATE action
Definition: msipriv.h:667
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
Definition: copy.c:22

◆ ACTION_RegisterProgIdInfo()

UINT ACTION_RegisterProgIdInfo ( MSIPACKAGE package)

Definition at line 1026 of file classes.c.

1027 {
1028  MSIPROGID *progid;
1029  MSIRECORD *uirow;
1030  UINT r;
1031 
1032  if (package->script == SCRIPT_NONE)
1033  return msi_schedule_action( package, SCRIPT_INSTALL, L"RegisterProgIdInfo" );
1034 
1035  r = load_classes_and_such( package );
1036  if (r != ERROR_SUCCESS)
1037  return r;
1038 
1040  {
1042  {
1043  TRACE("progid %s not scheduled to be installed\n", debugstr_w(progid->ProgID));
1044  continue;
1045  }
1046  TRACE("Registering progid %s\n", debugstr_w(progid->ProgID));
1047 
1049 
1050  uirow = MSI_CreateRecord( 1 );
1051  MSI_RecordSetStringW( uirow, 1, progid->ProgID );
1053  msiobj_release( &uirow->hdr );
1054  }
1055  return ERROR_SUCCESS;
1056 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:631
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
#define TRACE(s)
Definition: solgame.cpp:4
struct list progids
Definition: msipriv.h:428
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
uint32_t entry
Definition: isohybrid.c:63
static UINT register_progid(const MSIPROGID *progid)
Definition: classes.c:964
unsigned int UINT
Definition: ndis.h:50
static BOOL has_one_extension_installed(const MSIPACKAGE *package, const MSIPROGID *progid)
Definition: classes.c:1015
#define progid(str)
Definition: exdisp.idl:31
static BOOL has_class_installed(const MSIPROGID *progid)
Definition: classes.c:1008
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90

◆ ACTION_RemoveDuplicateFiles()

UINT ACTION_RemoveDuplicateFiles ( MSIPACKAGE package)

Definition at line 1411 of file files.c.

1412 {
1413  MSIQUERY *view;
1414  UINT rc;
1415 
1416  if (package->script == SCRIPT_NONE)
1417  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveDuplicateFiles");
1418 
1419  rc = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `DuplicateFile`", &view );
1420  if (rc != ERROR_SUCCESS)
1421  return ERROR_SUCCESS;
1422 
1424  msiobj_release( &view->hdr );
1425  return rc;
1426 }
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
#define L(x)
Definition: ntvdm.h:50
MSIDATABASE * db
Definition: msipriv.h:394
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static IOleDocumentView * view
Definition: activex.c:1749
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
static UINT ITERATE_RemoveDuplicateFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1353
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_RemoveFiles()

UINT ACTION_RemoveFiles ( MSIPACKAGE package)

Definition at line 1549 of file files.c.

1550 {
1551  MSIQUERY *view;
1552  MSICOMPONENT *comp;
1553  MSIFILE *file;
1554  UINT r;
1555 
1556  if (package->script == SCRIPT_NONE)
1557  return msi_schedule_action(package, SCRIPT_INSTALL, L"RemoveFiles");
1558 
1559  r = MSI_DatabaseOpenViewW(package->db, L"SELECT * FROM `RemoveFile`", &view);
1560  if (r == ERROR_SUCCESS)
1561  {
1563  msiobj_release(&view->hdr);
1564  if (r != ERROR_SUCCESS)
1565  return r;
1566  }
1567 
1568  LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
1569  {
1570  MSIRECORD *uirow;
1571  VS_FIXEDFILEINFO *ver;
1572 
1573  comp = file->Component;
1574  msi_file_update_ui( package, file, L"RemoveFiles" );
1575 
1576  comp->Action = msi_get_component_action( package, comp );
1577  if (comp->Action != INSTALLSTATE_ABSENT || comp->Installed == INSTALLSTATE_SOURCE)
1578  continue;
1579 
1580  if (comp->assembly && !comp->assembly->application)
1581  continue;
1582 
1584  {
1585  TRACE("permanent component, not removing file\n");
1586  continue;
1587  }
1588 
1589  if (file->Version)
1590  {
1591  ver = msi_get_disk_file_version( package, file->TargetPath );
1592  if (ver && msi_compare_file_versions( ver, file->Version ) > 0)
1593  {
1594  TRACE("newer version detected, not removing file\n");
1595  msi_free( ver );
1596  continue;
1597  }
1598  msi_free( ver );
1599  }
1600 
1601  if (file->state == msifs_installed)
1602  WARN("removing installed file %s\n", debugstr_w(file->TargetPath));
1603 
1604  TRACE("removing %s\n", debugstr_w(file->File) );
1605 
1606  msi_set_file_attributes( package, file->TargetPath, FILE_ATTRIBUTE_NORMAL );
1607  if (!msi_delete_file( package, file->TargetPath ))
1608  {
1609  WARN( "failed to delete %s (%lu)\n", debugstr_w(file->TargetPath), GetLastError() );
1610  }
1611  file->state = msifs_missing;
1612 
1613  uirow = MSI_CreateRecord( 9 );
1614  MSI_RecordSetStringW( uirow, 1, file->FileName );
1615  MSI_RecordSetStringW( uirow, 9, comp->Directory );
1617  msiobj_release( &uirow->hdr );
1618  }
1619 
1620  LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
1621  {
1622  comp->Action = msi_get_component_action( package, comp );
1623  if (comp->Action != INSTALLSTATE_ABSENT) continue;
1624 
1626  {
1627  TRACE("permanent component, not removing directory\n");
1628  continue;
1629  }
1630  if (comp->assembly && !comp->assembly->application)
1631  msi_uninstall_assembly( package, comp );
1632  else
1633  {
1634  MSIFOLDER *folder = msi_get_loaded_folder( package, comp->Directory );
1635  if (folder) remove_folder( folder );
1636  }
1637  }
1638  return ERROR_SUCCESS;
1639 }
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
Definition: fci.c:115
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIASSEMBLY * assembly
Definition: msipriv.h:540
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define WARN(fmt,...)
Definition: debug.h:112
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
static void msi_free(void *mem)
Definition: msipriv.h:1159
INSTALLSTATE Action
Definition: msipriv.h:533
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: action.c:611
struct list files
Definition: msipriv.h:403
BOOL msi_delete_file(MSIPACKAGE *package, const WCHAR *filename)
Definition: files.c:70
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
BOOL msi_set_file_attributes(MSIPACKAGE *package, const WCHAR *filename, DWORD attrs)
Definition: files.c:97
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
VS_FIXEDFILEINFO * msi_get_disk_file_version(MSIPACKAGE *package, const WCHAR *filename)
Definition: files.c:161
static void remove_folder(MSIFOLDER *folder)
Definition: files.c:1535
#define TRACE(s)
Definition: solgame.cpp:4
LPWSTR Directory
Definition: msipriv.h:527
const char file[]
Definition: icontest.c:11
MSIDATABASE * db
Definition: msipriv.h:394
MSIFOLDER * msi_get_loaded_folder(MSIPACKAGE *package, const WCHAR *dir)
Definition: action.c:585
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
struct list components
Definition: msipriv.h:401
static void msi_file_update_ui(MSIPACKAGE *package, MSIFILE *f, const WCHAR *action)
Definition: files.c:242
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
Definition: record.c:76
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
uint32_t entry
Definition: isohybrid.c:63
UINT msi_uninstall_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
Definition: assembly.c:456
LPWSTR application
Definition: msipriv.h:514
int msi_compare_file_versions(VS_FIXEDFILEINFO *fi, const WCHAR *version)
Definition: action.c:1930
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
INSTALLSTATE Installed
Definition: msipriv.h:531
static IOleDocumentView * view
Definition: activex.c:1749
static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
Definition: files.c:1452
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
Definition: msiquery.c:163
UINT msi_schedule_action(MSIPACKAGE *package, UINT script, const WCHAR *action)
Definition: custom.c:90
Definition: fci.c:126
UINT MSI_DatabaseOpenViewW(MSIDATABASE *, LPCWSTR, MSIQUERY **) DECLSPEC_HIDDEN

◆ ACTION_ShowDialog()

INT ACTION_ShowDialog ( MSIPACKAGE ,
LPCWSTR   
)

◆ ACTION_UnregisterClassInfo()

UINT ACTION_UnregisterClassInfo ( MSIPACKAGE package)

Definition at line 857 of file classes.c.

858 {
860  MSIRECORD *uirow;
861  MSICLASS *cls;
862  HKEY hkey, hkey2;
863  UINT r;
864 
865  if (package->script == SCRIPT_NONE)
866  return msi_schedule_action( package, SCRIPT_INSTALL, L"UnregisterClassInfo" );
867 
868  r = load_classes_and_such( package );
869  if (r != ERROR_SUCCESS)
870  return r;
871 
872  if (package->platform == PLATFORM_INTEL)
874  else
876 
877  if (RegCreateKeyExW( HKEY_CLASSES_ROOT, L"CLSID", 0, NULL, 0, access, NULL, &hkey, NULL ))
878  return ERROR_FUNCTION_FAILED;
879 
880  LIST_FOR_EACH_ENTRY( cls, &package->classes, MSICLASS, entry )
881  {
883  MSICOMPONENT *comp;
885  LONG res;
886 
887  comp = cls->Component;
888  if (!comp)
889  continue;
890 
891  if (!comp->Enabled)
892  {
893  TRACE("component is disabled\n");
894  continue;
895  }
896 
897  feature = cls->Feature;
898  if (!feature)
899  continue;
900 
901  feature->Action = msi_get_feature_action( package, feature );
902  if (feature->Action != INSTALLSTATE_ABSENT)
903  {
904  TRACE("feature %s not scheduled for removal, skipping unregistration of class %s\n",
905  debugstr_w(feature->Feature), debugstr_w(cls->clsid));
906  continue;
907  }
908  TRACE("Unregistering class %s (%p)\n", debugstr_w(cls->clsid), cls);
909 
911 
912  res = RegDeleteTreeW( hkey, cls->clsid );
913  if (res != ERROR_SUCCESS)
914  WARN("failed to delete class key %ld\n", res);
915 
916  if (cls->AppID)
917  {
918  res = RegOpenKeyW( HKEY_CLASSES_ROOT, L"AppID", &hkey2 );
919  if (res == ERROR_SUCCESS)
920  {
921  res = RegDeleteKeyW( hkey2, cls->AppID->AppID );
922  if (res != ERROR_SUCCESS)
923  WARN("failed to delete appid key %ld\n", res);
924  RegCloseKey( hkey2 );
925  }
926  }
927  if (cls->FileTypeMask)
928  {
929  filetype = msi_alloc( (lstrlenW( L"FileType\\" ) + lstrlenW( cls->clsid ) + 1) * sizeof(WCHAR) );
930  if (filetype)
931  {
932  lstrcpyW( filetype, L"FileType\\" );
933  lstrcatW( filetype, cls->clsid );
935  msi_free( filetype );
936 
937  if (res != ERROR_SUCCESS)
938  WARN("failed to delete file type %ld\n", res);
939  }
940  }
941 
942  uirow = MSI_CreateRecord( 1 );
943  MSI_RecordSetStringW( uirow, 1, cls->clsid );
945  msiobj_release( &uirow->hdr );
946  }
947  RegCloseKey( hkey );
948  return ERROR_SUCCESS;
949 }
INTERNETFEATURELIST feature
Definition: misc.c:1719
enum platform platform
Definition: msipriv.h:396
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
Definition: record.c:597
INSTALLSTATE msi_get_feature_action(MSIPACKAGE *package, MSIFEATURE *feature)
Definition: action.c:627
enum script script
Definition: msipriv.h:432
#define ERROR_SUCCESS
Definition: deptool.c:10
MSIFEATURE * Feature
Definition: msipriv.h:664
MSIOBJECTHDR hdr
Definition: msipriv.h:151
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
MSICOMPONENT * Component
Definition: msipriv.h:654
#define WARN(fmt,...)
Definition: debug.h:112
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1237
static void msi_free(void *mem)
Definition: msipriv.h:1159
LPWSTR AppID
Definition: msipriv.h:638
#define lstrlenW
Definition: compat.h:609
LPWSTR FileTypeMask
Definition: msipriv.h:659
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1091
static UINT load_classes_and_such(MSIPACKAGE *package)
Definition: classes.c:631
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define L(x)
Definition: ntvdm.h:50
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
long LONG
Definition: pedump.c:60
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3291
#define debugstr_w
Definition: kernel32.h:32
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
Definition: package.c:1914
#define KEY_WOW64_64KEY
Definition: cmtypes.h:46
#define TRACE(s)
Definition: solgame.cpp:4
struct list classes
Definition: msipriv.h:426
__wchar_t WCHAR
Definition: xmlstorage.h:180
Definition: