Leaked source code of windows server 2003
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.

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