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.

1162 lines
52 KiB

  1. ;begin_both
  2. /*****************************************************************************\
  3. * *
  4. ;end_both
  5. * msi.h - - Interface for external access to Installer Service *
  6. * msip.h - - Interface for internal access to Installer Service * ;internal
  7. ;begin_both
  8. * *
  9. * Version 2.0 *
  10. * *
  11. * NOTES: All buffers sizes are TCHAR count, null included only on input *
  12. * Return argument pointers may be null if not interested in value *
  13. * *
  14. * Copyright (c) 1996-2001, Microsoft Corp. All rights reserved. *
  15. * *
  16. \*****************************************************************************/
  17. ;end_both
  18. #ifndef _MSI_H_
  19. #define _MSI_H_
  20. #ifndef _MSIP_H_ ;internal
  21. #define _MSIP_H_ ;internal
  22. ;begin_both
  23. #ifndef _WIN32_MSI
  24. #if (_WIN32_WINNT >= 0x0501)
  25. #define _WIN32_MSI 200
  26. #elif (_WIN32_WINNT >= 0x0500)
  27. #define _WIN32_MSI 110
  28. #else
  29. #define _WIN32_MSI 100
  30. #endif //_WIN32_WINNT
  31. #endif // !_WIN32_MSI
  32. ;end_both
  33. #if (_WIN32_MSI >= 150)
  34. #ifndef _MSI_NO_CRYPTO
  35. #include "wincrypt.h"
  36. #endif // _MSI_NO_CRYPTO
  37. #endif //(_WIN32_MSI >= 150)
  38. // --------------------------------------------------------------------------
  39. // Installer generic handle definitions
  40. // --------------------------------------------------------------------------
  41. typedef unsigned long MSIHANDLE; // abstract generic handle, 0 == no handle
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45. // Close a open handle of any type
  46. // All handles obtained from API calls must be closed when no longer needed
  47. // Normally succeeds, returning TRUE.
  48. UINT WINAPI MsiCloseHandle(MSIHANDLE hAny);
  49. // Close all handles open in the process, a diagnostic call
  50. // This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
  51. // Can be called at termination to assure that all handles have been closed
  52. // Returns 0 if all handles have been close, else number of open handles
  53. UINT WINAPI MsiCloseAllHandles();
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #ifdef __cplusplus
  58. // C++ wrapper object to automatically free handle when going out of scope
  59. class PMSIHANDLE
  60. {
  61. MSIHANDLE m_h;
  62. public:
  63. PMSIHANDLE():m_h(0){}
  64. PMSIHANDLE(MSIHANDLE h):m_h(h){}
  65. ~PMSIHANDLE(){if (m_h!=0) MsiCloseHandle(m_h);}
  66. void operator =(MSIHANDLE h) {if (m_h) MsiCloseHandle(m_h); m_h=h;}
  67. operator MSIHANDLE() {return m_h;}
  68. MSIHANDLE* operator &() {if (m_h) MsiCloseHandle(m_h); m_h = 0; return &m_h;}
  69. };
  70. #endif //__cplusplus
  71. // Install message type for callback is a combination of the following:
  72. // A message box style: MB_*, where MB_OK is the default
  73. // A message box icon type: MB_ICON*, where no icon is the default
  74. // A default button: MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
  75. // One of the following install message types, no default
  76. typedef enum tagINSTALLMESSAGE
  77. {
  78. INSTALLMESSAGE_FATALEXIT = 0x00000000L, // premature termination, possibly fatal OOM
  79. INSTALLMESSAGE_ERROR = 0x01000000L, // formatted error message
  80. INSTALLMESSAGE_WARNING = 0x02000000L, // formatted warning message
  81. INSTALLMESSAGE_USER = 0x03000000L, // user request message
  82. INSTALLMESSAGE_INFO = 0x04000000L, // informative message for log
  83. INSTALLMESSAGE_FILESINUSE = 0x05000000L, // list of files in use that need to be replaced
  84. INSTALLMESSAGE_RESOLVESOURCE = 0x06000000L, // request to determine a valid source location
  85. INSTALLMESSAGE_OUTOFDISKSPACE = 0x07000000L, // insufficient disk space message
  86. INSTALLMESSAGE_ACTIONSTART = 0x08000000L, // start of action: action name & description
  87. INSTALLMESSAGE_ACTIONDATA = 0x09000000L, // formatted data associated with individual action item
  88. INSTALLMESSAGE_PROGRESS = 0x0A000000L, // progress gauge info: units so far, total
  89. INSTALLMESSAGE_COMMONDATA = 0x0B000000L, // product info for dialog: language Id, dialog caption
  90. INSTALLMESSAGE_INITIALIZE = 0x0C000000L, // sent prior to UI initialization, no string data
  91. INSTALLMESSAGE_TERMINATE = 0x0D000000L, // sent after UI termination, no string data
  92. INSTALLMESSAGE_SHOWDIALOG = 0x0E000000L, // sent prior to display or authored dialog or wizard
  93. } INSTALLMESSAGE;
  94. // external error handler supplied to installation API functions
  95. typedef int (WINAPI *INSTALLUI_HANDLER%)(LPVOID pvContext, UINT iMessageType, LPCTSTR% szMessage);
  96. typedef enum tagINSTALLUILEVEL
  97. {
  98. INSTALLUILEVEL_NOCHANGE = 0, // UI level is unchanged
  99. INSTALLUILEVEL_DEFAULT = 1, // default UI is used
  100. INSTALLUILEVEL_NONE = 2, // completely silent installation
  101. INSTALLUILEVEL_BASIC = 3, // simple progress and error handling
  102. INSTALLUILEVEL_REDUCED = 4, // authored UI, wizard dialogs suppressed
  103. INSTALLUILEVEL_FULL = 5, // authored UI with wizards, progress, errors
  104. INSTALLUILEVEL_ENDDIALOG = 0x80, // display success/failure dialog at end of install
  105. INSTALLUILEVEL_PROGRESSONLY = 0x40, // display only progress dialog
  106. INSTALLUILEVEL_HIDECANCEL = 0x20, // do not display the cancel button in basic UI
  107. INSTALLUILEVEL_SOURCERESONLY = 0x100, // force display of source resolution even if quiet
  108. } INSTALLUILEVEL;
  109. typedef enum tagINSTALLSTATE
  110. {
  111. INSTALLSTATE_NOTUSED = -7, // component disabled
  112. INSTALLSTATE_BADCONFIG = -6, // configuration data corrupt
  113. INSTALLSTATE_INCOMPLETE = -5, // installation suspended or in progress
  114. INSTALLSTATE_SOURCEABSENT = -4, // run from source, source is unavailable
  115. INSTALLSTATE_MOREDATA = -3, // return buffer overflow
  116. INSTALLSTATE_INVALIDARG = -2, // invalid function argument
  117. INSTALLSTATE_UNKNOWN = -1, // unrecognized product or feature
  118. INSTALLSTATE_BROKEN = 0, // broken
  119. INSTALLSTATE_ADVERTISED = 1, // advertised feature
  120. INSTALLSTATE_REMOVED = 1, // component being removed (action state, not settable)
  121. INSTALLSTATE_ABSENT = 2, // uninstalled (or action state absent but clients remain)
  122. INSTALLSTATE_LOCAL = 3, // installed on local drive
  123. INSTALLSTATE_SOURCE = 4, // run from source, CD or net
  124. INSTALLSTATE_DEFAULT = 5, // use default, local or source
  125. } INSTALLSTATE;
  126. typedef enum tagUSERINFOSTATE
  127. {
  128. USERINFOSTATE_MOREDATA = -3, // return buffer overflow
  129. USERINFOSTATE_INVALIDARG = -2, // invalid function argument
  130. USERINFOSTATE_UNKNOWN = -1, // unrecognized product
  131. USERINFOSTATE_ABSENT = 0, // user info and PID not initialized
  132. USERINFOSTATE_PRESENT = 1, // user info and PID initialized
  133. } USERINFOSTATE;
  134. typedef enum tagINSTALLLEVEL
  135. {
  136. INSTALLLEVEL_DEFAULT = 0, // install authored default
  137. INSTALLLEVEL_MINIMUM = 1, // install only required features
  138. INSTALLLEVEL_MAXIMUM = 0xFFFF, // install all features
  139. } INSTALLLEVEL; // intermediate levels dependent on authoring
  140. typedef enum tagREINSTALLMODE // bit flags
  141. {
  142. REINSTALLMODE_REPAIR = 0x00000001, // Reserved bit - currently ignored
  143. REINSTALLMODE_FILEMISSING = 0x00000002, // Reinstall only if file is missing
  144. REINSTALLMODE_FILEOLDERVERSION = 0x00000004, // Reinstall if file is missing, or older version
  145. REINSTALLMODE_FILEEQUALVERSION = 0x00000008, // Reinstall if file is missing, or equal or older version
  146. REINSTALLMODE_FILEEXACT = 0x00000010, // Reinstall if file is missing, or not exact version
  147. REINSTALLMODE_FILEVERIFY = 0x00000020, // checksum executables, reinstall if missing or corrupt
  148. REINSTALLMODE_FILEREPLACE = 0x00000040, // Reinstall all files, regardless of version
  149. REINSTALLMODE_MACHINEDATA = 0x00000080, // insure required machine reg entries
  150. REINSTALLMODE_USERDATA = 0x00000100, // insure required user reg entries
  151. REINSTALLMODE_SHORTCUT = 0x00000200, // validate shortcuts items
  152. REINSTALLMODE_PACKAGE = 0x00000400, // use re-cache source install package
  153. } REINSTALLMODE;
  154. typedef enum tagINSTALLOGMODE // bit flags for use with MsiEnableLog and MsiSetExternalUI
  155. {
  156. INSTALLLOGMODE_FATALEXIT = (1 << (INSTALLMESSAGE_FATALEXIT >> 24)),
  157. INSTALLLOGMODE_ERROR = (1 << (INSTALLMESSAGE_ERROR >> 24)),
  158. INSTALLLOGMODE_WARNING = (1 << (INSTALLMESSAGE_WARNING >> 24)),
  159. INSTALLLOGMODE_USER = (1 << (INSTALLMESSAGE_USER >> 24)),
  160. INSTALLLOGMODE_INFO = (1 << (INSTALLMESSAGE_INFO >> 24)),
  161. INSTALLLOGMODE_RESOLVESOURCE = (1 << (INSTALLMESSAGE_RESOLVESOURCE >> 24)),
  162. INSTALLLOGMODE_OUTOFDISKSPACE = (1 << (INSTALLMESSAGE_OUTOFDISKSPACE >> 24)),
  163. INSTALLLOGMODE_ACTIONSTART = (1 << (INSTALLMESSAGE_ACTIONSTART >> 24)),
  164. INSTALLLOGMODE_ACTIONDATA = (1 << (INSTALLMESSAGE_ACTIONDATA >> 24)),
  165. INSTALLLOGMODE_COMMONDATA = (1 << (INSTALLMESSAGE_COMMONDATA >> 24)),
  166. INSTALLLOGMODE_PROPERTYDUMP = (1 << (INSTALLMESSAGE_PROGRESS >> 24)), // log only
  167. INSTALLLOGMODE_VERBOSE = (1 << (INSTALLMESSAGE_INITIALIZE >> 24)), // log only
  168. INSTALLLOGMODE_PROGRESS = (1 << (INSTALLMESSAGE_PROGRESS >> 24)), // external handler only
  169. INSTALLLOGMODE_INITIALIZE = (1 << (INSTALLMESSAGE_INITIALIZE >> 24)), // external handler only
  170. INSTALLLOGMODE_TERMINATE = (1 << (INSTALLMESSAGE_TERMINATE >> 24)), // external handler only
  171. INSTALLLOGMODE_SHOWDIALOG = (1 << (INSTALLMESSAGE_SHOWDIALOG >> 24)), // external handler only
  172. } INSTALLLOGMODE;
  173. typedef enum tagINSTALLLOGATTRIBUTES // flag attributes for MsiEnableLog
  174. {
  175. INSTALLLOGATTRIBUTES_APPEND = (1 << 0),
  176. INSTALLLOGATTRIBUTES_FLUSHEACHLINE = (1 << 1),
  177. } INSTALLLOGATTRIBUTES;
  178. typedef enum tagINSTALLFEATUREATTRIBUTE // bit flags
  179. {
  180. INSTALLFEATUREATTRIBUTE_FAVORLOCAL = 1 << 0,
  181. INSTALLFEATUREATTRIBUTE_FAVORSOURCE = 1 << 1,
  182. INSTALLFEATUREATTRIBUTE_FOLLOWPARENT = 1 << 2,
  183. INSTALLFEATUREATTRIBUTE_FAVORADVERTISE = 1 << 3,
  184. INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE = 1 << 4,
  185. INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 << 5,
  186. } INSTALLFEATUREATTRIBUTE;
  187. typedef enum tagINSTALLMODE
  188. {
  189. INSTALLMODE_NOSOURCERESOLUTION = -3, // skip source resolution
  190. INSTALLMODE_NODETECTION = -2, // skip detection
  191. INSTALLMODE_EXISTING = -1, // provide, if available
  192. INSTALLMODE_DEFAULT = 0, // install, if absent
  193. } INSTALLMODE;
  194. ;begin_internal
  195. #if (_WIN32_MSI >= 150)
  196. #define INSTALLMODE_NODETECTION_ANY (INSTALLMODE)-4 // provide any, if available, supported internally for MsiProvideAssembly
  197. #endif
  198. ;end_internal
  199. ;begin_internal
  200. #if (_WIN32_MSI >= 150)
  201. typedef enum tagMIGRATIONOPTIONS
  202. {
  203. migQuiet = 1 << 0,
  204. migMsiTrust10PackagePolicyOverride = 1 << 1,
  205. } MIGRATIONOPTIONS;
  206. #endif
  207. ;end_internal
  208. #define MAX_FEATURE_CHARS 38 // maximum chars in feature name (same as string GUID)
  209. // Product info attributes: advertised information
  210. #define INSTALLPROPERTY_PACKAGENAME __TEXT("PackageName")
  211. #define INSTALLPROPERTY_TRANSFORMS __TEXT("Transforms")
  212. #define INSTALLPROPERTY_LANGUAGE __TEXT("Language")
  213. #define INSTALLPROPERTY_PRODUCTNAME __TEXT("ProductName")
  214. #define INSTALLPROPERTY_ASSIGNMENTTYPE __TEXT("AssignmentType")
  215. #if (_WIN32_MSI >= 150)
  216. #define INSTALLPROPERTY_INSTANCETYPE __TEXT("InstanceType")
  217. #endif //(_WIN32_MSI >= 150)
  218. ;begin_internal
  219. #define INSTALLPROPERTY_ADVTFLAGS __TEXT("AdvertiseFlags")
  220. ;end_internal
  221. #define INSTALLPROPERTY_PACKAGECODE __TEXT("PackageCode")
  222. #define INSTALLPROPERTY_VERSION __TEXT("Version")
  223. #if (_WIN32_MSI >= 110)
  224. #define INSTALLPROPERTY_PRODUCTICON __TEXT("ProductIcon")
  225. #endif //(_WIN32_MSI >= 110)
  226. // Product info attributes: installed information
  227. #define INSTALLPROPERTY_INSTALLEDPRODUCTNAME __TEXT("InstalledProductName")
  228. #define INSTALLPROPERTY_VERSIONSTRING __TEXT("VersionString")
  229. #define INSTALLPROPERTY_HELPLINK __TEXT("HelpLink")
  230. #define INSTALLPROPERTY_HELPTELEPHONE __TEXT("HelpTelephone")
  231. #define INSTALLPROPERTY_INSTALLLOCATION __TEXT("InstallLocation")
  232. #define INSTALLPROPERTY_INSTALLSOURCE __TEXT("InstallSource")
  233. #define INSTALLPROPERTY_INSTALLDATE __TEXT("InstallDate")
  234. #define INSTALLPROPERTY_PUBLISHER __TEXT("Publisher")
  235. #define INSTALLPROPERTY_LOCALPACKAGE __TEXT("LocalPackage")
  236. #define INSTALLPROPERTY_URLINFOABOUT __TEXT("URLInfoAbout")
  237. #define INSTALLPROPERTY_URLUPDATEINFO __TEXT("URLUpdateInfo")
  238. #define INSTALLPROPERTY_VERSIONMINOR __TEXT("VersionMinor")
  239. #define INSTALLPROPERTY_VERSIONMAJOR __TEXT("VersionMajor")
  240. typedef enum tagSCRIPTFLAGS
  241. {
  242. SCRIPTFLAGS_CACHEINFO = 0x00000001L, // set if the icons need to be created/ removed
  243. SCRIPTFLAGS_SHORTCUTS = 0x00000004L, // set if the shortcuts needs to be created/ deleted
  244. SCRIPTFLAGS_MACHINEASSIGN = 0x00000008L, // set if product to be assigned to machine
  245. SCRIPTFLAGS_REGDATA_CNFGINFO = 0x00000020L, // set if the product cnfg mgmt. registry data needs to be written/ removed
  246. SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST = 0x00000040L,
  247. #if (_WIN32_MSI >= 110)
  248. SCRIPTFLAGS_REGDATA_CLASSINFO = 0x00000080L, // set if COM classes related app info needs to be created/ deleted
  249. SCRIPTFLAGS_REGDATA_EXTENSIONINFO = 0x00000100L, // set if extension related app info needs to be created/ deleted
  250. SCRIPTFLAGS_REGDATA_APPINFO = SCRIPTFLAGS_REGDATA_CLASSINFO | SCRIPTFLAGS_REGDATA_EXTENSIONINFO, // for source level backward compatibility
  251. #else //_WIN32_MSI == 100
  252. SCRIPTFLAGS_REGDATA_APPINFO = 0x00000010L,
  253. #endif //(_WIN32_MSI >= 110)
  254. SCRIPTFLAGS_REGDATA = SCRIPTFLAGS_REGDATA_APPINFO | SCRIPTFLAGS_REGDATA_CNFGINFO, // for source level backward compatibility
  255. }SCRIPTFLAGS;
  256. typedef enum tagADVERTISEFLAGS
  257. {
  258. ADVERTISEFLAGS_MACHINEASSIGN = 0, // set if the product is to be machine assigned
  259. ADVERTISEFLAGS_USERASSIGN = 1, // set if the product is to be user assigned
  260. }ADVERTISEFLAGS;
  261. typedef enum tagINSTALLTYPE
  262. {
  263. INSTALLTYPE_DEFAULT = 0, // set to indicate default behavior
  264. INSTALLTYPE_NETWORK_IMAGE = 1, // set to indicate network install
  265. INSTALLTYPE_SINGLE_INSTANCE = 2, // set to indicate a particular instance
  266. }INSTALLTYPE;
  267. #if (_WIN32_MSI >= 150)
  268. typedef struct _MSIFILEHASHINFO {
  269. ULONG dwFileHashInfoSize;
  270. ULONG dwData [ 4 ];
  271. } MSIFILEHASHINFO, *PMSIFILEHASHINFO;
  272. typedef enum tagMSIARCHITECTUREFLAGS
  273. {
  274. MSIARCHITECTUREFLAGS_X86 = 0x00000001L, // set if creating the script for i386 platform
  275. MSIARCHITECTUREFLAGS_IA64 = 0x00000002L, // set if creating the script for IA64 platform
  276. }MSIARCHITECTUREFLAGS;
  277. typedef enum tagMSIOPENPACKAGEFLAGS
  278. {
  279. MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = 0x00000001L, // ignore the machine state when creating the engine
  280. }MSIOPENPACKAGEFLAGS;
  281. typedef enum tagMSIADVERTISEOPTIONFLAGS
  282. {
  283. MSIADVERTISEOPTIONFLAGS_INSTANCE = 0x00000001L, // set if advertising a new instance
  284. }MSIADVERTISEOPTIONFLAGS;
  285. #endif //(_WIN32_MSI >= 150)
  286. ;begin_both
  287. #ifdef __cplusplus
  288. extern "C" {
  289. #endif
  290. ;end_both
  291. // --------------------------------------------------------------------------
  292. // Functions to set the UI handling and logging. The UI will be used for error,
  293. // progress, and log messages for all subsequent calls to Installer Service
  294. // API functions that require UI.
  295. // --------------------------------------------------------------------------
  296. // Enable internal UI
  297. INSTALLUILEVEL WINAPI MsiSetInternalUI(
  298. INSTALLUILEVEL dwUILevel, // UI level
  299. HWND *phWnd); // handle of owner window
  300. // Enable external UI handling, returns any previous handler or NULL if none.
  301. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  302. INSTALLUI_HANDLER% WINAPI MsiSetExternalUI%(
  303. INSTALLUI_HANDLER% puiHandler, // for progress and error handling
  304. DWORD dwMessageFilter, // bit flags designating messages to handle
  305. LPVOID pvContext); // application context
  306. // Enable logging to a file for all install sessions for the client process,
  307. // with control over which log messages are passed to the specified log file.
  308. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  309. UINT WINAPI MsiEnableLog%(
  310. DWORD dwLogMode, // bit flags designating operations to report
  311. LPCTSTR% szLogFile, // log file, or NULL to disable logging
  312. DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
  313. // --------------------------------------------------------------------------
  314. // Functions to query and configure a product as a whole.
  315. // --------------------------------------------------------------------------
  316. // Return the installed state for a product
  317. INSTALLSTATE WINAPI MsiQueryProductState%(
  318. LPCTSTR% szProduct);
  319. // Return product info
  320. UINT WINAPI MsiGetProductInfo%(
  321. LPCTSTR% szProduct, // product code
  322. LPCTSTR% szAttribute, // attribute name, case-sensitive
  323. LPTSTR% lpValueBuf, // returned value, NULL if not desired
  324. DWORD *pcchValueBuf); // in/out buffer character count
  325. // Install a new product.
  326. // Either may be NULL, but the DATABASE property must be specfied
  327. UINT WINAPI MsiInstallProduct%(
  328. LPCTSTR% szPackagePath, // location of package to install
  329. LPCTSTR% szCommandLine); // command line <property settings>
  330. // Install/uninstall an advertised or installed product
  331. // No action if installed and INSTALLSTATE_DEFAULT specified
  332. UINT WINAPI MsiConfigureProduct%(
  333. LPCTSTR% szProduct, // product code
  334. int iInstallLevel, // how much of the product to install
  335. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  336. // Install/uninstall an advertised or installed product
  337. // No action if installed and INSTALLSTATE_DEFAULT specified
  338. UINT WINAPI MsiConfigureProductEx%(
  339. LPCTSTR% szProduct, // product code
  340. int iInstallLevel, // how much of the product to install
  341. INSTALLSTATE eInstallState, // local/source/default/absent/lock/uncache
  342. LPCTSTR% szCommandLine); // command line <property settings>
  343. // Reinstall product, used to validate or correct problems
  344. UINT WINAPI MsiReinstallProduct%(
  345. LPCTSTR% szProduct, // product code
  346. DWORD szReinstallMode); // one or more REINSTALLMODE modes
  347. #if (_WIN32_MSI >= 150)
  348. // Output reg and shortcut info to script file for specified architecture for Assign or Publish
  349. // If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
  350. // If dwPlatform specifies a platform, then the script is created as if the current platform is the
  351. // platform specified in dwPlatform
  352. // If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance is advertised. Use of
  353. // this option requires that szTransforms include the instance transform that changes the product code
  354. UINT WINAPI MsiAdvertiseProductEx%(
  355. LPCTSTR% szPackagePath, // location of package
  356. LPCTSTR% szScriptfilePath, // if NULL, product is locally advertised
  357. LPCTSTR% szTransforms, // list of transforms to be applied
  358. LANGID lgidLanguage, // install language
  359. DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that control for which platform
  360. // to create the script, ignored if szScriptfilePath is NULL
  361. DWORD dwOptions); // the MSIADVERTISEOPTIONSFLAGS that specify extra advertise parameters
  362. #endif // (_WIN32_MSI >= 150)
  363. // Output reg and shortcut info to script file for Assign or Publish
  364. UINT WINAPI MsiAdvertiseProduct%(
  365. LPCTSTR% szPackagePath, // location of package
  366. LPCTSTR% szScriptfilePath, // if NULL, product is locally advertised
  367. LPCTSTR% szTransforms, // list of transforms to be applied
  368. LANGID lgidLanguage); // install language
  369. #if (_WIN32_MSI >= 150)
  370. // Process advertise script file into supplied locations
  371. // If an icon folder is specified, icon files will be placed there
  372. // If an registry key is specified, registry data will be mapped under it
  373. // If fShortcuts is TRUE, shortcuts will be created. If a special folder is
  374. // returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
  375. // if fRemoveItems is TRUE, items that are present will be removed
  376. UINT WINAPI MsiProcessAdvertiseScript%(
  377. LPCTSTR% szScriptFile, // path to script from MsiAdvertiseProduct
  378. LPCTSTR% szIconFolder, // optional path to folder for icon files and transforms
  379. HKEY hRegData, // optional parent registry key
  380. BOOL fShortcuts, // TRUE if shortcuts output to special folder
  381. BOOL fRemoveItems); // TRUE if specified items are to be removed
  382. #endif // (_WIN32_MSI >= 150)
  383. // Process advertise script file using the supplied dwFlags control flags
  384. // if fRemoveItems is TRUE, items that are present will be removed
  385. UINT WINAPI MsiAdvertiseScript%(
  386. LPCTSTR% szScriptFile, // path to script from MsiAdvertiseProduct
  387. DWORD dwFlags, // the SCRIPTFLAGS bit flags that control the script execution
  388. PHKEY phRegData, // optional parent registry key
  389. BOOL fRemoveItems); // TRUE if specified items are to be removed
  390. ;begin_internal
  391. // Return a product code for a product installed from an installer package
  392. UINT WINAPI MsiGetProductCodeFromPackageCode%(
  393. LPCTSTR% szPackageCode, // package code
  394. LPTSTR% lpProductBuf39); // buffer for product code string GUID, 39 chars
  395. ;end_internal
  396. // Return product info from an installer script file:
  397. // product code, language, version, readable name, path to package
  398. // Returns TRUE is success, FALSE if szScriptFile is not a valid script file
  399. UINT WINAPI MsiGetProductInfoFromScript%(
  400. LPCTSTR% szScriptFile, // path to installer script file
  401. LPTSTR% lpProductBuf39, // buffer for product code string GUID, 39 chars
  402. LANGID *plgidLanguage, // return language Id
  403. DWORD *pdwVersion, // return version: Maj:Min:Build <8:8:16>
  404. LPTSTR% lpNameBuf, // buffer to return readable product name
  405. DWORD *pcchNameBuf, // in/out name buffer character count
  406. LPTSTR% lpPackageBuf, // buffer for path to product package
  407. DWORD *pcchPackageBuf);// in/out path buffer character count
  408. // Return the product code for a registered component, called once by apps
  409. UINT WINAPI MsiGetProductCode%(
  410. LPCTSTR% szComponent, // component Id registered for this product
  411. LPTSTR% lpBuf39); // returned string GUID, sized for 39 characters
  412. // Return the registered user information for an installed product
  413. USERINFOSTATE WINAPI MsiGetUserInfo%(
  414. LPCTSTR% szProduct, // product code, string GUID
  415. LPTSTR% lpUserNameBuf, // return user name
  416. DWORD *pcchUserNameBuf, // in/out buffer character count
  417. LPTSTR% lpOrgNameBuf, // return company name
  418. DWORD *pcchOrgNameBuf, // in/out buffer character count
  419. LPTSTR% lpSerialBuf, // return product serial number
  420. DWORD *pcchSerialBuf); // in/out buffer character count
  421. // Obtain and store user info and PID from installation wizard (first run)
  422. UINT WINAPI MsiCollectUserInfo%(
  423. LPCTSTR% szProduct); // product code, string GUID
  424. // --------------------------------------------------------------------------
  425. // Functions to patch existing products
  426. // --------------------------------------------------------------------------
  427. // Patch all possible installed products.
  428. UINT WINAPI MsiApplyPatch%(
  429. LPCTSTR% szPatchPackage, // location of patch package
  430. LPCTSTR% szInstallPackage, // location of package for install to patch <optional>
  431. INSTALLTYPE eInstallType, // type of install to patch
  432. LPCTSTR% szCommandLine); // command line <property settings>
  433. // Return patch info
  434. UINT WINAPI MsiGetPatchInfo%(
  435. LPCTSTR% szPatch, // patch code
  436. LPCTSTR% szAttribute, // attribute name, case-sensitive
  437. LPTSTR% lpValueBuf, // returned value, NULL if not desired
  438. DWORD *pcchValueBuf); // in/out buffer character count
  439. // Enumerate all patches for a product
  440. UINT WINAPI MsiEnumPatches%(
  441. LPCTSTR% szProduct,
  442. DWORD iPatchIndex,
  443. LPTSTR% lpPatchBuf,
  444. LPTSTR% lpTransformsBuf,
  445. DWORD *pcchTransformsBuf);
  446. // --------------------------------------------------------------------------
  447. // Functions to query and configure a feature within a product.
  448. // --------------------------------------------------------------------------
  449. // Return the installed state for a product feature
  450. INSTALLSTATE WINAPI MsiQueryFeatureState%(
  451. LPCTSTR% szProduct,
  452. LPCTSTR% szFeature);
  453. // Indicate intent to use a product feature, increments usage count
  454. // Prompts for CD if not loaded, does not install feature
  455. INSTALLSTATE WINAPI MsiUseFeature%(
  456. LPCTSTR% szProduct,
  457. LPCTSTR% szFeature);
  458. // Indicate intent to use a product feature, increments usage count
  459. // Prompts for CD if not loaded, does not install feature
  460. // Allows for bypassing component detection where performance is critical
  461. INSTALLSTATE WINAPI MsiUseFeatureEx%(
  462. LPCTSTR% szProduct, // product code
  463. LPCTSTR% szFeature, // feature ID
  464. DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
  465. DWORD dwReserved); // reserved, must be 0
  466. // Return the usage metrics for a product feature
  467. UINT WINAPI MsiGetFeatureUsage%(
  468. LPCTSTR% szProduct, // product code
  469. LPCTSTR% szFeature, // feature ID
  470. DWORD *pdwUseCount, // returned use count
  471. WORD *pwDateUsed); // last date used (DOS date format)
  472. // Force the installed state for a product feature
  473. UINT WINAPI MsiConfigureFeature%(
  474. LPCTSTR% szProduct,
  475. LPCTSTR% szFeature,
  476. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  477. // Reinstall feature, used to validate or correct problems
  478. UINT WINAPI MsiReinstallFeature%(
  479. LPCTSTR% szProduct, // product code
  480. LPCTSTR% szFeature, // feature ID, NULL for entire product
  481. DWORD dwReinstallMode); // one or more REINSTALLMODE modes
  482. // --------------------------------------------------------------------------
  483. // Functions to return a path to a particular component.
  484. // The state of the feature being used should have been checked previously.
  485. // --------------------------------------------------------------------------
  486. // Return full component path, performing any necessary installation
  487. // calls MsiQueryFeatureState to detect that all components are installed
  488. // then calls MsiConfigureFeature if any of its components are uninstalled
  489. // then calls MsiLocateComponent to obtain the path the its key file
  490. UINT WINAPI MsiProvideComponent%(
  491. LPCTSTR% szProduct, // product code in case install required
  492. LPCTSTR% szFeature, // feature ID in case install required
  493. LPCTSTR% szComponent, // component ID
  494. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  495. LPTSTR% lpPathBuf, // returned path, NULL if not desired
  496. DWORD *pcchPathBuf);// in/out buffer character count
  497. // Return full component path for a qualified component, performing any necessary installation.
  498. // Prompts for source if necessary and increments the usage count for the feature.
  499. UINT WINAPI MsiProvideQualifiedComponent%(
  500. LPCTSTR% szCategory, // component category ID
  501. LPCTSTR% szQualifier, // specifies which component to access
  502. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  503. LPTSTR% lpPathBuf, // returned path, NULL if not desired
  504. DWORD *pcchPathBuf); // in/out buffer character count
  505. // Return full component path for a qualified component, performing any necessary installation.
  506. // Prompts for source if necessary and increments the usage count for the feature.
  507. // The szProduct parameter specifies the product to match that has published the qualified
  508. // component. If null, this API works the same as MsiProvideQualifiedComponent.
  509. UINT WINAPI MsiProvideQualifiedComponentEx%(
  510. LPCTSTR% szCategory, // component category ID
  511. LPCTSTR% szQualifier, // specifies which component to access
  512. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  513. LPCTSTR% szProduct, // the product code
  514. DWORD dwUnused1, // not used, must be zero
  515. DWORD dwUnused2, // not used, must be zero
  516. LPTSTR% lpPathBuf, // returned path, NULL if not desired
  517. DWORD *pcchPathBuf); // in/out buffer character count
  518. // Return full path to an installed component
  519. INSTALLSTATE WINAPI MsiGetComponentPath%(
  520. LPCTSTR% szProduct, // product code for client product
  521. LPCTSTR% szComponent, // component Id, string GUID
  522. LPTSTR% lpPathBuf, // returned path
  523. DWORD *pcchBuf); // in/out buffer character count
  524. #if (_WIN32_MSI >= 150)
  525. #define MSIASSEMBLYINFO_NETASSEMBLY 0 // Net assemblies
  526. #define MSIASSEMBLYINFO_WIN32ASSEMBLY 1 // Win32 assemblies
  527. // Return full component path for an assembly installed via the WI, performing any necessary installation.
  528. // Prompts for source if necessary and increments the usage count for the feature.
  529. // The szAssemblyName parameter specifies the stringized assembly name.
  530. // The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested
  531. // has been privatised to, which is null for global assemblies
  532. UINT WINAPI MsiProvideAssembly%(
  533. LPCTSTR% szAssemblyName, // stringized assembly name
  534. LPCTSTR% szAppContext, // specifies the full path to the parent asm's .cfg file, null for global assemblies
  535. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  536. DWORD dwAssemblyInfo, // assembly info, including assembly type
  537. LPTSTR% lpPathBuf, // returned path, NULL if not desired
  538. DWORD *pcchPathBuf); // in/out buffer character count
  539. #endif //(_WIN32_MSI >= 150)
  540. ;begin_internal
  541. // --------------------------------------------------------------------------
  542. // Functions accepting a component descriptor, consisting of
  543. // a product code concatenated with a feature ID and component ID.
  544. // For efficiency, feature and component may be omitted if unambiguous
  545. // --------------------------------------------------------------------------
  546. // Return full component path given a fully-qualified component descriptor
  547. // separates the tokens from the descriptor and calls MsiProvideComponent
  548. UINT WINAPI MsiProvideComponentFromDescriptor%(
  549. LPCTSTR% szDescriptor, // product,feature,component info
  550. LPTSTR% lpPathBuf, // returned path, NULL if not desired
  551. DWORD *pcchPathBuf, // in/out buffer character count
  552. DWORD *pcchArgsOffset); // returned offset of args in descriptor
  553. // Force the installed state for a product feature from a descriptor
  554. UINT WINAPI MsiConfigureFeatureFromDescriptor%(
  555. LPCTSTR% szDescriptor, // product and feature, component ignored
  556. INSTALLSTATE eInstallState); // local/source/default/absent
  557. // Reinstall product or feature using a descriptor as the specification
  558. UINT WINAPI MsiReinstallFeatureFromDescriptor%(
  559. LPCTSTR% szDescriptor, // product and feature, component ignored
  560. DWORD szReinstallMode); // one or more REINSTALLMODE modes
  561. // Query a feature's state using a descriptor as the specification
  562. INSTALLSTATE WINAPI MsiQueryFeatureStateFromDescriptor%(
  563. LPCTSTR% szDescriptor); // product and feature, component ignored
  564. UINT WINAPI MsiDecomposeDescriptor%(
  565. LPCTSTR% szDescriptor,
  566. LPTSTR% szProductCode,
  567. LPTSTR% szFeatureId,
  568. LPTSTR% szComponentCode,
  569. DWORD* pcchArgsOffset);
  570. ;end_internal
  571. // --------------------------------------------------------------------------
  572. // Functions to iterate registered products, features, and components.
  573. // As with reg keys, they accept a 0-based index into the enumeration.
  574. // --------------------------------------------------------------------------
  575. // Enumerate the registered products, either installed or advertised
  576. UINT WINAPI MsiEnumProducts%(
  577. DWORD iProductIndex, // 0-based index into registered products
  578. LPTSTR% lpProductBuf); // buffer of char count: 39 (size of string GUID)
  579. #if (_WIN32_MSI >= 110)
  580. // Enumerate products with given upgrade code
  581. UINT WINAPI MsiEnumRelatedProducts%(
  582. LPCTSTR% lpUpgradeCode, // upgrade code of products to enumerate
  583. DWORD dwReserved, // reserved, must be 0
  584. DWORD iProductIndex, // 0-based index into registered products
  585. LPTSTR% lpProductBuf); // buffer of char count: 39 (size of string GUID)
  586. #endif //(_WIN32_MSI >= 110)
  587. // Enumerate the advertised features for a given product.
  588. // If parent is not required, supplying NULL will improve performance.
  589. UINT WINAPI MsiEnumFeatures%(
  590. LPCTSTR% szProduct,
  591. DWORD iFeatureIndex, // 0-based index into published features
  592. LPTSTR% lpFeatureBuf, // feature name buffer, size=MAX_FEATURE_CHARS+1
  593. LPTSTR% lpParentBuf); // parent feature buffer, size=MAX_FEATURE_CHARS+1
  594. // Enumerate the installed components for all products
  595. UINT WINAPI MsiEnumComponents%(
  596. DWORD iComponentIndex, // 0-based index into installed components
  597. LPTSTR% lpComponentBuf); // buffer of char count: 39 (size of string GUID)
  598. // Enumerate the client products for a component
  599. UINT WINAPI MsiEnumClients%(
  600. LPCTSTR% szComponent,
  601. DWORD iProductIndex, // 0-based index into client products
  602. LPTSTR% lpProductBuf); // buffer of char count: 39 (size of string GUID)
  603. // Enumerate the qualifiers for an advertised component.
  604. UINT WINAPI MsiEnumComponentQualifiers%(
  605. LPCTSTR% szComponent, // generic component ID that is qualified
  606. DWORD iIndex, // 0-based index into qualifiers
  607. LPTSTR% lpQualifierBuf, // qualifier buffer
  608. DWORD *pcchQualifierBuf, // in/out qualifier buffer character count
  609. LPTSTR% lpApplicationDataBuf, // description buffer
  610. DWORD *pcchApplicationDataBuf); // in/out description buffer character count
  611. // --------------------------------------------------------------------------
  612. // Functions to obtain product or package information.
  613. // --------------------------------------------------------------------------
  614. // Open the installation for a product to obtain detailed information
  615. UINT WINAPI MsiOpenProduct%(
  616. LPCTSTR% szProduct, // product code
  617. MSIHANDLE *hProduct); // returned product handle, must be closed
  618. // Open a product package in order to access product properties
  619. UINT WINAPI MsiOpenPackage%(
  620. LPCTSTR% szPackagePath, // path to package, or database handle: #nnnn
  621. MSIHANDLE *hProduct); // returned product handle, must be closed
  622. #if (_WIN32_MSI >= 150)
  623. // Open a product package in order to access product properties
  624. // Option to create a "safe" engine that does not look at machine state
  625. // and does not allow for modification of machine state
  626. UINT WINAPI MsiOpenPackageEx%(
  627. LPCTSTR% szPackagePath, // path to package, or database handle: #nnnn
  628. DWORD dwOptions, // options flags to indicate whether or not to ignore machine state
  629. MSIHANDLE *hProduct); // returned product handle, must be closed
  630. #endif //(_WIN32_MSI >= 150)
  631. // Provide the value for an installation property.
  632. UINT WINAPI MsiGetProductProperty%(
  633. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  634. LPCTSTR% szProperty, // property name, case-sensitive
  635. LPTSTR% lpValueBuf, // returned value, NULL if not desired
  636. DWORD *pcchValueBuf); // in/out buffer character count
  637. // Determine whether a file is a package
  638. // Returns ERROR_SUCCESS if file is a package.
  639. UINT WINAPI MsiVerifyPackage%(
  640. LPCTSTR% szPackagePath); // location of package
  641. // Provide descriptive information for product feature: title and description.
  642. // Returns the install level for the feature, or -1 if feature is unknown.
  643. // 0 = feature is not available on this machine
  644. // 1 = highest priority, feature installed if parent is installed
  645. // >1 = decreasing priority, feature installation based on InstallLevel property
  646. UINT WINAPI MsiGetFeatureInfo%(
  647. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  648. LPCTSTR% szFeature, // feature name
  649. DWORD *lpAttributes, // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  650. LPTSTR% lpTitleBuf, // returned localized name, NULL if not desired
  651. DWORD *pcchTitleBuf, // in/out buffer character count
  652. LPTSTR% lpHelpBuf, // returned description, NULL if not desired
  653. DWORD *pcchHelpBuf); // in/out buffer character count
  654. // --------------------------------------------------------------------------
  655. // Functions to access or install missing components and files.
  656. // These should be used as a last resort.
  657. // --------------------------------------------------------------------------
  658. // Install a component unexpectedly missing, provided only for error recovery
  659. // This would typically occur due to failue to establish feature availability
  660. // The product feature having the smallest incremental cost is installed
  661. UINT WINAPI MsiInstallMissingComponent%(
  662. LPCTSTR% szProduct, // product code
  663. LPCTSTR% szComponent, // component Id, string GUID
  664. INSTALLSTATE eInstallState); // local/source/default, absent invalid
  665. // Install a file unexpectedly missing, provided only for error recovery
  666. // This would typically occur due to failue to establish feature availability
  667. // The missing component is determined from the product's File table, then
  668. // the product feature having the smallest incremental cost is installed
  669. UINT WINAPI MsiInstallMissingFile%(
  670. LPCTSTR% szProduct, // product code
  671. LPCTSTR% szFile); // file name, without path
  672. // Return full path to an installed component without a product code
  673. // This function attempts to determine the product using MsiGetProductCode
  674. // but is not guaranteed to find the correct product for the caller.
  675. // MsiGetComponentPath should always be called when possible.
  676. INSTALLSTATE WINAPI MsiLocateComponent%(
  677. LPCTSTR% szComponent, // component Id, string GUID
  678. LPTSTR% lpPathBuf, // returned path
  679. DWORD *pcchBuf); // in/out buffer character count
  680. #if (_WIN32_MSI >= 110)
  681. // --------------------------------------------------------------------------
  682. // Functions used to manage the list of valid sources.
  683. // --------------------------------------------------------------------------
  684. // Opens the list of sources for the specified user's install of the product
  685. // and removes all network sources from the list. A NULL or empty value for
  686. // the user name indicates the per-machine install.
  687. UINT WINAPI MsiSourceListClearAll%(
  688. LPCTSTR% szProduct, // product code
  689. LPCTSTR% szUserName, // user name or NULL/empty for per-machine
  690. DWORD dwReserved); // reserved - must be 0
  691. // Opens the list of sources for the specified user's install of the product
  692. // and adds the provided source as a new network source. A NULL or empty
  693. // value for the user name indicates the per-machine install.
  694. UINT WINAPI MsiSourceListAddSource%(
  695. LPCTSTR% szProduct, // product code
  696. LPCTSTR% szUserName, // user name or NULL/empty for per-machine
  697. DWORD dwReserved, // reserved - must be 0
  698. LPCTSTR% szSource); // new source
  699. // Forces the installer to reevaluate the list of sources the next time that
  700. // the specified product needs a source.
  701. UINT WINAPI MsiSourceListForceResolution%(
  702. LPCTSTR% szProduct, // product code
  703. LPCTSTR% szUserName, // user name or NULL/empty for per-machine
  704. DWORD dwReserved); // reserved - must be 0
  705. #endif //(_WIN32_MSI >= 110)
  706. // --------------------------------------------------------------------------
  707. // Utility functions
  708. // --------------------------------------------------------------------------
  709. // Give the version string and language for a specified file
  710. UINT WINAPI MsiGetFileVersion%(
  711. LPCTSTR% szFilePath, // path to the file
  712. LPTSTR% lpVersionBuf, // returned version string
  713. DWORD *pcchVersionBuf, // in/out buffer byte count
  714. LPTSTR% lpLangBuf, // returned language string
  715. DWORD *pcchLangBuf); // in/out buffer byte count
  716. #if (_WIN32_MSI >= 150)
  717. UINT WINAPI MsiGetFileHash%(
  718. LPCTSTR% szFilePath, // path to the file
  719. DWORD dwOptions, // options
  720. PMSIFILEHASHINFO pHash); // returned file hash info
  721. #endif //(_WIN32_MSI >= 150)
  722. #if (_WIN32_MSI >= 150)
  723. #ifndef _MSI_NO_CRYPTO
  724. HRESULT WINAPI MsiGetFileSignatureInformation%(
  725. LPCTSTR% szSignedObjectPath, // path to the signed object
  726. DWORD dwFlags, // special extra error case flags
  727. PCCERT_CONTEXT *ppcCertContext, // returned signer cert context
  728. BYTE *pbHashData, // returned hash buffer, NULL if not desired
  729. DWORD *pcbHashData); // in/out buffer byte count
  730. // By default, when only requesting the certificate context, an invalid hash
  731. // in the digital signature is not a fatal error. Set this flag in the dwFlags
  732. // parameter to make the TRUST_E_BAD_DIGEST error fatal.
  733. #define MSI_INVALID_HASH_IS_FATAL 0x1
  734. #endif// _MSI_NO_CRYPTO
  735. #endif //(_WIN32_MSI >= 150)
  736. #if (_WIN32_MSI >= 110)
  737. // examine a shortcut, and retrieve its descriptor information
  738. // if available.
  739. UINT WINAPI MsiGetShortcutTarget%(
  740. LPCTSTR% szShortcutPath, // full file path for the shortcut
  741. LPTSTR% szProductCode, // returned product code - GUID
  742. LPTSTR% szFeatureId, // returned Feature Id.
  743. LPTSTR% szComponentCode); // returned component code - GUID
  744. #endif //(_WIN32_MSI >= 110)
  745. #if (_WIN32_MSI >= 110)
  746. // checks to see if a product is managed
  747. // checks per-machine if called from system context, per-user if from
  748. // user context
  749. UINT WINAPI MsiIsProductElevated%(
  750. LPCTSTR% szProduct, // product code
  751. BOOL *pfElevated); // result
  752. #endif //(_WIN32_MSI >= 110)
  753. ;begin_internal
  754. // Load a string resource, preferring a specified language
  755. // Behaves like LoadString if 0 passed as language
  756. // Truncates string as necessary to fit into buffer (like LoadString)
  757. // Returns the codepage of the string, or 0 if string is not found
  758. UINT WINAPI MsiLoadString%(
  759. HINSTANCE hInstance, // handle of module containing string resource
  760. UINT uID, // resource identifier
  761. LPTSTR% lpBuffer, // address of buffer for resource
  762. int nBufferMax, // size of buffer
  763. WORD wLanguage); // preferred resource language
  764. // MessageBox implementation that allows language information to be specified
  765. // MB_SYSTEMMODAL and MB_TASKMODAL are not supported, modality handled by parent hWnd
  766. // If no parent window is specified, the current context window will be used,
  767. // which is itself parented to the window set by SetInternalUI.
  768. int WINAPI MsiMessageBox%(
  769. HWND hWnd, // parent window handle, 0 to use that of current context
  770. LPCTSTR% lpText, // message text
  771. LPCTSTR% lpCaption, // caption, must be neutral or in system codepage
  772. UINT uiType, // standard MB types, icons, and def buttons
  773. UINT uiCodepage, // codepage of message text, used to set font charset
  774. LANGID iLangId); // language to use for button text
  775. #if (_WIN32_MSI >= 150)
  776. // Creates the %systemroot%\Installer directory with secure ACLs
  777. // Verifies the ownership of the %systemroot%\Installer directory if it exists
  778. // If ownership is not system or admin, the directory is deleted and recreated
  779. // dwReserved is for future use and must be 0
  780. UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved);
  781. #endif //(_WIN32_MSI >= 150)
  782. ;end_internal
  783. ;begin_internal
  784. #if (_WIN32_MSI >= 150)
  785. // Caller notifies us of a user who's been moved and results sid change. This
  786. // internal API is only called by LoadUserProfile.
  787. UINT WINAPI MsiNotifySidChange%(LPCTSTR% pOldSid,
  788. LPCTSTR% pNewSid);
  789. #endif //(_WIN32_MSI >= 150)
  790. ;end_internal
  791. ;begin_internal
  792. #if (_WIN32_MSI >= 150)
  793. // Called by DeleteProfile to clean up MSI data when cleaning up a user's
  794. // profile.
  795. UINT WINAPI MsiDeleteUserData%(LPCTSTR% pSid,
  796. LPCTSTR% pComputerName,
  797. LPVOID pReserved);
  798. #endif //(_WIN32_MSI >= 150)
  799. ;end_internal
  800. // --------------------------------------------------------------------------
  801. // Internal state migration APIs.
  802. // --------------------------------------------------------------------------
  803. ;begin_internal
  804. #if (_WIN32_MSI >= 150)
  805. DWORD WINAPI Migrate10CachedPackages%(
  806. LPCTSTR% szProductCode, // Product Code GUID to migrate
  807. LPCTSTR% szUser, // Domain\User to migrate packages for
  808. LPCTSTR% szAlternativePackage, // Package to cache if one can't be automatically found - recommended
  809. const MIGRATIONOPTIONS migOptions); // Options for re-caching.
  810. #endif //(_WIN32_MSI >= 150)
  811. ;end_internal
  812. ;begin_both
  813. #ifdef __cplusplus
  814. }
  815. #endif
  816. ;end_both
  817. // --------------------------------------------------------------------------
  818. // Error codes for installer access functions - until merged to winerr.h
  819. // --------------------------------------------------------------------------
  820. #ifndef ERROR_INSTALL_FAILURE
  821. #define ERROR_INSTALL_USEREXIT 1602L // User cancel installation.
  822. #define ERROR_INSTALL_FAILURE 1603L // Fatal error during installation.
  823. #define ERROR_INSTALL_SUSPEND 1604L // Installation suspended, incomplete.
  824. // LOCALIZE BEGIN:
  825. #define ERROR_UNKNOWN_PRODUCT 1605L // This action is only valid for products that are currently installed.
  826. // LOCALIZE END
  827. #define ERROR_UNKNOWN_FEATURE 1606L // Feature ID not registered.
  828. #define ERROR_UNKNOWN_COMPONENT 1607L // Component ID not registered.
  829. #define ERROR_UNKNOWN_PROPERTY 1608L // Unknown property.
  830. #define ERROR_INVALID_HANDLE_STATE 1609L // Handle is in an invalid state.
  831. // LOCALIZE BEGIN:
  832. #define ERROR_BAD_CONFIGURATION 1610L // The configuration data for this product is corrupt. Contact your support personnel.
  833. // LOCALIZE END:
  834. #define ERROR_INDEX_ABSENT 1611L // Component qualifier not present.
  835. // LOCALIZE BEGIN:
  836. #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.
  837. // LOCALIZE END
  838. #define ERROR_PRODUCT_UNINSTALLED 1614L // Product is uninstalled.
  839. #define ERROR_BAD_QUERY_SYNTAX 1615L // SQL query syntax invalid or unsupported.
  840. #define ERROR_INVALID_FIELD 1616L // Record field does not exist.
  841. #endif
  842. // LOCALIZE BEGIN:
  843. #ifndef ERROR_INSTALL_SERVICE_FAILURE
  844. #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.
  845. #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.
  846. #define ERROR_INSTALL_ALREADY_RUNNING 1618L // Another installation is already in progress. Complete that installation before proceeding with this install.
  847. #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.
  848. #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.
  849. #define ERROR_INSTALL_UI_FAILURE 1621L // There was an error starting the Windows Installer service user interface. Contact your support personnel.
  850. #define ERROR_INSTALL_LOG_FAILURE 1622L // Error opening installation log file. Verify that the specified log file location exists and is writable.
  851. #define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L // This language of this installation package is not supported by your system.
  852. #define ERROR_INSTALL_PACKAGE_REJECTED 1625L // The system administrator has set policies to prevent this installation.
  853. // LOCALIZE END
  854. #define ERROR_FUNCTION_NOT_CALLED 1626L // Function could not be executed.
  855. #define ERROR_FUNCTION_FAILED 1627L // Function failed during execution.
  856. #define ERROR_INVALID_TABLE 1628L // Invalid or unknown table specified.
  857. #define ERROR_DATATYPE_MISMATCH 1629L // Data supplied is of wrong type.
  858. #define ERROR_UNSUPPORTED_TYPE 1630L // Data of this type is not supported.
  859. // LOCALIZE BEGIN:
  860. #define ERROR_CREATE_FAILED 1631L // The Windows Installer service failed to start. Contact your support personnel.
  861. // LOCALIZE END:
  862. #endif
  863. // LOCALIZE BEGIN:
  864. #ifndef ERROR_INSTALL_TEMP_UNWRITABLE
  865. #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.
  866. #endif
  867. #ifndef ERROR_INSTALL_PLATFORM_UNSUPPORTED
  868. #define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L // This installation package is not supported by this processor type. Contact your product vendor.
  869. #endif
  870. // LOCALIZE END
  871. #ifndef ERROR_INSTALL_NOTUSED
  872. #define ERROR_INSTALL_NOTUSED 1634L // Component not used on this machine
  873. #endif
  874. // LOCALIZE BEGIN:
  875. #ifndef ERROR_INSTALL_TRANSFORM_FAILURE
  876. #define ERROR_INSTALL_TRANSFORM_FAILURE 1624L // Error applying transforms. Verify that the specified transform paths are valid.
  877. #endif
  878. #ifndef ERROR_PATCH_PACKAGE_OPEN_FAILED
  879. #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.
  880. #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.
  881. #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.
  882. #endif
  883. #ifndef ERROR_PRODUCT_VERSION
  884. #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.
  885. #endif
  886. #ifndef ERROR_INVALID_COMMAND_LINE
  887. #define ERROR_INVALID_COMMAND_LINE 1639L // Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
  888. #endif
  889. // The following three error codes are not returned from MSI version 1.0
  890. #ifndef ERROR_INSTALL_REMOTE_DISALLOWED
  891. #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.
  892. #endif
  893. // LOCALIZE END
  894. #ifndef ERROR_SUCCESS_REBOOT_INITIATED
  895. #define ERROR_SUCCESS_REBOOT_INITIATED 1641L // The requested operation completed successfully. The system will be restarted so the changes can take effect.
  896. #endif
  897. // LOCALIZE BEGIN:
  898. #ifndef ERROR_PATCH_TARGET_NOT_FOUND
  899. #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.
  900. #endif
  901. // LOCALIZE END
  902. // The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
  903. // LOCALIZE BEGIN:
  904. #ifndef ERROR_PATCH_PACKAGE_REJECTED
  905. #define ERROR_PATCH_PACKAGE_REJECTED 1643L // The patch package is not permitted by software restriction policy.
  906. #endif
  907. #ifndef ERROR_INSTALL_TRANSFORM_REJECTED
  908. #define ERROR_INSTALL_TRANSFORM_REJECTED 1644L // One or more customizations are not permitted by software restriction policy.
  909. #endif
  910. // LOCALIZE END
  911. #endif // _MSI_H_
  912. #endif // _MSIP_H_ ;internal