Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1528 lines
68 KiB

  1. /*****************************************************************************\
  2. * *
  3. * msi.h - - Interface for external access to Installer Service *
  4. * *
  5. * Version 2.0 *
  6. * *
  7. * NOTES: All buffers sizes are TCHAR count, null included only on input *
  8. * Return argument pointers may be null if not interested in value *
  9. * *
  10. * Copyright (c) 1996-2001, Microsoft Corp. All rights reserved. *
  11. * *
  12. \*****************************************************************************/
  13. #ifndef _MSI_H_
  14. #define _MSI_H_
  15. #ifndef _WIN32_MSI
  16. #if (_WIN32_WINNT >= 0x0501)
  17. #define _WIN32_MSI 200
  18. #elif (_WIN32_WINNT >= 0x0500)
  19. #define _WIN32_MSI 110
  20. #else
  21. #define _WIN32_MSI 100
  22. #endif //_WIN32_WINNT
  23. #endif // !_WIN32_MSI
  24. #if (_WIN32_MSI >= 150)
  25. #ifndef _MSI_NO_CRYPTO
  26. #include "wincrypt.h"
  27. #endif // _MSI_NO_CRYPTO
  28. #endif //(_WIN32_MSI >= 150)
  29. // --------------------------------------------------------------------------
  30. // Installer generic handle definitions
  31. // --------------------------------------------------------------------------
  32. typedef unsigned long MSIHANDLE; // abstract generic handle, 0 == no handle
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36. // Close a open handle of any type
  37. // All handles obtained from API calls must be closed when no longer needed
  38. // Normally succeeds, returning TRUE.
  39. UINT WINAPI MsiCloseHandle(MSIHANDLE hAny);
  40. // Close all handles open in the process, a diagnostic call
  41. // This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
  42. // Can be called at termination to assure that all handles have been closed
  43. // Returns 0 if all handles have been close, else number of open handles
  44. UINT WINAPI MsiCloseAllHandles();
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #ifdef __cplusplus
  49. // C++ wrapper object to automatically free handle when going out of scope
  50. class PMSIHANDLE
  51. {
  52. MSIHANDLE m_h;
  53. public:
  54. PMSIHANDLE():m_h(0){}
  55. PMSIHANDLE(MSIHANDLE h):m_h(h){}
  56. ~PMSIHANDLE(){if (m_h!=0) MsiCloseHandle(m_h);}
  57. void operator =(MSIHANDLE h) {if (m_h) MsiCloseHandle(m_h); m_h=h;}
  58. operator MSIHANDLE() {return m_h;}
  59. MSIHANDLE* operator &() {if (m_h) MsiCloseHandle(m_h); m_h = 0; return &m_h;}
  60. };
  61. #endif //__cplusplus
  62. // Install message type for callback is a combination of the following:
  63. // A message box style: MB_*, where MB_OK is the default
  64. // A message box icon type: MB_ICON*, where no icon is the default
  65. // A default button: MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
  66. // One of the following install message types, no default
  67. typedef enum tagINSTALLMESSAGE
  68. {
  69. INSTALLMESSAGE_FATALEXIT = 0x00000000L, // premature termination, possibly fatal OOM
  70. INSTALLMESSAGE_ERROR = 0x01000000L, // formatted error message
  71. INSTALLMESSAGE_WARNING = 0x02000000L, // formatted warning message
  72. INSTALLMESSAGE_USER = 0x03000000L, // user request message
  73. INSTALLMESSAGE_INFO = 0x04000000L, // informative message for log
  74. INSTALLMESSAGE_FILESINUSE = 0x05000000L, // list of files in use that need to be replaced
  75. INSTALLMESSAGE_RESOLVESOURCE = 0x06000000L, // request to determine a valid source location
  76. INSTALLMESSAGE_OUTOFDISKSPACE = 0x07000000L, // insufficient disk space message
  77. INSTALLMESSAGE_ACTIONSTART = 0x08000000L, // start of action: action name & description
  78. INSTALLMESSAGE_ACTIONDATA = 0x09000000L, // formatted data associated with individual action item
  79. INSTALLMESSAGE_PROGRESS = 0x0A000000L, // progress gauge info: units so far, total
  80. INSTALLMESSAGE_COMMONDATA = 0x0B000000L, // product info for dialog: language Id, dialog caption
  81. INSTALLMESSAGE_INITIALIZE = 0x0C000000L, // sent prior to UI initialization, no string data
  82. INSTALLMESSAGE_TERMINATE = 0x0D000000L, // sent after UI termination, no string data
  83. INSTALLMESSAGE_SHOWDIALOG = 0x0E000000L, // sent prior to display or authored dialog or wizard
  84. } INSTALLMESSAGE;
  85. // external error handler supplied to installation API functions
  86. typedef int (WINAPI *INSTALLUI_HANDLERA)(LPVOID pvContext, UINT iMessageType, LPCSTR szMessage);
  87. // external error handler supplied to installation API functions
  88. typedef int (WINAPI *INSTALLUI_HANDLERW)(LPVOID pvContext, UINT iMessageType, LPCWSTR szMessage);
  89. #ifdef UNICODE
  90. #define INSTALLUI_HANDLER INSTALLUI_HANDLERW
  91. #else
  92. #define INSTALLUI_HANDLER INSTALLUI_HANDLERA
  93. #endif // !UNICODE
  94. typedef enum tagINSTALLUILEVEL
  95. {
  96. INSTALLUILEVEL_NOCHANGE = 0, // UI level is unchanged
  97. INSTALLUILEVEL_DEFAULT = 1, // default UI is used
  98. INSTALLUILEVEL_NONE = 2, // completely silent installation
  99. INSTALLUILEVEL_BASIC = 3, // simple progress and error handling
  100. INSTALLUILEVEL_REDUCED = 4, // authored UI, wizard dialogs suppressed
  101. INSTALLUILEVEL_FULL = 5, // authored UI with wizards, progress, errors
  102. INSTALLUILEVEL_ENDDIALOG = 0x80, // display success/failure dialog at end of install
  103. INSTALLUILEVEL_PROGRESSONLY = 0x40, // display only progress dialog
  104. INSTALLUILEVEL_HIDECANCEL = 0x20, // do not display the cancel button in basic UI
  105. INSTALLUILEVEL_SOURCERESONLY = 0x100, // force display of source resolution even if quiet
  106. } INSTALLUILEVEL;
  107. typedef enum tagINSTALLSTATE
  108. {
  109. INSTALLSTATE_NOTUSED = -7, // component disabled
  110. INSTALLSTATE_BADCONFIG = -6, // configuration data corrupt
  111. INSTALLSTATE_INCOMPLETE = -5, // installation suspended or in progress
  112. INSTALLSTATE_SOURCEABSENT = -4, // run from source, source is unavailable
  113. INSTALLSTATE_MOREDATA = -3, // return buffer overflow
  114. INSTALLSTATE_INVALIDARG = -2, // invalid function argument
  115. INSTALLSTATE_UNKNOWN = -1, // unrecognized product or feature
  116. INSTALLSTATE_BROKEN = 0, // broken
  117. INSTALLSTATE_ADVERTISED = 1, // advertised feature
  118. INSTALLSTATE_REMOVED = 1, // component being removed (action state, not settable)
  119. INSTALLSTATE_ABSENT = 2, // uninstalled (or action state absent but clients remain)
  120. INSTALLSTATE_LOCAL = 3, // installed on local drive
  121. INSTALLSTATE_SOURCE = 4, // run from source, CD or net
  122. INSTALLSTATE_DEFAULT = 5, // use default, local or source
  123. } INSTALLSTATE;
  124. typedef enum tagUSERINFOSTATE
  125. {
  126. USERINFOSTATE_MOREDATA = -3, // return buffer overflow
  127. USERINFOSTATE_INVALIDARG = -2, // invalid function argument
  128. USERINFOSTATE_UNKNOWN = -1, // unrecognized product
  129. USERINFOSTATE_ABSENT = 0, // user info and PID not initialized
  130. USERINFOSTATE_PRESENT = 1, // user info and PID initialized
  131. } USERINFOSTATE;
  132. typedef enum tagINSTALLLEVEL
  133. {
  134. INSTALLLEVEL_DEFAULT = 0, // install authored default
  135. INSTALLLEVEL_MINIMUM = 1, // install only required features
  136. INSTALLLEVEL_MAXIMUM = 0xFFFF, // install all features
  137. } INSTALLLEVEL; // intermediate levels dependent on authoring
  138. typedef enum tagREINSTALLMODE // bit flags
  139. {
  140. REINSTALLMODE_REPAIR = 0x00000001, // Reserved bit - currently ignored
  141. REINSTALLMODE_FILEMISSING = 0x00000002, // Reinstall only if file is missing
  142. REINSTALLMODE_FILEOLDERVERSION = 0x00000004, // Reinstall if file is missing, or older version
  143. REINSTALLMODE_FILEEQUALVERSION = 0x00000008, // Reinstall if file is missing, or equal or older version
  144. REINSTALLMODE_FILEEXACT = 0x00000010, // Reinstall if file is missing, or not exact version
  145. REINSTALLMODE_FILEVERIFY = 0x00000020, // checksum executables, reinstall if missing or corrupt
  146. REINSTALLMODE_FILEREPLACE = 0x00000040, // Reinstall all files, regardless of version
  147. REINSTALLMODE_MACHINEDATA = 0x00000080, // insure required machine reg entries
  148. REINSTALLMODE_USERDATA = 0x00000100, // insure required user reg entries
  149. REINSTALLMODE_SHORTCUT = 0x00000200, // validate shortcuts items
  150. REINSTALLMODE_PACKAGE = 0x00000400, // use re-cache source install package
  151. } REINSTALLMODE;
  152. typedef enum tagINSTALLOGMODE // bit flags for use with MsiEnableLog and MsiSetExternalUI
  153. {
  154. INSTALLLOGMODE_FATALEXIT = (1 << (INSTALLMESSAGE_FATALEXIT >> 24)),
  155. INSTALLLOGMODE_ERROR = (1 << (INSTALLMESSAGE_ERROR >> 24)),
  156. INSTALLLOGMODE_WARNING = (1 << (INSTALLMESSAGE_WARNING >> 24)),
  157. INSTALLLOGMODE_USER = (1 << (INSTALLMESSAGE_USER >> 24)),
  158. INSTALLLOGMODE_INFO = (1 << (INSTALLMESSAGE_INFO >> 24)),
  159. INSTALLLOGMODE_RESOLVESOURCE = (1 << (INSTALLMESSAGE_RESOLVESOURCE >> 24)),
  160. INSTALLLOGMODE_OUTOFDISKSPACE = (1 << (INSTALLMESSAGE_OUTOFDISKSPACE >> 24)),
  161. INSTALLLOGMODE_ACTIONSTART = (1 << (INSTALLMESSAGE_ACTIONSTART >> 24)),
  162. INSTALLLOGMODE_ACTIONDATA = (1 << (INSTALLMESSAGE_ACTIONDATA >> 24)),
  163. INSTALLLOGMODE_COMMONDATA = (1 << (INSTALLMESSAGE_COMMONDATA >> 24)),
  164. INSTALLLOGMODE_PROPERTYDUMP = (1 << (INSTALLMESSAGE_PROGRESS >> 24)), // log only
  165. INSTALLLOGMODE_VERBOSE = (1 << (INSTALLMESSAGE_INITIALIZE >> 24)), // log only
  166. INSTALLLOGMODE_PROGRESS = (1 << (INSTALLMESSAGE_PROGRESS >> 24)), // external handler only
  167. INSTALLLOGMODE_INITIALIZE = (1 << (INSTALLMESSAGE_INITIALIZE >> 24)), // external handler only
  168. INSTALLLOGMODE_TERMINATE = (1 << (INSTALLMESSAGE_TERMINATE >> 24)), // external handler only
  169. INSTALLLOGMODE_SHOWDIALOG = (1 << (INSTALLMESSAGE_SHOWDIALOG >> 24)), // external handler only
  170. } INSTALLLOGMODE;
  171. typedef enum tagINSTALLLOGATTRIBUTES // flag attributes for MsiEnableLog
  172. {
  173. INSTALLLOGATTRIBUTES_APPEND = (1 << 0),
  174. INSTALLLOGATTRIBUTES_FLUSHEACHLINE = (1 << 1),
  175. } INSTALLLOGATTRIBUTES;
  176. typedef enum tagINSTALLFEATUREATTRIBUTE // bit flags
  177. {
  178. INSTALLFEATUREATTRIBUTE_FAVORLOCAL = 1 << 0,
  179. INSTALLFEATUREATTRIBUTE_FAVORSOURCE = 1 << 1,
  180. INSTALLFEATUREATTRIBUTE_FOLLOWPARENT = 1 << 2,
  181. INSTALLFEATUREATTRIBUTE_FAVORADVERTISE = 1 << 3,
  182. INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE = 1 << 4,
  183. INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 << 5,
  184. } INSTALLFEATUREATTRIBUTE;
  185. typedef enum tagINSTALLMODE
  186. {
  187. INSTALLMODE_NOSOURCERESOLUTION = -3, // skip source resolution
  188. INSTALLMODE_NODETECTION = -2, // skip detection
  189. INSTALLMODE_EXISTING = -1, // provide, if available
  190. INSTALLMODE_DEFAULT = 0, // install, if absent
  191. } INSTALLMODE;
  192. #define MAX_FEATURE_CHARS 38 // maximum chars in feature name (same as string GUID)
  193. // Product info attributes: advertised information
  194. #define INSTALLPROPERTY_PACKAGENAME __TEXT("PackageName")
  195. #define INSTALLPROPERTY_TRANSFORMS __TEXT("Transforms")
  196. #define INSTALLPROPERTY_LANGUAGE __TEXT("Language")
  197. #define INSTALLPROPERTY_PRODUCTNAME __TEXT("ProductName")
  198. #define INSTALLPROPERTY_ASSIGNMENTTYPE __TEXT("AssignmentType")
  199. #if (_WIN32_MSI >= 150)
  200. #define INSTALLPROPERTY_INSTANCETYPE __TEXT("InstanceType")
  201. #endif //(_WIN32_MSI >= 150)
  202. #define INSTALLPROPERTY_PACKAGECODE __TEXT("PackageCode")
  203. #define INSTALLPROPERTY_VERSION __TEXT("Version")
  204. #if (_WIN32_MSI >= 110)
  205. #define INSTALLPROPERTY_PRODUCTICON __TEXT("ProductIcon")
  206. #endif //(_WIN32_MSI >= 110)
  207. // Product info attributes: installed information
  208. #define INSTALLPROPERTY_INSTALLEDPRODUCTNAME __TEXT("InstalledProductName")
  209. #define INSTALLPROPERTY_VERSIONSTRING __TEXT("VersionString")
  210. #define INSTALLPROPERTY_HELPLINK __TEXT("HelpLink")
  211. #define INSTALLPROPERTY_HELPTELEPHONE __TEXT("HelpTelephone")
  212. #define INSTALLPROPERTY_INSTALLLOCATION __TEXT("InstallLocation")
  213. #define INSTALLPROPERTY_INSTALLSOURCE __TEXT("InstallSource")
  214. #define INSTALLPROPERTY_INSTALLDATE __TEXT("InstallDate")
  215. #define INSTALLPROPERTY_PUBLISHER __TEXT("Publisher")
  216. #define INSTALLPROPERTY_LOCALPACKAGE __TEXT("LocalPackage")
  217. #define INSTALLPROPERTY_URLINFOABOUT __TEXT("URLInfoAbout")
  218. #define INSTALLPROPERTY_URLUPDATEINFO __TEXT("URLUpdateInfo")
  219. #define INSTALLPROPERTY_VERSIONMINOR __TEXT("VersionMinor")
  220. #define INSTALLPROPERTY_VERSIONMAJOR __TEXT("VersionMajor")
  221. typedef enum tagSCRIPTFLAGS
  222. {
  223. SCRIPTFLAGS_CACHEINFO = 0x00000001L, // set if the icons need to be created/ removed
  224. SCRIPTFLAGS_SHORTCUTS = 0x00000004L, // set if the shortcuts needs to be created/ deleted
  225. SCRIPTFLAGS_MACHINEASSIGN = 0x00000008L, // set if product to be assigned to machine
  226. SCRIPTFLAGS_REGDATA_CNFGINFO = 0x00000020L, // set if the product cnfg mgmt. registry data needs to be written/ removed
  227. SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST = 0x00000040L,
  228. #if (_WIN32_MSI >= 110)
  229. SCRIPTFLAGS_REGDATA_CLASSINFO = 0x00000080L, // set if COM classes related app info needs to be created/ deleted
  230. SCRIPTFLAGS_REGDATA_EXTENSIONINFO = 0x00000100L, // set if extension related app info needs to be created/ deleted
  231. SCRIPTFLAGS_REGDATA_APPINFO = SCRIPTFLAGS_REGDATA_CLASSINFO | SCRIPTFLAGS_REGDATA_EXTENSIONINFO, // for source level backward compatibility
  232. #else //_WIN32_MSI == 100
  233. SCRIPTFLAGS_REGDATA_APPINFO = 0x00000010L,
  234. #endif //(_WIN32_MSI >= 110)
  235. SCRIPTFLAGS_REGDATA = SCRIPTFLAGS_REGDATA_APPINFO | SCRIPTFLAGS_REGDATA_CNFGINFO, // for source level backward compatibility
  236. }SCRIPTFLAGS;
  237. typedef enum tagADVERTISEFLAGS
  238. {
  239. ADVERTISEFLAGS_MACHINEASSIGN = 0, // set if the product is to be machine assigned
  240. ADVERTISEFLAGS_USERASSIGN = 1, // set if the product is to be user assigned
  241. }ADVERTISEFLAGS;
  242. typedef enum tagINSTALLTYPE
  243. {
  244. INSTALLTYPE_DEFAULT = 0, // set to indicate default behavior
  245. INSTALLTYPE_NETWORK_IMAGE = 1, // set to indicate network install
  246. INSTALLTYPE_SINGLE_INSTANCE = 2, // set to indicate a particular instance
  247. }INSTALLTYPE;
  248. #if (_WIN32_MSI >= 150)
  249. typedef struct _MSIFILEHASHINFO {
  250. ULONG dwFileHashInfoSize;
  251. ULONG dwData [ 4 ];
  252. } MSIFILEHASHINFO, *PMSIFILEHASHINFO;
  253. typedef enum tagMSIARCHITECTUREFLAGS
  254. {
  255. MSIARCHITECTUREFLAGS_X86 = 0x00000001L, // set if creating the script for i386 platform
  256. MSIARCHITECTUREFLAGS_IA64 = 0x00000002L, // set if creating the script for IA64 platform
  257. }MSIARCHITECTUREFLAGS;
  258. typedef enum tagMSIOPENPACKAGEFLAGS
  259. {
  260. MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = 0x00000001L, // ignore the machine state when creating the engine
  261. }MSIOPENPACKAGEFLAGS;
  262. typedef enum tagMSIADVERTISEOPTIONFLAGS
  263. {
  264. MSIADVERTISEOPTIONFLAGS_INSTANCE = 0x00000001L, // set if advertising a new instance
  265. }MSIADVERTISEOPTIONFLAGS;
  266. #endif //(_WIN32_MSI >= 150)
  267. #ifdef __cplusplus
  268. extern "C" {
  269. #endif
  270. // --------------------------------------------------------------------------
  271. // Functions to set the UI handling and logging. The UI will be used for error,
  272. // progress, and log messages for all subsequent calls to Installer Service
  273. // API functions that require UI.
  274. // --------------------------------------------------------------------------
  275. // Enable internal UI
  276. INSTALLUILEVEL WINAPI MsiSetInternalUI(
  277. INSTALLUILEVEL dwUILevel, // UI level
  278. HWND *phWnd); // handle of owner window
  279. // Enable external UI handling, returns any previous handler or NULL if none.
  280. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  281. INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(
  282. INSTALLUI_HANDLERA puiHandler, // for progress and error handling
  283. DWORD dwMessageFilter, // bit flags designating messages to handle
  284. LPVOID pvContext); // application context
  285. INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(
  286. INSTALLUI_HANDLERW puiHandler, // for progress and error handling
  287. DWORD dwMessageFilter, // bit flags designating messages to handle
  288. LPVOID pvContext); // application context
  289. #ifdef UNICODE
  290. #define MsiSetExternalUI MsiSetExternalUIW
  291. #else
  292. #define MsiSetExternalUI MsiSetExternalUIA
  293. #endif // !UNICODE
  294. // Enable logging to a file for all install sessions for the client process,
  295. // with control over which log messages are passed to the specified log file.
  296. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  297. UINT WINAPI MsiEnableLogA(
  298. DWORD dwLogMode, // bit flags designating operations to report
  299. LPCSTR szLogFile, // log file, or NULL to disable logging
  300. DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
  301. UINT WINAPI MsiEnableLogW(
  302. DWORD dwLogMode, // bit flags designating operations to report
  303. LPCWSTR szLogFile, // log file, or NULL to disable logging
  304. DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
  305. #ifdef UNICODE
  306. #define MsiEnableLog MsiEnableLogW
  307. #else
  308. #define MsiEnableLog MsiEnableLogA
  309. #endif // !UNICODE
  310. // --------------------------------------------------------------------------
  311. // Functions to query and configure a product as a whole.
  312. // --------------------------------------------------------------------------
  313. // Return the installed state for a product
  314. INSTALLSTATE WINAPI MsiQueryProductStateA(
  315. LPCSTR szProduct);
  316. INSTALLSTATE WINAPI MsiQueryProductStateW(
  317. LPCWSTR szProduct);
  318. #ifdef UNICODE
  319. #define MsiQueryProductState MsiQueryProductStateW
  320. #else
  321. #define MsiQueryProductState MsiQueryProductStateA
  322. #endif // !UNICODE
  323. // Return product info
  324. UINT WINAPI MsiGetProductInfoA(
  325. LPCSTR szProduct, // product code
  326. LPCSTR szAttribute, // attribute name, case-sensitive
  327. LPSTR lpValueBuf, // returned value, NULL if not desired
  328. DWORD *pcchValueBuf); // in/out buffer character count
  329. UINT WINAPI MsiGetProductInfoW(
  330. LPCWSTR szProduct, // product code
  331. LPCWSTR szAttribute, // attribute name, case-sensitive
  332. LPWSTR lpValueBuf, // returned value, NULL if not desired
  333. DWORD *pcchValueBuf); // in/out buffer character count
  334. #ifdef UNICODE
  335. #define MsiGetProductInfo MsiGetProductInfoW
  336. #else
  337. #define MsiGetProductInfo MsiGetProductInfoA
  338. #endif // !UNICODE
  339. // Install a new product.
  340. // Either may be NULL, but the DATABASE property must be specfied
  341. UINT WINAPI MsiInstallProductA(
  342. LPCSTR szPackagePath, // location of package to install
  343. LPCSTR szCommandLine); // command line <property settings>
  344. UINT WINAPI MsiInstallProductW(
  345. LPCWSTR szPackagePath, // location of package to install
  346. LPCWSTR szCommandLine); // command line <property settings>
  347. #ifdef UNICODE
  348. #define MsiInstallProduct MsiInstallProductW
  349. #else
  350. #define MsiInstallProduct MsiInstallProductA
  351. #endif // !UNICODE
  352. // Install/uninstall an advertised or installed product
  353. // No action if installed and INSTALLSTATE_DEFAULT specified
  354. UINT WINAPI MsiConfigureProductA(
  355. LPCSTR szProduct, // product code
  356. int iInstallLevel, // how much of the product to install
  357. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  358. UINT WINAPI MsiConfigureProductW(
  359. LPCWSTR szProduct, // product code
  360. int iInstallLevel, // how much of the product to install
  361. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  362. #ifdef UNICODE
  363. #define MsiConfigureProduct MsiConfigureProductW
  364. #else
  365. #define MsiConfigureProduct MsiConfigureProductA
  366. #endif // !UNICODE
  367. // Install/uninstall an advertised or installed product
  368. // No action if installed and INSTALLSTATE_DEFAULT specified
  369. UINT WINAPI MsiConfigureProductExA(
  370. LPCSTR szProduct, // product code
  371. int iInstallLevel, // how much of the product to install
  372. INSTALLSTATE eInstallState, // local/source/default/absent/lock/uncache
  373. LPCSTR szCommandLine); // command line <property settings>
  374. UINT WINAPI MsiConfigureProductExW(
  375. LPCWSTR szProduct, // product code
  376. int iInstallLevel, // how much of the product to install
  377. INSTALLSTATE eInstallState, // local/source/default/absent/lock/uncache
  378. LPCWSTR szCommandLine); // command line <property settings>
  379. #ifdef UNICODE
  380. #define MsiConfigureProductEx MsiConfigureProductExW
  381. #else
  382. #define MsiConfigureProductEx MsiConfigureProductExA
  383. #endif // !UNICODE
  384. // Reinstall product, used to validate or correct problems
  385. UINT WINAPI MsiReinstallProductA(
  386. LPCSTR szProduct, // product code
  387. DWORD szReinstallMode); // one or more REINSTALLMODE modes
  388. UINT WINAPI MsiReinstallProductW(
  389. LPCWSTR szProduct, // product code
  390. DWORD szReinstallMode); // one or more REINSTALLMODE modes
  391. #ifdef UNICODE
  392. #define MsiReinstallProduct MsiReinstallProductW
  393. #else
  394. #define MsiReinstallProduct MsiReinstallProductA
  395. #endif // !UNICODE
  396. #if (_WIN32_MSI >= 150)
  397. // Output reg and shortcut info to script file for specified architecture for Assign or Publish
  398. // If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
  399. // If dwPlatform specifies a platform, then the script is created as if the current platform is the
  400. // platform specified in dwPlatform
  401. // If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance is advertised. Use of
  402. // this option requires that szTransforms include the instance transform that changes the product code
  403. UINT WINAPI MsiAdvertiseProductExA(
  404. LPCSTR szPackagePath, // location of package
  405. LPCSTR szScriptfilePath, // if NULL, product is locally advertised
  406. LPCSTR szTransforms, // list of transforms to be applied
  407. LANGID lgidLanguage, // install language
  408. DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that control for which platform
  409. // to create the script, ignored if szScriptfilePath is NULL
  410. DWORD dwOptions); // the MSIADVERTISEOPTIONSFLAGS that specify extra advertise parameters
  411. UINT WINAPI MsiAdvertiseProductExW(
  412. LPCWSTR szPackagePath, // location of package
  413. LPCWSTR szScriptfilePath, // if NULL, product is locally advertised
  414. LPCWSTR szTransforms, // list of transforms to be applied
  415. LANGID lgidLanguage, // install language
  416. DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that control for which platform
  417. // to create the script, ignored if szScriptfilePath is NULL
  418. DWORD dwOptions); // the MSIADVERTISEOPTIONSFLAGS that specify extra advertise parameters
  419. #ifdef UNICODE
  420. #define MsiAdvertiseProductEx MsiAdvertiseProductExW
  421. #else
  422. #define MsiAdvertiseProductEx MsiAdvertiseProductExA
  423. #endif // !UNICODE
  424. #endif // (_WIN32_MSI >= 150)
  425. // Output reg and shortcut info to script file for Assign or Publish
  426. UINT WINAPI MsiAdvertiseProductA(
  427. LPCSTR szPackagePath, // location of package
  428. LPCSTR szScriptfilePath, // if NULL, product is locally advertised
  429. LPCSTR szTransforms, // list of transforms to be applied
  430. LANGID lgidLanguage); // install language
  431. UINT WINAPI MsiAdvertiseProductW(
  432. LPCWSTR szPackagePath, // location of package
  433. LPCWSTR szScriptfilePath, // if NULL, product is locally advertised
  434. LPCWSTR szTransforms, // list of transforms to be applied
  435. LANGID lgidLanguage); // install language
  436. #ifdef UNICODE
  437. #define MsiAdvertiseProduct MsiAdvertiseProductW
  438. #else
  439. #define MsiAdvertiseProduct MsiAdvertiseProductA
  440. #endif // !UNICODE
  441. #if (_WIN32_MSI >= 150)
  442. // Process advertise script file into supplied locations
  443. // If an icon folder is specified, icon files will be placed there
  444. // If an registry key is specified, registry data will be mapped under it
  445. // If fShortcuts is TRUE, shortcuts will be created. If a special folder is
  446. // returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
  447. // if fRemoveItems is TRUE, items that are present will be removed
  448. UINT WINAPI MsiProcessAdvertiseScriptA(
  449. LPCSTR szScriptFile, // path to script from MsiAdvertiseProduct
  450. LPCSTR szIconFolder, // optional path to folder for icon files and transforms
  451. HKEY hRegData, // optional parent registry key
  452. BOOL fShortcuts, // TRUE if shortcuts output to special folder
  453. BOOL fRemoveItems); // TRUE if specified items are to be removed
  454. UINT WINAPI MsiProcessAdvertiseScriptW(
  455. LPCWSTR szScriptFile, // path to script from MsiAdvertiseProduct
  456. LPCWSTR szIconFolder, // optional path to folder for icon files and transforms
  457. HKEY hRegData, // optional parent registry key
  458. BOOL fShortcuts, // TRUE if shortcuts output to special folder
  459. BOOL fRemoveItems); // TRUE if specified items are to be removed
  460. #ifdef UNICODE
  461. #define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptW
  462. #else
  463. #define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptA
  464. #endif // !UNICODE
  465. #endif // (_WIN32_MSI >= 150)
  466. // Process advertise script file using the supplied dwFlags control flags
  467. // if fRemoveItems is TRUE, items that are present will be removed
  468. UINT WINAPI MsiAdvertiseScriptA(
  469. LPCSTR szScriptFile, // path to script from MsiAdvertiseProduct
  470. DWORD dwFlags, // the SCRIPTFLAGS bit flags that control the script execution
  471. PHKEY phRegData, // optional parent registry key
  472. BOOL fRemoveItems); // TRUE if specified items are to be removed
  473. UINT WINAPI MsiAdvertiseScriptW(
  474. LPCWSTR szScriptFile, // path to script from MsiAdvertiseProduct
  475. DWORD dwFlags, // the SCRIPTFLAGS bit flags that control the script execution
  476. PHKEY phRegData, // optional parent registry key
  477. BOOL fRemoveItems); // TRUE if specified items are to be removed
  478. #ifdef UNICODE
  479. #define MsiAdvertiseScript MsiAdvertiseScriptW
  480. #else
  481. #define MsiAdvertiseScript MsiAdvertiseScriptA
  482. #endif // !UNICODE
  483. // Return product info from an installer script file:
  484. // product code, language, version, readable name, path to package
  485. // Returns TRUE is success, FALSE if szScriptFile is not a valid script file
  486. UINT WINAPI MsiGetProductInfoFromScriptA(
  487. LPCSTR szScriptFile, // path to installer script file
  488. LPSTR lpProductBuf39, // buffer for product code string GUID, 39 chars
  489. LANGID *plgidLanguage, // return language Id
  490. DWORD *pdwVersion, // return version: Maj:Min:Build <8:8:16>
  491. LPSTR lpNameBuf, // buffer to return readable product name
  492. DWORD *pcchNameBuf, // in/out name buffer character count
  493. LPSTR lpPackageBuf, // buffer for path to product package
  494. DWORD *pcchPackageBuf);// in/out path buffer character count
  495. UINT WINAPI MsiGetProductInfoFromScriptW(
  496. LPCWSTR szScriptFile, // path to installer script file
  497. LPWSTR lpProductBuf39, // buffer for product code string GUID, 39 chars
  498. LANGID *plgidLanguage, // return language Id
  499. DWORD *pdwVersion, // return version: Maj:Min:Build <8:8:16>
  500. LPWSTR lpNameBuf, // buffer to return readable product name
  501. DWORD *pcchNameBuf, // in/out name buffer character count
  502. LPWSTR lpPackageBuf, // buffer for path to product package
  503. DWORD *pcchPackageBuf);// in/out path buffer character count
  504. #ifdef UNICODE
  505. #define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptW
  506. #else
  507. #define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptA
  508. #endif // !UNICODE
  509. // Return the product code for a registered component, called once by apps
  510. UINT WINAPI MsiGetProductCodeA(
  511. LPCSTR szComponent, // component Id registered for this product
  512. LPSTR lpBuf39); // returned string GUID, sized for 39 characters
  513. UINT WINAPI MsiGetProductCodeW(
  514. LPCWSTR szComponent, // component Id registered for this product
  515. LPWSTR lpBuf39); // returned string GUID, sized for 39 characters
  516. #ifdef UNICODE
  517. #define MsiGetProductCode MsiGetProductCodeW
  518. #else
  519. #define MsiGetProductCode MsiGetProductCodeA
  520. #endif // !UNICODE
  521. // Return the registered user information for an installed product
  522. USERINFOSTATE WINAPI MsiGetUserInfoA(
  523. LPCSTR szProduct, // product code, string GUID
  524. LPSTR lpUserNameBuf, // return user name
  525. DWORD *pcchUserNameBuf, // in/out buffer character count
  526. LPSTR lpOrgNameBuf, // return company name
  527. DWORD *pcchOrgNameBuf, // in/out buffer character count
  528. LPSTR lpSerialBuf, // return product serial number
  529. DWORD *pcchSerialBuf); // in/out buffer character count
  530. USERINFOSTATE WINAPI MsiGetUserInfoW(
  531. LPCWSTR szProduct, // product code, string GUID
  532. LPWSTR lpUserNameBuf, // return user name
  533. DWORD *pcchUserNameBuf, // in/out buffer character count
  534. LPWSTR lpOrgNameBuf, // return company name
  535. DWORD *pcchOrgNameBuf, // in/out buffer character count
  536. LPWSTR lpSerialBuf, // return product serial number
  537. DWORD *pcchSerialBuf); // in/out buffer character count
  538. #ifdef UNICODE
  539. #define MsiGetUserInfo MsiGetUserInfoW
  540. #else
  541. #define MsiGetUserInfo MsiGetUserInfoA
  542. #endif // !UNICODE
  543. // Obtain and store user info and PID from installation wizard (first run)
  544. UINT WINAPI MsiCollectUserInfoA(
  545. LPCSTR szProduct); // product code, string GUID
  546. UINT WINAPI MsiCollectUserInfoW(
  547. LPCWSTR szProduct); // product code, string GUID
  548. #ifdef UNICODE
  549. #define MsiCollectUserInfo MsiCollectUserInfoW
  550. #else
  551. #define MsiCollectUserInfo MsiCollectUserInfoA
  552. #endif // !UNICODE
  553. // --------------------------------------------------------------------------
  554. // Functions to patch existing products
  555. // --------------------------------------------------------------------------
  556. // Patch all possible installed products.
  557. UINT WINAPI MsiApplyPatchA(
  558. LPCSTR szPatchPackage, // location of patch package
  559. LPCSTR szInstallPackage, // location of package for install to patch <optional>
  560. INSTALLTYPE eInstallType, // type of install to patch
  561. LPCSTR szCommandLine); // command line <property settings>
  562. UINT WINAPI MsiApplyPatchW(
  563. LPCWSTR szPatchPackage, // location of patch package
  564. LPCWSTR szInstallPackage, // location of package for install to patch <optional>
  565. INSTALLTYPE eInstallType, // type of install to patch
  566. LPCWSTR szCommandLine); // command line <property settings>
  567. #ifdef UNICODE
  568. #define MsiApplyPatch MsiApplyPatchW
  569. #else
  570. #define MsiApplyPatch MsiApplyPatchA
  571. #endif // !UNICODE
  572. // Return patch info
  573. UINT WINAPI MsiGetPatchInfoA(
  574. LPCSTR szPatch, // patch code
  575. LPCSTR szAttribute, // attribute name, case-sensitive
  576. LPSTR lpValueBuf, // returned value, NULL if not desired
  577. DWORD *pcchValueBuf); // in/out buffer character count
  578. UINT WINAPI MsiGetPatchInfoW(
  579. LPCWSTR szPatch, // patch code
  580. LPCWSTR szAttribute, // attribute name, case-sensitive
  581. LPWSTR lpValueBuf, // returned value, NULL if not desired
  582. DWORD *pcchValueBuf); // in/out buffer character count
  583. #ifdef UNICODE
  584. #define MsiGetPatchInfo MsiGetPatchInfoW
  585. #else
  586. #define MsiGetPatchInfo MsiGetPatchInfoA
  587. #endif // !UNICODE
  588. // Enumerate all patches for a product
  589. UINT WINAPI MsiEnumPatchesA(
  590. LPCSTR szProduct,
  591. DWORD iPatchIndex,
  592. LPSTR lpPatchBuf,
  593. LPSTR lpTransformsBuf,
  594. DWORD *pcchTransformsBuf);
  595. UINT WINAPI MsiEnumPatchesW(
  596. LPCWSTR szProduct,
  597. DWORD iPatchIndex,
  598. LPWSTR lpPatchBuf,
  599. LPWSTR lpTransformsBuf,
  600. DWORD *pcchTransformsBuf);
  601. #ifdef UNICODE
  602. #define MsiEnumPatches MsiEnumPatchesW
  603. #else
  604. #define MsiEnumPatches MsiEnumPatchesA
  605. #endif // !UNICODE
  606. // --------------------------------------------------------------------------
  607. // Functions to query and configure a feature within a product.
  608. // --------------------------------------------------------------------------
  609. // Return the installed state for a product feature
  610. INSTALLSTATE WINAPI MsiQueryFeatureStateA(
  611. LPCSTR szProduct,
  612. LPCSTR szFeature);
  613. INSTALLSTATE WINAPI MsiQueryFeatureStateW(
  614. LPCWSTR szProduct,
  615. LPCWSTR szFeature);
  616. #ifdef UNICODE
  617. #define MsiQueryFeatureState MsiQueryFeatureStateW
  618. #else
  619. #define MsiQueryFeatureState MsiQueryFeatureStateA
  620. #endif // !UNICODE
  621. // Indicate intent to use a product feature, increments usage count
  622. // Prompts for CD if not loaded, does not install feature
  623. INSTALLSTATE WINAPI MsiUseFeatureA(
  624. LPCSTR szProduct,
  625. LPCSTR szFeature);
  626. INSTALLSTATE WINAPI MsiUseFeatureW(
  627. LPCWSTR szProduct,
  628. LPCWSTR szFeature);
  629. #ifdef UNICODE
  630. #define MsiUseFeature MsiUseFeatureW
  631. #else
  632. #define MsiUseFeature MsiUseFeatureA
  633. #endif // !UNICODE
  634. // Indicate intent to use a product feature, increments usage count
  635. // Prompts for CD if not loaded, does not install feature
  636. // Allows for bypassing component detection where performance is critical
  637. INSTALLSTATE WINAPI MsiUseFeatureExA(
  638. LPCSTR szProduct, // product code
  639. LPCSTR szFeature, // feature ID
  640. DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
  641. DWORD dwReserved); // reserved, must be 0
  642. INSTALLSTATE WINAPI MsiUseFeatureExW(
  643. LPCWSTR szProduct, // product code
  644. LPCWSTR szFeature, // feature ID
  645. DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
  646. DWORD dwReserved); // reserved, must be 0
  647. #ifdef UNICODE
  648. #define MsiUseFeatureEx MsiUseFeatureExW
  649. #else
  650. #define MsiUseFeatureEx MsiUseFeatureExA
  651. #endif // !UNICODE
  652. // Return the usage metrics for a product feature
  653. UINT WINAPI MsiGetFeatureUsageA(
  654. LPCSTR szProduct, // product code
  655. LPCSTR szFeature, // feature ID
  656. DWORD *pdwUseCount, // returned use count
  657. WORD *pwDateUsed); // last date used (DOS date format)
  658. UINT WINAPI MsiGetFeatureUsageW(
  659. LPCWSTR szProduct, // product code
  660. LPCWSTR szFeature, // feature ID
  661. DWORD *pdwUseCount, // returned use count
  662. WORD *pwDateUsed); // last date used (DOS date format)
  663. #ifdef UNICODE
  664. #define MsiGetFeatureUsage MsiGetFeatureUsageW
  665. #else
  666. #define MsiGetFeatureUsage MsiGetFeatureUsageA
  667. #endif // !UNICODE
  668. // Force the installed state for a product feature
  669. UINT WINAPI MsiConfigureFeatureA(
  670. LPCSTR szProduct,
  671. LPCSTR szFeature,
  672. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  673. UINT WINAPI MsiConfigureFeatureW(
  674. LPCWSTR szProduct,
  675. LPCWSTR szFeature,
  676. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  677. #ifdef UNICODE
  678. #define MsiConfigureFeature MsiConfigureFeatureW
  679. #else
  680. #define MsiConfigureFeature MsiConfigureFeatureA
  681. #endif // !UNICODE
  682. // Reinstall feature, used to validate or correct problems
  683. UINT WINAPI MsiReinstallFeatureA(
  684. LPCSTR szProduct, // product code
  685. LPCSTR szFeature, // feature ID, NULL for entire product
  686. DWORD dwReinstallMode); // one or more REINSTALLMODE modes
  687. UINT WINAPI MsiReinstallFeatureW(
  688. LPCWSTR szProduct, // product code
  689. LPCWSTR szFeature, // feature ID, NULL for entire product
  690. DWORD dwReinstallMode); // one or more REINSTALLMODE modes
  691. #ifdef UNICODE
  692. #define MsiReinstallFeature MsiReinstallFeatureW
  693. #else
  694. #define MsiReinstallFeature MsiReinstallFeatureA
  695. #endif // !UNICODE
  696. // --------------------------------------------------------------------------
  697. // Functions to return a path to a particular component.
  698. // The state of the feature being used should have been checked previously.
  699. // --------------------------------------------------------------------------
  700. // Return full component path, performing any necessary installation
  701. // calls MsiQueryFeatureState to detect that all components are installed
  702. // then calls MsiConfigureFeature if any of its components are uninstalled
  703. // then calls MsiLocateComponent to obtain the path the its key file
  704. UINT WINAPI MsiProvideComponentA(
  705. LPCSTR szProduct, // product code in case install required
  706. LPCSTR szFeature, // feature ID in case install required
  707. LPCSTR szComponent, // component ID
  708. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  709. LPSTR lpPathBuf, // returned path, NULL if not desired
  710. DWORD *pcchPathBuf);// in/out buffer character count
  711. UINT WINAPI MsiProvideComponentW(
  712. LPCWSTR szProduct, // product code in case install required
  713. LPCWSTR szFeature, // feature ID in case install required
  714. LPCWSTR szComponent, // component ID
  715. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  716. LPWSTR lpPathBuf, // returned path, NULL if not desired
  717. DWORD *pcchPathBuf);// in/out buffer character count
  718. #ifdef UNICODE
  719. #define MsiProvideComponent MsiProvideComponentW
  720. #else
  721. #define MsiProvideComponent MsiProvideComponentA
  722. #endif // !UNICODE
  723. // Return full component path for a qualified component, performing any necessary installation.
  724. // Prompts for source if necessary and increments the usage count for the feature.
  725. UINT WINAPI MsiProvideQualifiedComponentA(
  726. LPCSTR szCategory, // component category ID
  727. LPCSTR szQualifier, // specifies which component to access
  728. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  729. LPSTR lpPathBuf, // returned path, NULL if not desired
  730. DWORD *pcchPathBuf); // in/out buffer character count
  731. UINT WINAPI MsiProvideQualifiedComponentW(
  732. LPCWSTR szCategory, // component category ID
  733. LPCWSTR szQualifier, // specifies which component to access
  734. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  735. LPWSTR lpPathBuf, // returned path, NULL if not desired
  736. DWORD *pcchPathBuf); // in/out buffer character count
  737. #ifdef UNICODE
  738. #define MsiProvideQualifiedComponent MsiProvideQualifiedComponentW
  739. #else
  740. #define MsiProvideQualifiedComponent MsiProvideQualifiedComponentA
  741. #endif // !UNICODE
  742. // Return full component path for a qualified component, performing any necessary installation.
  743. // Prompts for source if necessary and increments the usage count for the feature.
  744. // The szProduct parameter specifies the product to match that has published the qualified
  745. // component. If null, this API works the same as MsiProvideQualifiedComponent.
  746. UINT WINAPI MsiProvideQualifiedComponentExA(
  747. LPCSTR szCategory, // component category ID
  748. LPCSTR szQualifier, // specifies which component to access
  749. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  750. LPCSTR szProduct, // the product code
  751. DWORD dwUnused1, // not used, must be zero
  752. DWORD dwUnused2, // not used, must be zero
  753. LPSTR lpPathBuf, // returned path, NULL if not desired
  754. DWORD *pcchPathBuf); // in/out buffer character count
  755. UINT WINAPI MsiProvideQualifiedComponentExW(
  756. LPCWSTR szCategory, // component category ID
  757. LPCWSTR szQualifier, // specifies which component to access
  758. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  759. LPCWSTR szProduct, // the product code
  760. DWORD dwUnused1, // not used, must be zero
  761. DWORD dwUnused2, // not used, must be zero
  762. LPWSTR lpPathBuf, // returned path, NULL if not desired
  763. DWORD *pcchPathBuf); // in/out buffer character count
  764. #ifdef UNICODE
  765. #define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExW
  766. #else
  767. #define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExA
  768. #endif // !UNICODE
  769. // Return full path to an installed component
  770. INSTALLSTATE WINAPI MsiGetComponentPathA(
  771. LPCSTR szProduct, // product code for client product
  772. LPCSTR szComponent, // component Id, string GUID
  773. LPSTR lpPathBuf, // returned path
  774. DWORD *pcchBuf); // in/out buffer character count
  775. INSTALLSTATE WINAPI MsiGetComponentPathW(
  776. LPCWSTR szProduct, // product code for client product
  777. LPCWSTR szComponent, // component Id, string GUID
  778. LPWSTR lpPathBuf, // returned path
  779. DWORD *pcchBuf); // in/out buffer character count
  780. #ifdef UNICODE
  781. #define MsiGetComponentPath MsiGetComponentPathW
  782. #else
  783. #define MsiGetComponentPath MsiGetComponentPathA
  784. #endif // !UNICODE
  785. #if (_WIN32_MSI >= 150)
  786. #define MSIASSEMBLYINFO_NETASSEMBLY 0 // Net assemblies
  787. #define MSIASSEMBLYINFO_WIN32ASSEMBLY 1 // Win32 assemblies
  788. // Return full component path for an assembly installed via the WI, performing any necessary installation.
  789. // Prompts for source if necessary and increments the usage count for the feature.
  790. // The szAssemblyName parameter specifies the stringized assembly name.
  791. // The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested
  792. // has been privatised to, which is null for global assemblies
  793. UINT WINAPI MsiProvideAssemblyA(
  794. LPCSTR szAssemblyName, // stringized assembly name
  795. LPCSTR szAppContext, // specifies the full path to the parent asm's .cfg file, null for global assemblies
  796. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  797. DWORD dwAssemblyInfo, // assembly info, including assembly type
  798. LPSTR lpPathBuf, // returned path, NULL if not desired
  799. DWORD *pcchPathBuf); // in/out buffer character count
  800. UINT WINAPI MsiProvideAssemblyW(
  801. LPCWSTR szAssemblyName, // stringized assembly name
  802. LPCWSTR szAppContext, // specifies the full path to the parent asm's .cfg file, null for global assemblies
  803. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  804. DWORD dwAssemblyInfo, // assembly info, including assembly type
  805. LPWSTR lpPathBuf, // returned path, NULL if not desired
  806. DWORD *pcchPathBuf); // in/out buffer character count
  807. #ifdef UNICODE
  808. #define MsiProvideAssembly MsiProvideAssemblyW
  809. #else
  810. #define MsiProvideAssembly MsiProvideAssemblyA
  811. #endif // !UNICODE
  812. #endif //(_WIN32_MSI >= 150)
  813. // --------------------------------------------------------------------------
  814. // Functions to iterate registered products, features, and components.
  815. // As with reg keys, they accept a 0-based index into the enumeration.
  816. // --------------------------------------------------------------------------
  817. // Enumerate the registered products, either installed or advertised
  818. UINT WINAPI MsiEnumProductsA(
  819. DWORD iProductIndex, // 0-based index into registered products
  820. LPSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  821. UINT WINAPI MsiEnumProductsW(
  822. DWORD iProductIndex, // 0-based index into registered products
  823. LPWSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  824. #ifdef UNICODE
  825. #define MsiEnumProducts MsiEnumProductsW
  826. #else
  827. #define MsiEnumProducts MsiEnumProductsA
  828. #endif // !UNICODE
  829. #if (_WIN32_MSI >= 110)
  830. // Enumerate products with given upgrade code
  831. UINT WINAPI MsiEnumRelatedProductsA(
  832. LPCSTR lpUpgradeCode, // upgrade code of products to enumerate
  833. DWORD dwReserved, // reserved, must be 0
  834. DWORD iProductIndex, // 0-based index into registered products
  835. LPSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  836. UINT WINAPI MsiEnumRelatedProductsW(
  837. LPCWSTR lpUpgradeCode, // upgrade code of products to enumerate
  838. DWORD dwReserved, // reserved, must be 0
  839. DWORD iProductIndex, // 0-based index into registered products
  840. LPWSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  841. #ifdef UNICODE
  842. #define MsiEnumRelatedProducts MsiEnumRelatedProductsW
  843. #else
  844. #define MsiEnumRelatedProducts MsiEnumRelatedProductsA
  845. #endif // !UNICODE
  846. #endif //(_WIN32_MSI >= 110)
  847. // Enumerate the advertised features for a given product.
  848. // If parent is not required, supplying NULL will improve performance.
  849. UINT WINAPI MsiEnumFeaturesA(
  850. LPCSTR szProduct,
  851. DWORD iFeatureIndex, // 0-based index into published features
  852. LPSTR lpFeatureBuf, // feature name buffer, size=MAX_FEATURE_CHARS+1
  853. LPSTR lpParentBuf); // parent feature buffer, size=MAX_FEATURE_CHARS+1
  854. UINT WINAPI MsiEnumFeaturesW(
  855. LPCWSTR szProduct,
  856. DWORD iFeatureIndex, // 0-based index into published features
  857. LPWSTR lpFeatureBuf, // feature name buffer, size=MAX_FEATURE_CHARS+1
  858. LPWSTR lpParentBuf); // parent feature buffer, size=MAX_FEATURE_CHARS+1
  859. #ifdef UNICODE
  860. #define MsiEnumFeatures MsiEnumFeaturesW
  861. #else
  862. #define MsiEnumFeatures MsiEnumFeaturesA
  863. #endif // !UNICODE
  864. // Enumerate the installed components for all products
  865. UINT WINAPI MsiEnumComponentsA(
  866. DWORD iComponentIndex, // 0-based index into installed components
  867. LPSTR lpComponentBuf); // buffer of char count: 39 (size of string GUID)
  868. UINT WINAPI MsiEnumComponentsW(
  869. DWORD iComponentIndex, // 0-based index into installed components
  870. LPWSTR lpComponentBuf); // buffer of char count: 39 (size of string GUID)
  871. #ifdef UNICODE
  872. #define MsiEnumComponents MsiEnumComponentsW
  873. #else
  874. #define MsiEnumComponents MsiEnumComponentsA
  875. #endif // !UNICODE
  876. // Enumerate the client products for a component
  877. UINT WINAPI MsiEnumClientsA(
  878. LPCSTR szComponent,
  879. DWORD iProductIndex, // 0-based index into client products
  880. LPSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  881. UINT WINAPI MsiEnumClientsW(
  882. LPCWSTR szComponent,
  883. DWORD iProductIndex, // 0-based index into client products
  884. LPWSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  885. #ifdef UNICODE
  886. #define MsiEnumClients MsiEnumClientsW
  887. #else
  888. #define MsiEnumClients MsiEnumClientsA
  889. #endif // !UNICODE
  890. // Enumerate the qualifiers for an advertised component.
  891. UINT WINAPI MsiEnumComponentQualifiersA(
  892. LPCSTR szComponent, // generic component ID that is qualified
  893. DWORD iIndex, // 0-based index into qualifiers
  894. LPSTR lpQualifierBuf, // qualifier buffer
  895. DWORD *pcchQualifierBuf, // in/out qualifier buffer character count
  896. LPSTR lpApplicationDataBuf, // description buffer
  897. DWORD *pcchApplicationDataBuf); // in/out description buffer character count
  898. UINT WINAPI MsiEnumComponentQualifiersW(
  899. LPCWSTR szComponent, // generic component ID that is qualified
  900. DWORD iIndex, // 0-based index into qualifiers
  901. LPWSTR lpQualifierBuf, // qualifier buffer
  902. DWORD *pcchQualifierBuf, // in/out qualifier buffer character count
  903. LPWSTR lpApplicationDataBuf, // description buffer
  904. DWORD *pcchApplicationDataBuf); // in/out description buffer character count
  905. #ifdef UNICODE
  906. #define MsiEnumComponentQualifiers MsiEnumComponentQualifiersW
  907. #else
  908. #define MsiEnumComponentQualifiers MsiEnumComponentQualifiersA
  909. #endif // !UNICODE
  910. // --------------------------------------------------------------------------
  911. // Functions to obtain product or package information.
  912. // --------------------------------------------------------------------------
  913. // Open the installation for a product to obtain detailed information
  914. UINT WINAPI MsiOpenProductA(
  915. LPCSTR szProduct, // product code
  916. MSIHANDLE *hProduct); // returned product handle, must be closed
  917. UINT WINAPI MsiOpenProductW(
  918. LPCWSTR szProduct, // product code
  919. MSIHANDLE *hProduct); // returned product handle, must be closed
  920. #ifdef UNICODE
  921. #define MsiOpenProduct MsiOpenProductW
  922. #else
  923. #define MsiOpenProduct MsiOpenProductA
  924. #endif // !UNICODE
  925. // Open a product package in order to access product properties
  926. UINT WINAPI MsiOpenPackageA(
  927. LPCSTR szPackagePath, // path to package, or database handle: #nnnn
  928. MSIHANDLE *hProduct); // returned product handle, must be closed
  929. UINT WINAPI MsiOpenPackageW(
  930. LPCWSTR szPackagePath, // path to package, or database handle: #nnnn
  931. MSIHANDLE *hProduct); // returned product handle, must be closed
  932. #ifdef UNICODE
  933. #define MsiOpenPackage MsiOpenPackageW
  934. #else
  935. #define MsiOpenPackage MsiOpenPackageA
  936. #endif // !UNICODE
  937. #if (_WIN32_MSI >= 150)
  938. // Open a product package in order to access product properties
  939. // Option to create a "safe" engine that does not look at machine state
  940. // and does not allow for modification of machine state
  941. UINT WINAPI MsiOpenPackageExA(
  942. LPCSTR szPackagePath, // path to package, or database handle: #nnnn
  943. DWORD dwOptions, // options flags to indicate whether or not to ignore machine state
  944. MSIHANDLE *hProduct); // returned product handle, must be closed
  945. UINT WINAPI MsiOpenPackageExW(
  946. LPCWSTR szPackagePath, // path to package, or database handle: #nnnn
  947. DWORD dwOptions, // options flags to indicate whether or not to ignore machine state
  948. MSIHANDLE *hProduct); // returned product handle, must be closed
  949. #ifdef UNICODE
  950. #define MsiOpenPackageEx MsiOpenPackageExW
  951. #else
  952. #define MsiOpenPackageEx MsiOpenPackageExA
  953. #endif // !UNICODE
  954. #endif //(_WIN32_MSI >= 150)
  955. // Provide the value for an installation property.
  956. UINT WINAPI MsiGetProductPropertyA(
  957. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  958. LPCSTR szProperty, // property name, case-sensitive
  959. LPSTR lpValueBuf, // returned value, NULL if not desired
  960. DWORD *pcchValueBuf); // in/out buffer character count
  961. UINT WINAPI MsiGetProductPropertyW(
  962. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  963. LPCWSTR szProperty, // property name, case-sensitive
  964. LPWSTR lpValueBuf, // returned value, NULL if not desired
  965. DWORD *pcchValueBuf); // in/out buffer character count
  966. #ifdef UNICODE
  967. #define MsiGetProductProperty MsiGetProductPropertyW
  968. #else
  969. #define MsiGetProductProperty MsiGetProductPropertyA
  970. #endif // !UNICODE
  971. // Determine whether a file is a package
  972. // Returns ERROR_SUCCESS if file is a package.
  973. UINT WINAPI MsiVerifyPackageA(
  974. LPCSTR szPackagePath); // location of package
  975. UINT WINAPI MsiVerifyPackageW(
  976. LPCWSTR szPackagePath); // location of package
  977. #ifdef UNICODE
  978. #define MsiVerifyPackage MsiVerifyPackageW
  979. #else
  980. #define MsiVerifyPackage MsiVerifyPackageA
  981. #endif // !UNICODE
  982. // Provide descriptive information for product feature: title and description.
  983. // Returns the install level for the feature, or -1 if feature is unknown.
  984. // 0 = feature is not available on this machine
  985. // 1 = highest priority, feature installed if parent is installed
  986. // >1 = decreasing priority, feature installation based on InstallLevel property
  987. UINT WINAPI MsiGetFeatureInfoA(
  988. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  989. LPCSTR szFeature, // feature name
  990. DWORD *lpAttributes, // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  991. LPSTR lpTitleBuf, // returned localized name, NULL if not desired
  992. DWORD *pcchTitleBuf, // in/out buffer character count
  993. LPSTR lpHelpBuf, // returned description, NULL if not desired
  994. DWORD *pcchHelpBuf); // in/out buffer character count
  995. UINT WINAPI MsiGetFeatureInfoW(
  996. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  997. LPCWSTR szFeature, // feature name
  998. DWORD *lpAttributes, // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  999. LPWSTR lpTitleBuf, // returned localized name, NULL if not desired
  1000. DWORD *pcchTitleBuf, // in/out buffer character count
  1001. LPWSTR lpHelpBuf, // returned description, NULL if not desired
  1002. DWORD *pcchHelpBuf); // in/out buffer character count
  1003. #ifdef UNICODE
  1004. #define MsiGetFeatureInfo MsiGetFeatureInfoW
  1005. #else
  1006. #define MsiGetFeatureInfo MsiGetFeatureInfoA
  1007. #endif // !UNICODE
  1008. // --------------------------------------------------------------------------
  1009. // Functions to access or install missing components and files.
  1010. // These should be used as a last resort.
  1011. // --------------------------------------------------------------------------
  1012. // Install a component unexpectedly missing, provided only for error recovery
  1013. // This would typically occur due to failue to establish feature availability
  1014. // The product feature having the smallest incremental cost is installed
  1015. UINT WINAPI MsiInstallMissingComponentA(
  1016. LPCSTR szProduct, // product code
  1017. LPCSTR szComponent, // component Id, string GUID
  1018. INSTALLSTATE eInstallState); // local/source/default, absent invalid
  1019. UINT WINAPI MsiInstallMissingComponentW(
  1020. LPCWSTR szProduct, // product code
  1021. LPCWSTR szComponent, // component Id, string GUID
  1022. INSTALLSTATE eInstallState); // local/source/default, absent invalid
  1023. #ifdef UNICODE
  1024. #define MsiInstallMissingComponent MsiInstallMissingComponentW
  1025. #else
  1026. #define MsiInstallMissingComponent MsiInstallMissingComponentA
  1027. #endif // !UNICODE
  1028. // Install a file unexpectedly missing, provided only for error recovery
  1029. // This would typically occur due to failue to establish feature availability
  1030. // The missing component is determined from the product's File table, then
  1031. // the product feature having the smallest incremental cost is installed
  1032. UINT WINAPI MsiInstallMissingFileA(
  1033. LPCSTR szProduct, // product code
  1034. LPCSTR szFile); // file name, without path
  1035. UINT WINAPI MsiInstallMissingFileW(
  1036. LPCWSTR szProduct, // product code
  1037. LPCWSTR szFile); // file name, without path
  1038. #ifdef UNICODE
  1039. #define MsiInstallMissingFile MsiInstallMissingFileW
  1040. #else
  1041. #define MsiInstallMissingFile MsiInstallMissingFileA
  1042. #endif // !UNICODE
  1043. // Return full path to an installed component without a product code
  1044. // This function attempts to determine the product using MsiGetProductCode
  1045. // but is not guaranteed to find the correct product for the caller.
  1046. // MsiGetComponentPath should always be called when possible.
  1047. INSTALLSTATE WINAPI MsiLocateComponentA(
  1048. LPCSTR szComponent, // component Id, string GUID
  1049. LPSTR lpPathBuf, // returned path
  1050. DWORD *pcchBuf); // in/out buffer character count
  1051. INSTALLSTATE WINAPI MsiLocateComponentW(
  1052. LPCWSTR szComponent, // component Id, string GUID
  1053. LPWSTR lpPathBuf, // returned path
  1054. DWORD *pcchBuf); // in/out buffer character count
  1055. #ifdef UNICODE
  1056. #define MsiLocateComponent MsiLocateComponentW
  1057. #else
  1058. #define MsiLocateComponent MsiLocateComponentA
  1059. #endif // !UNICODE
  1060. #if (_WIN32_MSI >= 110)
  1061. // --------------------------------------------------------------------------
  1062. // Functions used to manage the list of valid sources.
  1063. // --------------------------------------------------------------------------
  1064. // Opens the list of sources for the specified user's install of the product
  1065. // and removes all network sources from the list. A NULL or empty value for
  1066. // the user name indicates the per-machine install.
  1067. UINT WINAPI MsiSourceListClearAllA(
  1068. LPCSTR szProduct, // product code
  1069. LPCSTR szUserName, // user name or NULL/empty for per-machine
  1070. DWORD dwReserved); // reserved - must be 0
  1071. UINT WINAPI MsiSourceListClearAllW(
  1072. LPCWSTR szProduct, // product code
  1073. LPCWSTR szUserName, // user name or NULL/empty for per-machine
  1074. DWORD dwReserved); // reserved - must be 0
  1075. #ifdef UNICODE
  1076. #define MsiSourceListClearAll MsiSourceListClearAllW
  1077. #else
  1078. #define MsiSourceListClearAll MsiSourceListClearAllA
  1079. #endif // !UNICODE
  1080. // Opens the list of sources for the specified user's install of the product
  1081. // and adds the provided source as a new network source. A NULL or empty
  1082. // value for the user name indicates the per-machine install.
  1083. UINT WINAPI MsiSourceListAddSourceA(
  1084. LPCSTR szProduct, // product code
  1085. LPCSTR szUserName, // user name or NULL/empty for per-machine
  1086. DWORD dwReserved, // reserved - must be 0
  1087. LPCSTR szSource); // new source
  1088. UINT WINAPI MsiSourceListAddSourceW(
  1089. LPCWSTR szProduct, // product code
  1090. LPCWSTR szUserName, // user name or NULL/empty for per-machine
  1091. DWORD dwReserved, // reserved - must be 0
  1092. LPCWSTR szSource); // new source
  1093. #ifdef UNICODE
  1094. #define MsiSourceListAddSource MsiSourceListAddSourceW
  1095. #else
  1096. #define MsiSourceListAddSource MsiSourceListAddSourceA
  1097. #endif // !UNICODE
  1098. // Forces the installer to reevaluate the list of sources the next time that
  1099. // the specified product needs a source.
  1100. UINT WINAPI MsiSourceListForceResolutionA(
  1101. LPCSTR szProduct, // product code
  1102. LPCSTR szUserName, // user name or NULL/empty for per-machine
  1103. DWORD dwReserved); // reserved - must be 0
  1104. UINT WINAPI MsiSourceListForceResolutionW(
  1105. LPCWSTR szProduct, // product code
  1106. LPCWSTR szUserName, // user name or NULL/empty for per-machine
  1107. DWORD dwReserved); // reserved - must be 0
  1108. #ifdef UNICODE
  1109. #define MsiSourceListForceResolution MsiSourceListForceResolutionW
  1110. #else
  1111. #define MsiSourceListForceResolution MsiSourceListForceResolutionA
  1112. #endif // !UNICODE
  1113. #endif //(_WIN32_MSI >= 110)
  1114. // --------------------------------------------------------------------------
  1115. // Utility functions
  1116. // --------------------------------------------------------------------------
  1117. // Give the version string and language for a specified file
  1118. UINT WINAPI MsiGetFileVersionA(
  1119. LPCSTR szFilePath, // path to the file
  1120. LPSTR lpVersionBuf, // returned version string
  1121. DWORD *pcchVersionBuf, // in/out buffer byte count
  1122. LPSTR lpLangBuf, // returned language string
  1123. DWORD *pcchLangBuf); // in/out buffer byte count
  1124. UINT WINAPI MsiGetFileVersionW(
  1125. LPCWSTR szFilePath, // path to the file
  1126. LPWSTR lpVersionBuf, // returned version string
  1127. DWORD *pcchVersionBuf, // in/out buffer byte count
  1128. LPWSTR lpLangBuf, // returned language string
  1129. DWORD *pcchLangBuf); // in/out buffer byte count
  1130. #ifdef UNICODE
  1131. #define MsiGetFileVersion MsiGetFileVersionW
  1132. #else
  1133. #define MsiGetFileVersion MsiGetFileVersionA
  1134. #endif // !UNICODE
  1135. #if (_WIN32_MSI >= 150)
  1136. UINT WINAPI MsiGetFileHashA(
  1137. LPCSTR szFilePath, // path to the file
  1138. DWORD dwOptions, // options
  1139. PMSIFILEHASHINFO pHash); // returned file hash info
  1140. UINT WINAPI MsiGetFileHashW(
  1141. LPCWSTR szFilePath, // path to the file
  1142. DWORD dwOptions, // options
  1143. PMSIFILEHASHINFO pHash); // returned file hash info
  1144. #ifdef UNICODE
  1145. #define MsiGetFileHash MsiGetFileHashW
  1146. #else
  1147. #define MsiGetFileHash MsiGetFileHashA
  1148. #endif // !UNICODE
  1149. #endif //(_WIN32_MSI >= 150)
  1150. #if (_WIN32_MSI >= 150)
  1151. #ifndef _MSI_NO_CRYPTO
  1152. HRESULT WINAPI MsiGetFileSignatureInformationA(
  1153. LPCSTR szSignedObjectPath, // path to the signed object
  1154. DWORD dwFlags, // special extra error case flags
  1155. PCCERT_CONTEXT *ppcCertContext, // returned signer cert context
  1156. BYTE *pbHashData, // returned hash buffer, NULL if not desired
  1157. DWORD *pcbHashData); // in/out buffer byte count
  1158. HRESULT WINAPI MsiGetFileSignatureInformationW(
  1159. LPCWSTR szSignedObjectPath, // path to the signed object
  1160. DWORD dwFlags, // special extra error case flags
  1161. PCCERT_CONTEXT *ppcCertContext, // returned signer cert context
  1162. BYTE *pbHashData, // returned hash buffer, NULL if not desired
  1163. DWORD *pcbHashData); // in/out buffer byte count
  1164. #ifdef UNICODE
  1165. #define MsiGetFileSignatureInformation MsiGetFileSignatureInformationW
  1166. #else
  1167. #define MsiGetFileSignatureInformation MsiGetFileSignatureInformationA
  1168. #endif // !UNICODE
  1169. // By default, when only requesting the certificate context, an invalid hash
  1170. // in the digital signature is not a fatal error. Set this flag in the dwFlags
  1171. // parameter to make the TRUST_E_BAD_DIGEST error fatal.
  1172. #define MSI_INVALID_HASH_IS_FATAL 0x1
  1173. #endif// _MSI_NO_CRYPTO
  1174. #endif //(_WIN32_MSI >= 150)
  1175. #if (_WIN32_MSI >= 110)
  1176. // examine a shortcut, and retrieve its descriptor information
  1177. // if available.
  1178. UINT WINAPI MsiGetShortcutTargetA(
  1179. LPCSTR szShortcutPath, // full file path for the shortcut
  1180. LPSTR szProductCode, // returned product code - GUID
  1181. LPSTR szFeatureId, // returned Feature Id.
  1182. LPSTR szComponentCode); // returned component code - GUID
  1183. UINT WINAPI MsiGetShortcutTargetW(
  1184. LPCWSTR szShortcutPath, // full file path for the shortcut
  1185. LPWSTR szProductCode, // returned product code - GUID
  1186. LPWSTR szFeatureId, // returned Feature Id.
  1187. LPWSTR szComponentCode); // returned component code - GUID
  1188. #ifdef UNICODE
  1189. #define MsiGetShortcutTarget MsiGetShortcutTargetW
  1190. #else
  1191. #define MsiGetShortcutTarget MsiGetShortcutTargetA
  1192. #endif // !UNICODE
  1193. #endif //(_WIN32_MSI >= 110)
  1194. #if (_WIN32_MSI >= 110)
  1195. // checks to see if a product is managed
  1196. // checks per-machine if called from system context, per-user if from
  1197. // user context
  1198. UINT WINAPI MsiIsProductElevatedA(
  1199. LPCSTR szProduct, // product code
  1200. BOOL *pfElevated); // result
  1201. // checks to see if a product is managed
  1202. // checks per-machine if called from system context, per-user if from
  1203. // user context
  1204. UINT WINAPI MsiIsProductElevatedW(
  1205. LPCWSTR szProduct, // product code
  1206. BOOL *pfElevated); // result
  1207. #ifdef UNICODE
  1208. #define MsiIsProductElevated MsiIsProductElevatedW
  1209. #else
  1210. #define MsiIsProductElevated MsiIsProductElevatedA
  1211. #endif // !UNICODE
  1212. #endif //(_WIN32_MSI >= 110)
  1213. // --------------------------------------------------------------------------
  1214. // Internal state migration APIs.
  1215. // --------------------------------------------------------------------------
  1216. #ifdef __cplusplus
  1217. }
  1218. #endif
  1219. // --------------------------------------------------------------------------
  1220. // Error codes for installer access functions - until merged to winerr.h
  1221. // --------------------------------------------------------------------------
  1222. #ifndef ERROR_INSTALL_FAILURE
  1223. #define ERROR_INSTALL_USEREXIT 1602L // User cancel installation.
  1224. #define ERROR_INSTALL_FAILURE 1603L // Fatal error during installation.
  1225. #define ERROR_INSTALL_SUSPEND 1604L // Installation suspended, incomplete.
  1226. // LOCALIZE BEGIN:
  1227. #define ERROR_UNKNOWN_PRODUCT 1605L // This action is only valid for products that are currently installed.
  1228. // LOCALIZE END
  1229. #define ERROR_UNKNOWN_FEATURE 1606L // Feature ID not registered.
  1230. #define ERROR_UNKNOWN_COMPONENT 1607L // Component ID not registered.
  1231. #define ERROR_UNKNOWN_PROPERTY 1608L // Unknown property.
  1232. #define ERROR_INVALID_HANDLE_STATE 1609L // Handle is in an invalid state.
  1233. // LOCALIZE BEGIN:
  1234. #define ERROR_BAD_CONFIGURATION 1610L // The configuration data for this product is corrupt. Contact your support personnel.
  1235. // LOCALIZE END:
  1236. #define ERROR_INDEX_ABSENT 1611L // Component qualifier not present.
  1237. // LOCALIZE BEGIN:
  1238. #define ERROR_INSTALL_SOURCE_ABSENT 1612L // The installation source for this product is not available. Verify that the source exists and that you can access it.
  1239. // LOCALIZE END
  1240. #define ERROR_PRODUCT_UNINSTALLED 1614L // Product is uninstalled.
  1241. #define ERROR_BAD_QUERY_SYNTAX 1615L // SQL query syntax invalid or unsupported.
  1242. #define ERROR_INVALID_FIELD 1616L // Record field does not exist.
  1243. #endif
  1244. // LOCALIZE BEGIN:
  1245. #ifndef ERROR_INSTALL_SERVICE_FAILURE
  1246. #define ERROR_INSTALL_SERVICE_FAILURE 1601L // The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
  1247. #define ERROR_INSTALL_PACKAGE_VERSION 1613L // This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
  1248. #define ERROR_INSTALL_ALREADY_RUNNING 1618L // Another installation is already in progress. Complete that installation before proceeding with this install.
  1249. #define ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619L // This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
  1250. #define ERROR_INSTALL_PACKAGE_INVALID 1620L // This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
  1251. #define ERROR_INSTALL_UI_FAILURE 1621L // There was an error starting the Windows Installer service user interface. Contact your support personnel.
  1252. #define ERROR_INSTALL_LOG_FAILURE 1622L // Error opening installation log file. Verify that the specified log file location exists and is writable.
  1253. #define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L // This language of this installation package is not supported by your system.
  1254. #define ERROR_INSTALL_PACKAGE_REJECTED 1625L // The system administrator has set policies to prevent this installation.
  1255. // LOCALIZE END
  1256. #define ERROR_FUNCTION_NOT_CALLED 1626L // Function could not be executed.
  1257. #define ERROR_FUNCTION_FAILED 1627L // Function failed during execution.
  1258. #define ERROR_INVALID_TABLE 1628L // Invalid or unknown table specified.
  1259. #define ERROR_DATATYPE_MISMATCH 1629L // Data supplied is of wrong type.
  1260. #define ERROR_UNSUPPORTED_TYPE 1630L // Data of this type is not supported.
  1261. // LOCALIZE BEGIN:
  1262. #define ERROR_CREATE_FAILED 1631L // The Windows Installer service failed to start. Contact your support personnel.
  1263. // LOCALIZE END:
  1264. #endif
  1265. // LOCALIZE BEGIN:
  1266. #ifndef ERROR_INSTALL_TEMP_UNWRITABLE
  1267. #define ERROR_INSTALL_TEMP_UNWRITABLE 1632L // The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
  1268. #endif
  1269. #ifndef ERROR_INSTALL_PLATFORM_UNSUPPORTED
  1270. #define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L // This installation package is not supported by this processor type. Contact your product vendor.
  1271. #endif
  1272. // LOCALIZE END
  1273. #ifndef ERROR_INSTALL_NOTUSED
  1274. #define ERROR_INSTALL_NOTUSED 1634L // Component not used on this machine
  1275. #endif
  1276. // LOCALIZE BEGIN:
  1277. #ifndef ERROR_INSTALL_TRANSFORM_FAILURE
  1278. #define ERROR_INSTALL_TRANSFORM_FAILURE 1624L // Error applying transforms. Verify that the specified transform paths are valid.
  1279. #endif
  1280. #ifndef ERROR_PATCH_PACKAGE_OPEN_FAILED
  1281. #define ERROR_PATCH_PACKAGE_OPEN_FAILED 1635L // This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
  1282. #define ERROR_PATCH_PACKAGE_INVALID 1636L // This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.
  1283. #define ERROR_PATCH_PACKAGE_UNSUPPORTED 1637L // This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
  1284. #endif
  1285. #ifndef ERROR_PRODUCT_VERSION
  1286. #define ERROR_PRODUCT_VERSION 1638L // Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
  1287. #endif
  1288. #ifndef ERROR_INVALID_COMMAND_LINE
  1289. #define ERROR_INVALID_COMMAND_LINE 1639L // Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
  1290. #endif
  1291. // The following three error codes are not returned from MSI version 1.0
  1292. #ifndef ERROR_INSTALL_REMOTE_DISALLOWED
  1293. #define ERROR_INSTALL_REMOTE_DISALLOWED 1640L // Only administrators have permission to add, remove, or configure server software during a Terminal services remote session. If you want to install or configure software on the server, contact your network administrator.
  1294. #endif
  1295. // LOCALIZE END
  1296. #ifndef ERROR_SUCCESS_REBOOT_INITIATED
  1297. #define ERROR_SUCCESS_REBOOT_INITIATED 1641L // The requested operation completed successfully. The system will be restarted so the changes can take effect.
  1298. #endif
  1299. // LOCALIZE BEGIN:
  1300. #ifndef ERROR_PATCH_TARGET_NOT_FOUND
  1301. #define ERROR_PATCH_TARGET_NOT_FOUND 1642L // The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
  1302. #endif
  1303. // LOCALIZE END
  1304. // The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
  1305. // LOCALIZE BEGIN:
  1306. #ifndef ERROR_PATCH_PACKAGE_REJECTED
  1307. #define ERROR_PATCH_PACKAGE_REJECTED 1643L // The patch package is not permitted by software restriction policy.
  1308. #endif
  1309. #ifndef ERROR_INSTALL_TRANSFORM_REJECTED
  1310. #define ERROR_INSTALL_TRANSFORM_REJECTED 1644L // One or more customizations are not permitted by software restriction policy.
  1311. #endif
  1312. // LOCALIZE END
  1313. #endif // _MSI_H_