Msi.h 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156
  1. /*****************************************************************************\
  2. * *
  3. * msi.h - - Interface for external access to Installer Service *
  4. * *
  5. * Version 3.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 > 0x0502)
  17. #define _WIN32_MSI 300
  18. #elif (_WIN32_WINNT >= 0x0501)
  19. #define _WIN32_MSI 200
  20. #elif (_WIN32_WINNT >= 0x0500)
  21. #define _WIN32_MSI 110
  22. #else
  23. #define _WIN32_MSI 100
  24. #endif //_WIN32_WINNT
  25. #endif // !_WIN32_MSI
  26. #if (_WIN32_MSI >= 150)
  27. #ifndef _MSI_NO_CRYPTO
  28. #include "wincrypt.h"
  29. #endif // _MSI_NO_CRYPTO
  30. #endif //(_WIN32_MSI >= 150)
  31. // --------------------------------------------------------------------------
  32. // Installer generic handle definitions
  33. // --------------------------------------------------------------------------
  34. typedef unsigned long MSIHANDLE; // abstract generic handle, 0 == no handle
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. // Close a open handle of any type
  39. // All handles obtained from API calls must be closed when no longer needed
  40. // Normally succeeds, returning TRUE.
  41. UINT WINAPI MsiCloseHandle(MSIHANDLE hAny);
  42. // Close all handles open in the process, a diagnostic call
  43. // This should NOT be used as a cleanup mechanism -- use PMSIHANDLE class
  44. // Can be called at termination to assure that all handles have been closed
  45. // Returns 0 if all handles have been close, else number of open handles
  46. UINT WINAPI MsiCloseAllHandles();
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #ifdef __cplusplus
  51. // C++ wrapper object to automatically free handle when going out of scope
  52. class PMSIHANDLE
  53. {
  54. MSIHANDLE m_h;
  55. public:
  56. PMSIHANDLE():m_h(0){}
  57. PMSIHANDLE(MSIHANDLE h):m_h(h){}
  58. ~PMSIHANDLE(){if (m_h!=0) MsiCloseHandle(m_h);}
  59. void operator =(MSIHANDLE h) {if (m_h) MsiCloseHandle(m_h); m_h=h;}
  60. operator MSIHANDLE() {return m_h;}
  61. MSIHANDLE* operator &() {if (m_h) MsiCloseHandle(m_h); m_h = 0; return &m_h;}
  62. };
  63. #endif //__cplusplus
  64. // Install message type for callback is a combination of the following:
  65. // A message box style: MB_*, where MB_OK is the default
  66. // A message box icon type: MB_ICON*, where no icon is the default
  67. // A default button: MB_DEFBUTTON?, where MB_DEFBUTTON1 is the default
  68. // One of the following install message types, no default
  69. typedef enum tagINSTALLMESSAGE
  70. {
  71. INSTALLMESSAGE_FATALEXIT = 0x00000000L, // premature termination, possibly fatal OOM
  72. INSTALLMESSAGE_ERROR = 0x01000000L, // formatted error message
  73. INSTALLMESSAGE_WARNING = 0x02000000L, // formatted warning message
  74. INSTALLMESSAGE_USER = 0x03000000L, // user request message
  75. INSTALLMESSAGE_INFO = 0x04000000L, // informative message for log
  76. INSTALLMESSAGE_FILESINUSE = 0x05000000L, // list of files in use that need to be replaced
  77. INSTALLMESSAGE_RESOLVESOURCE = 0x06000000L, // request to determine a valid source location
  78. INSTALLMESSAGE_OUTOFDISKSPACE = 0x07000000L, // insufficient disk space message
  79. INSTALLMESSAGE_ACTIONSTART = 0x08000000L, // start of action: action name & description
  80. INSTALLMESSAGE_ACTIONDATA = 0x09000000L, // formatted data associated with individual action item
  81. INSTALLMESSAGE_PROGRESS = 0x0A000000L, // progress gauge info: units so far, total
  82. INSTALLMESSAGE_COMMONDATA = 0x0B000000L, // product info for dialog: language Id, dialog caption
  83. INSTALLMESSAGE_INITIALIZE = 0x0C000000L, // sent prior to UI initialization, no string data
  84. INSTALLMESSAGE_TERMINATE = 0x0D000000L, // sent after UI termination, no string data
  85. INSTALLMESSAGE_SHOWDIALOG = 0x0E000000L, // sent prior to display or authored dialog or wizard
  86. } INSTALLMESSAGE;
  87. // external error handler supplied to installation API functions
  88. typedef int (WINAPI *INSTALLUI_HANDLERA)(LPVOID pvContext, UINT iMessageType, LPCSTR szMessage);
  89. // external error handler supplied to installation API functions
  90. typedef int (WINAPI *INSTALLUI_HANDLERW)(LPVOID pvContext, UINT iMessageType, LPCWSTR szMessage);
  91. #ifdef UNICODE
  92. #define INSTALLUI_HANDLER INSTALLUI_HANDLERW
  93. #else
  94. #define INSTALLUI_HANDLER INSTALLUI_HANDLERA
  95. #endif // !UNICODE
  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_EXTRADEBUG = (1 << (INSTALLMESSAGE_TERMINATE >> 24)), // log only
  169. INSTALLLOGMODE_LOGONLYONERROR = (1 << (INSTALLMESSAGE_SHOWDIALOG >> 24)), // log only
  170. INSTALLLOGMODE_PROGRESS = (1 << (INSTALLMESSAGE_PROGRESS >> 24)), // external handler only
  171. INSTALLLOGMODE_INITIALIZE = (1 << (INSTALLMESSAGE_INITIALIZE >> 24)), // external handler only
  172. INSTALLLOGMODE_TERMINATE = (1 << (INSTALLMESSAGE_TERMINATE >> 24)), // external handler only
  173. INSTALLLOGMODE_SHOWDIALOG = (1 << (INSTALLMESSAGE_SHOWDIALOG >> 24)), // external handler only
  174. INSTALLLOGMODE_FILESINUSE = (1 << (INSTALLMESSAGE_FILESINUSE >> 24)), // external handler only
  175. } INSTALLLOGMODE;
  176. typedef enum tagINSTALLLOGATTRIBUTES // flag attributes for MsiEnableLog
  177. {
  178. INSTALLLOGATTRIBUTES_APPEND = (1 << 0),
  179. INSTALLLOGATTRIBUTES_FLUSHEACHLINE = (1 << 1),
  180. } INSTALLLOGATTRIBUTES;
  181. typedef enum tagINSTALLFEATUREATTRIBUTE // bit flags
  182. {
  183. INSTALLFEATUREATTRIBUTE_FAVORLOCAL = 1 << 0,
  184. INSTALLFEATUREATTRIBUTE_FAVORSOURCE = 1 << 1,
  185. INSTALLFEATUREATTRIBUTE_FOLLOWPARENT = 1 << 2,
  186. INSTALLFEATUREATTRIBUTE_FAVORADVERTISE = 1 << 3,
  187. INSTALLFEATUREATTRIBUTE_DISALLOWADVERTISE = 1 << 4,
  188. INSTALLFEATUREATTRIBUTE_NOUNSUPPORTEDADVERTISE = 1 << 5,
  189. } INSTALLFEATUREATTRIBUTE;
  190. typedef enum tagINSTALLMODE
  191. {
  192. #if (_WIN32_MSI >= 150)
  193. INSTALLMODE_NODETECTION_ANY = -4, // provide any, if available, supported internally for MsiProvideAssembly
  194. #endif
  195. INSTALLMODE_NOSOURCERESOLUTION = -3, // skip source resolution
  196. INSTALLMODE_NODETECTION = -2, // skip detection
  197. INSTALLMODE_EXISTING = -1, // provide, if available
  198. INSTALLMODE_DEFAULT = 0, // install, if absent
  199. } INSTALLMODE;
  200. #if (_WIN32_MSI >= 300)
  201. typedef enum tagMSIPATCHSTATE
  202. {
  203. MSIPATCHSTATE_INVALID = 0, // broken
  204. MSIPATCHSTATE_APPLIED = 1, // applied patch
  205. MSIPATCHSTATE_SUPERSEDED = 2, // applied but superseded
  206. MSIPATCHSTATE_OBSOLETED = 4, // applied but obsoleted
  207. MSIPATCHSTATE_REGISTERED = 8, // registered only - Not applied
  208. MSIPATCHSTATE_ALL = (MSIPATCHSTATE_APPLIED | MSIPATCHSTATE_SUPERSEDED | MSIPATCHSTATE_OBSOLETED | MSIPATCHSTATE_REGISTERED)
  209. } MSIPATCHSTATE;
  210. typedef enum tagMSIINSTALLCONTEXT
  211. {
  212. MSIINSTALLCONTEXT_FIRSTVISIBLE = 0, // product visible to the current user
  213. MSIINSTALLCONTEXT_NONE = 0, // Invalid context for a product
  214. MSIINSTALLCONTEXT_USERMANAGED = 1, // user managed install context
  215. MSIINSTALLCONTEXT_USERUNMANAGED = 2, // user non-managed context
  216. MSIINSTALLCONTEXT_MACHINE = 4, // per-machine context
  217. MSIINSTALLCONTEXT_ALL = (MSIINSTALLCONTEXT_USERMANAGED | MSIINSTALLCONTEXT_USERUNMANAGED | MSIINSTALLCONTEXT_MACHINE), // All contexts. OR of all valid values
  218. MSIINSTALLCONTEXT_ALLUSERMANAGED = 8, // all user-managed contexts
  219. } MSIINSTALLCONTEXT;
  220. typedef enum tagMSIPATCHDATATYPE
  221. {
  222. MSIPATCH_DATATYPE_PATCHFILE = 0,
  223. MSIPATCH_DATATYPE_XMLPATH = 1,
  224. MSIPATCH_DATATYPE_XMLBLOB = 2,
  225. } MSIPATCHDATATYPE, * PMSIPATCHDATATYPE;
  226. typedef struct tagMSIPATCHSEQUENCEINFOA
  227. {
  228. LPCSTR szPatchData;
  229. MSIPATCHDATATYPE ePatchDataType;
  230. DWORD dwOrder;
  231. UINT uStatus;
  232. } MSIPATCHSEQUENCEINFOA, * PMSIPATCHSEQUENCEINFOA;
  233. typedef struct tagMSIPATCHSEQUENCEINFOW
  234. {
  235. LPCWSTR szPatchData;
  236. MSIPATCHDATATYPE ePatchDataType;
  237. DWORD dwOrder;
  238. UINT uStatus;
  239. } MSIPATCHSEQUENCEINFOW, * PMSIPATCHSEQUENCEINFOW;
  240. #ifdef UNICODE
  241. typedef MSIPATCHSEQUENCEINFOW MSIPATCHSEQUENCEINFO;
  242. typedef PMSIPATCHSEQUENCEINFOW PMSIPATCHSEQUENCEINFO;
  243. #else
  244. typedef MSIPATCHSEQUENCEINFOA MSIPATCHSEQUENCEINFO;
  245. typedef PMSIPATCHSEQUENCEINFOA PMSIPATCHSEQUENCEINFO;
  246. #endif // UNICODE
  247. #endif //(_WIN32_MSI >= 300)
  248. #define MAX_FEATURE_CHARS 38 // maximum chars in feature name (same as string GUID)
  249. // Product info attributes: advertised information
  250. #define INSTALLPROPERTY_PACKAGENAME __TEXT("PackageName")
  251. #define INSTALLPROPERTY_TRANSFORMS __TEXT("Transforms")
  252. #define INSTALLPROPERTY_LANGUAGE __TEXT("Language")
  253. #define INSTALLPROPERTY_PRODUCTNAME __TEXT("ProductName")
  254. #define INSTALLPROPERTY_ASSIGNMENTTYPE __TEXT("AssignmentType")
  255. #if (_WIN32_MSI >= 150)
  256. #define INSTALLPROPERTY_INSTANCETYPE __TEXT("InstanceType")
  257. #endif //(_WIN32_MSI >= 150)
  258. #if (_WIN32_MSI >= 300)
  259. #define INSTALLPROPERTY_AUTHORIZED_LUA_APP __TEXT("AuthorizedLUAApp")
  260. #endif //(_WIN32_MSI >= 300)
  261. #define INSTALLPROPERTY_PACKAGECODE __TEXT("PackageCode")
  262. #define INSTALLPROPERTY_VERSION __TEXT("Version")
  263. #if (_WIN32_MSI >= 110)
  264. #define INSTALLPROPERTY_PRODUCTICON __TEXT("ProductIcon")
  265. #endif //(_WIN32_MSI >= 110)
  266. // Product info attributes: installed information
  267. #define INSTALLPROPERTY_INSTALLEDPRODUCTNAME __TEXT("InstalledProductName")
  268. #define INSTALLPROPERTY_VERSIONSTRING __TEXT("VersionString")
  269. #define INSTALLPROPERTY_HELPLINK __TEXT("HelpLink")
  270. #define INSTALLPROPERTY_HELPTELEPHONE __TEXT("HelpTelephone")
  271. #define INSTALLPROPERTY_INSTALLLOCATION __TEXT("InstallLocation")
  272. #define INSTALLPROPERTY_INSTALLSOURCE __TEXT("InstallSource")
  273. #define INSTALLPROPERTY_INSTALLDATE __TEXT("InstallDate")
  274. #define INSTALLPROPERTY_PUBLISHER __TEXT("Publisher")
  275. #define INSTALLPROPERTY_LOCALPACKAGE __TEXT("LocalPackage")
  276. #define INSTALLPROPERTY_URLINFOABOUT __TEXT("URLInfoAbout")
  277. #define INSTALLPROPERTY_URLUPDATEINFO __TEXT("URLUpdateInfo")
  278. #define INSTALLPROPERTY_VERSIONMINOR __TEXT("VersionMinor")
  279. #define INSTALLPROPERTY_VERSIONMAJOR __TEXT("VersionMajor")
  280. #define INSTALLPROPERTY_PRODUCTID __TEXT("ProductID")
  281. #define INSTALLPROPERTY_REGCOMPANY __TEXT("RegCompany")
  282. #define INSTALLPROPERTY_REGOWNER __TEXT("RegOwner")
  283. #if (_WIN32_MSI >= 300)
  284. #define INSTALLPROPERTY_UNINSTALLABLE __TEXT("Uninstallable")
  285. #define INSTALLPROPERTY_PRODUCTSTATE __TEXT("State")
  286. #define INSTALLPROPERTY_PATCHSTATE __TEXT("State")
  287. #define INSTALLPROPERTY_PATCHTYPE __TEXT("PatchType")
  288. #define INSTALLPROPERTY_LUAENABLED __TEXT("LUAEnabled")
  289. #define INSTALLPROPERTY_DISPLAYNAME __TEXT("DisplayName")
  290. #define INSTALLPROPERTY_MOREINFOURL __TEXT("MoreInfoURL")
  291. // Source List Info attributes: Advertised information
  292. #define INSTALLPROPERTY_LASTUSEDSOURCE __TEXT("LastUsedSource")
  293. #define INSTALLPROPERTY_LASTUSEDTYPE __TEXT("LastUsedType")
  294. #define INSTALLPROPERTY_MEDIAPACKAGEPATH __TEXT("MediaPackagePath")
  295. #define INSTALLPROPERTY_DISKPROMPT __TEXT("DiskPrompt")
  296. #endif // (_WIN32_MSI >= 300)
  297. typedef enum tagSCRIPTFLAGS
  298. {
  299. SCRIPTFLAGS_CACHEINFO = 0x00000001L, // set if the icons need to be created/ removed
  300. SCRIPTFLAGS_SHORTCUTS = 0x00000004L, // set if the shortcuts needs to be created/ deleted
  301. SCRIPTFLAGS_MACHINEASSIGN = 0x00000008L, // set if product to be assigned to machine
  302. SCRIPTFLAGS_REGDATA_CNFGINFO = 0x00000020L, // set if the product cnfg mgmt. registry data needs to be written/ removed
  303. SCRIPTFLAGS_VALIDATE_TRANSFORMS_LIST = 0x00000040L,
  304. #if (_WIN32_MSI >= 110)
  305. SCRIPTFLAGS_REGDATA_CLASSINFO = 0x00000080L, // set if COM classes related app info needs to be created/ deleted
  306. SCRIPTFLAGS_REGDATA_EXTENSIONINFO = 0x00000100L, // set if extension related app info needs to be created/ deleted
  307. SCRIPTFLAGS_REGDATA_APPINFO = SCRIPTFLAGS_REGDATA_CLASSINFO | SCRIPTFLAGS_REGDATA_EXTENSIONINFO, // for source level backward compatibility
  308. #else //_WIN32_MSI == 100
  309. SCRIPTFLAGS_REGDATA_APPINFO = 0x00000010L,
  310. #endif //(_WIN32_MSI >= 110)
  311. SCRIPTFLAGS_REGDATA = SCRIPTFLAGS_REGDATA_APPINFO | SCRIPTFLAGS_REGDATA_CNFGINFO, // for source level backward compatibility
  312. }SCRIPTFLAGS;
  313. typedef enum tagADVERTISEFLAGS
  314. {
  315. ADVERTISEFLAGS_MACHINEASSIGN = 0, // set if the product is to be machine assigned
  316. ADVERTISEFLAGS_USERASSIGN = 1, // set if the product is to be user assigned
  317. }ADVERTISEFLAGS;
  318. typedef enum tagINSTALLTYPE
  319. {
  320. INSTALLTYPE_DEFAULT = 0, // set to indicate default behavior
  321. INSTALLTYPE_NETWORK_IMAGE = 1, // set to indicate network install
  322. INSTALLTYPE_SINGLE_INSTANCE = 2, // set to indicate a particular instance
  323. }INSTALLTYPE;
  324. #if (_WIN32_MSI >= 150)
  325. typedef struct _MSIFILEHASHINFO {
  326. ULONG dwFileHashInfoSize;
  327. ULONG dwData [ 4 ];
  328. } MSIFILEHASHINFO, *PMSIFILEHASHINFO;
  329. typedef enum tagMSIARCHITECTUREFLAGS
  330. {
  331. MSIARCHITECTUREFLAGS_X86 = 0x00000001L, // set if creating the script for i386 platform
  332. MSIARCHITECTUREFLAGS_IA64 = 0x00000002L, // set if creating the script for IA64 platform
  333. MSIARCHITECTUREFLAGS_AMD64 = 0x00000004L // set if creating the script for AMD64 platform
  334. }MSIARCHITECTUREFLAGS;
  335. typedef enum tagMSIOPENPACKAGEFLAGS
  336. {
  337. MSIOPENPACKAGEFLAGS_IGNOREMACHINESTATE = 0x00000001L, // ignore the machine state when creating the engine
  338. }MSIOPENPACKAGEFLAGS;
  339. typedef enum tagMSIADVERTISEOPTIONFLAGS
  340. {
  341. MSIADVERTISEOPTIONFLAGS_INSTANCE = 0x00000001L, // set if advertising a new instance
  342. }MSIADVERTISEOPTIONFLAGS;
  343. #endif //(_WIN32_MSI >= 150)
  344. #if (_WIN32_MSI >= 300)
  345. typedef enum tagMSISOURCETYPE
  346. {
  347. MSISOURCETYPE_UNKNOWN = 0x00000000L,
  348. MSISOURCETYPE_NETWORK = 0x00000001L, // network source
  349. MSISOURCETYPE_URL = 0x00000002L, // URL source
  350. MSISOURCETYPE_MEDIA = 0x00000004L // media source
  351. }MSISOURCETYPE;
  352. typedef enum tagMSICODE
  353. {
  354. MSICODE_PRODUCT = 0x00000000L, // product code provided
  355. MSICODE_PATCH = 0x40000000L // patch code provided
  356. }MSICODE;
  357. #endif //(_WIN32_MSI >= 300)
  358. #ifdef __cplusplus
  359. extern "C" {
  360. #endif
  361. // --------------------------------------------------------------------------
  362. // Functions to set the UI handling and logging. The UI will be used for error,
  363. // progress, and log messages for all subsequent calls to Installer Service
  364. // API functions that require UI.
  365. // --------------------------------------------------------------------------
  366. // Enable internal UI
  367. INSTALLUILEVEL WINAPI MsiSetInternalUI(
  368. INSTALLUILEVEL dwUILevel, // UI level
  369. HWND *phWnd); // handle of owner window
  370. // Enable external UI handling, returns any previous handler or NULL if none.
  371. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  372. INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(
  373. INSTALLUI_HANDLERA puiHandler, // for progress and error handling
  374. DWORD dwMessageFilter, // bit flags designating messages to handle
  375. LPVOID pvContext); // application context
  376. INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(
  377. INSTALLUI_HANDLERW puiHandler, // for progress and error handling
  378. DWORD dwMessageFilter, // bit flags designating messages to handle
  379. LPVOID pvContext); // application context
  380. #ifdef UNICODE
  381. #define MsiSetExternalUI MsiSetExternalUIW
  382. #else
  383. #define MsiSetExternalUI MsiSetExternalUIA
  384. #endif // !UNICODE
  385. // Enable logging to a file for all install sessions for the client process,
  386. // with control over which log messages are passed to the specified log file.
  387. // Messages are designated with a combination of bits from INSTALLLOGMODE enum.
  388. UINT WINAPI MsiEnableLogA(
  389. DWORD dwLogMode, // bit flags designating operations to report
  390. LPCSTR szLogFile, // log file, or NULL to disable logging
  391. DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
  392. UINT WINAPI MsiEnableLogW(
  393. DWORD dwLogMode, // bit flags designating operations to report
  394. LPCWSTR szLogFile, // log file, or NULL to disable logging
  395. DWORD dwLogAttributes); // INSTALLLOGATTRIBUTES flags
  396. #ifdef UNICODE
  397. #define MsiEnableLog MsiEnableLogW
  398. #else
  399. #define MsiEnableLog MsiEnableLogA
  400. #endif // !UNICODE
  401. // --------------------------------------------------------------------------
  402. // Functions to query and configure a product as a whole.
  403. // --------------------------------------------------------------------------
  404. // Return the installed state for a product
  405. INSTALLSTATE WINAPI MsiQueryProductStateA(
  406. LPCSTR szProduct);
  407. INSTALLSTATE WINAPI MsiQueryProductStateW(
  408. LPCWSTR szProduct);
  409. #ifdef UNICODE
  410. #define MsiQueryProductState MsiQueryProductStateW
  411. #else
  412. #define MsiQueryProductState MsiQueryProductStateA
  413. #endif // !UNICODE
  414. // Return product info
  415. UINT WINAPI MsiGetProductInfoA(
  416. LPCSTR szProduct, // product code
  417. LPCSTR szAttribute, // attribute name, case-sensitive
  418. LPSTR lpValueBuf, // returned value, NULL if not desired
  419. DWORD *pcchValueBuf); // in/out buffer character count
  420. UINT WINAPI MsiGetProductInfoW(
  421. LPCWSTR szProduct, // product code
  422. LPCWSTR szAttribute, // attribute name, case-sensitive
  423. LPWSTR lpValueBuf, // returned value, NULL if not desired
  424. DWORD *pcchValueBuf); // in/out buffer character count
  425. #ifdef UNICODE
  426. #define MsiGetProductInfo MsiGetProductInfoW
  427. #else
  428. #define MsiGetProductInfo MsiGetProductInfoA
  429. #endif // !UNICODE
  430. #if (_WIN32_MSI >= 300)
  431. // Retrieve product info for a particular product instance
  432. UINT WINAPI MsiGetProductInfoExA(
  433. LPCSTR szProductCode, // Information is queried on this product
  434. LPCSTR szUserSid, // Account of this product instance
  435. MSIINSTALLCONTEXT dwContext,// Context of this product instance
  436. LPCSTR szProperty, // Property being queried
  437. LPSTR szValue, // Value read
  438. LPDWORD pcchValue); // size of the szValue buffer
  439. UINT WINAPI MsiGetProductInfoExW(
  440. LPCWSTR szProductCode, // Information is queried on this product
  441. LPCWSTR szUserSid, // Account of this product instance
  442. MSIINSTALLCONTEXT dwContext,// Context of this product instance
  443. LPCWSTR szProperty, // Property being queried
  444. LPWSTR szValue, // Value read
  445. LPDWORD pcchValue); // size of the szValue buffer
  446. #ifdef UNICODE
  447. #define MsiGetProductInfoEx MsiGetProductInfoExW
  448. #else
  449. #define MsiGetProductInfoEx MsiGetProductInfoExA
  450. #endif // !UNICODE
  451. #endif //(_WIN32_MSI >= 300)
  452. // Install a new product.
  453. // Either may be NULL, but the DATABASE property must be specfied
  454. UINT WINAPI MsiInstallProductA(
  455. LPCSTR szPackagePath, // location of package to install
  456. LPCSTR szCommandLine); // command line <property settings>
  457. UINT WINAPI MsiInstallProductW(
  458. LPCWSTR szPackagePath, // location of package to install
  459. LPCWSTR szCommandLine); // command line <property settings>
  460. #ifdef UNICODE
  461. #define MsiInstallProduct MsiInstallProductW
  462. #else
  463. #define MsiInstallProduct MsiInstallProductA
  464. #endif // !UNICODE
  465. // Install/uninstall an advertised or installed product
  466. // No action if installed and INSTALLSTATE_DEFAULT specified
  467. UINT WINAPI MsiConfigureProductA(
  468. LPCSTR szProduct, // product code
  469. int iInstallLevel, // how much of the product to install
  470. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  471. UINT WINAPI MsiConfigureProductW(
  472. LPCWSTR szProduct, // product code
  473. int iInstallLevel, // how much of the product to install
  474. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  475. #ifdef UNICODE
  476. #define MsiConfigureProduct MsiConfigureProductW
  477. #else
  478. #define MsiConfigureProduct MsiConfigureProductA
  479. #endif // !UNICODE
  480. // Install/uninstall an advertised or installed product
  481. // No action if installed and INSTALLSTATE_DEFAULT specified
  482. UINT WINAPI MsiConfigureProductExA(
  483. LPCSTR szProduct, // product code
  484. int iInstallLevel, // how much of the product to install
  485. INSTALLSTATE eInstallState, // local/source/default/absent/lock/uncache
  486. LPCSTR szCommandLine); // command line <property settings>
  487. UINT WINAPI MsiConfigureProductExW(
  488. LPCWSTR szProduct, // product code
  489. int iInstallLevel, // how much of the product to install
  490. INSTALLSTATE eInstallState, // local/source/default/absent/lock/uncache
  491. LPCWSTR szCommandLine); // command line <property settings>
  492. #ifdef UNICODE
  493. #define MsiConfigureProductEx MsiConfigureProductExW
  494. #else
  495. #define MsiConfigureProductEx MsiConfigureProductExA
  496. #endif // !UNICODE
  497. // Reinstall product, used to validate or correct problems
  498. UINT WINAPI MsiReinstallProductA(
  499. LPCSTR szProduct, // product code
  500. DWORD szReinstallMode); // one or more REINSTALLMODE modes
  501. UINT WINAPI MsiReinstallProductW(
  502. LPCWSTR szProduct, // product code
  503. DWORD szReinstallMode); // one or more REINSTALLMODE modes
  504. #ifdef UNICODE
  505. #define MsiReinstallProduct MsiReinstallProductW
  506. #else
  507. #define MsiReinstallProduct MsiReinstallProductA
  508. #endif // !UNICODE
  509. #if (_WIN32_MSI >= 150)
  510. // Output reg and shortcut info to script file for specified architecture for Assign or Publish
  511. // If dwPlatform is 0, then the script is created based on the current platform (behavior of MsiAdvertiseProduct)
  512. // If dwPlatform specifies a platform, then the script is created as if the current platform is the
  513. // platform specified in dwPlatform
  514. // If dwOptions includes MSIADVERTISEOPTIONFLAGS_INSTANCE, then a new instance is advertised. Use of
  515. // this option requires that szTransforms include the instance transform that changes the product code
  516. UINT WINAPI MsiAdvertiseProductExA(
  517. LPCSTR szPackagePath, // location of package
  518. LPCSTR szScriptfilePath, // if NULL, product is locally advertised
  519. LPCSTR szTransforms, // list of transforms to be applied
  520. LANGID lgidLanguage, // install language
  521. DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that control for which platform
  522. // to create the script, ignored if szScriptfilePath is NULL
  523. DWORD dwOptions); // the MSIADVERTISEOPTIONFLAGS that specify extra advertise parameters
  524. UINT WINAPI MsiAdvertiseProductExW(
  525. LPCWSTR szPackagePath, // location of package
  526. LPCWSTR szScriptfilePath, // if NULL, product is locally advertised
  527. LPCWSTR szTransforms, // list of transforms to be applied
  528. LANGID lgidLanguage, // install language
  529. DWORD dwPlatform, // the MSIARCHITECTUREFLAGS that control for which platform
  530. // to create the script, ignored if szScriptfilePath is NULL
  531. DWORD dwOptions); // the MSIADVERTISEOPTIONFLAGS that specify extra advertise parameters
  532. #ifdef UNICODE
  533. #define MsiAdvertiseProductEx MsiAdvertiseProductExW
  534. #else
  535. #define MsiAdvertiseProductEx MsiAdvertiseProductExA
  536. #endif // !UNICODE
  537. #endif // (_WIN32_MSI >= 150)
  538. // Output reg and shortcut info to script file for Assign or Publish
  539. UINT WINAPI MsiAdvertiseProductA(
  540. LPCSTR szPackagePath, // location of package
  541. LPCSTR szScriptfilePath, // if NULL, product is locally advertised
  542. LPCSTR szTransforms, // list of transforms to be applied
  543. LANGID lgidLanguage); // install language
  544. UINT WINAPI MsiAdvertiseProductW(
  545. LPCWSTR szPackagePath, // location of package
  546. LPCWSTR szScriptfilePath, // if NULL, product is locally advertised
  547. LPCWSTR szTransforms, // list of transforms to be applied
  548. LANGID lgidLanguage); // install language
  549. #ifdef UNICODE
  550. #define MsiAdvertiseProduct MsiAdvertiseProductW
  551. #else
  552. #define MsiAdvertiseProduct MsiAdvertiseProductA
  553. #endif // !UNICODE
  554. #if (_WIN32_MSI >= 150)
  555. // Process advertise script file into supplied locations
  556. // If an icon folder is specified, icon files will be placed there
  557. // If an registry key is specified, registry data will be mapped under it
  558. // If fShortcuts is TRUE, shortcuts will be created. If a special folder is
  559. // returned by SHGetSpecialFolderLocation(?), it will hold the shortcuts.
  560. // if fRemoveItems is TRUE, items that are present will be removed
  561. UINT WINAPI MsiProcessAdvertiseScriptA(
  562. LPCSTR szScriptFile, // path to script from MsiAdvertiseProduct
  563. LPCSTR szIconFolder, // optional path to folder for icon files and transforms
  564. HKEY hRegData, // optional parent registry key
  565. BOOL fShortcuts, // TRUE if shortcuts output to special folder
  566. BOOL fRemoveItems); // TRUE if specified items are to be removed
  567. UINT WINAPI MsiProcessAdvertiseScriptW(
  568. LPCWSTR szScriptFile, // path to script from MsiAdvertiseProduct
  569. LPCWSTR szIconFolder, // optional path to folder for icon files and transforms
  570. HKEY hRegData, // optional parent registry key
  571. BOOL fShortcuts, // TRUE if shortcuts output to special folder
  572. BOOL fRemoveItems); // TRUE if specified items are to be removed
  573. #ifdef UNICODE
  574. #define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptW
  575. #else
  576. #define MsiProcessAdvertiseScript MsiProcessAdvertiseScriptA
  577. #endif // !UNICODE
  578. #endif // (_WIN32_MSI >= 150)
  579. // Process advertise script file using the supplied dwFlags control flags
  580. // if fRemoveItems is TRUE, items that are present will be removed
  581. UINT WINAPI MsiAdvertiseScriptA(
  582. LPCSTR szScriptFile, // path to script from MsiAdvertiseProduct
  583. DWORD dwFlags, // the SCRIPTFLAGS bit flags that control the script execution
  584. PHKEY phRegData, // optional parent registry key
  585. BOOL fRemoveItems); // TRUE if specified items are to be removed
  586. UINT WINAPI MsiAdvertiseScriptW(
  587. LPCWSTR szScriptFile, // path to script from MsiAdvertiseProduct
  588. DWORD dwFlags, // the SCRIPTFLAGS bit flags that control the script execution
  589. PHKEY phRegData, // optional parent registry key
  590. BOOL fRemoveItems); // TRUE if specified items are to be removed
  591. #ifdef UNICODE
  592. #define MsiAdvertiseScript MsiAdvertiseScriptW
  593. #else
  594. #define MsiAdvertiseScript MsiAdvertiseScriptA
  595. #endif // !UNICODE
  596. // Return product info from an installer script file:
  597. // product code, language, version, readable name, path to package
  598. // Returns TRUE is success, FALSE if szScriptFile is not a valid script file
  599. UINT WINAPI MsiGetProductInfoFromScriptA(
  600. LPCSTR szScriptFile, // path to installer script file
  601. LPSTR lpProductBuf39, // buffer for product code string GUID, 39 chars
  602. LANGID *plgidLanguage, // return language Id
  603. DWORD *pdwVersion, // return version: Maj:Min:Build <8:8:16>
  604. LPSTR lpNameBuf, // buffer to return readable product name
  605. DWORD *pcchNameBuf, // in/out name buffer character count
  606. LPSTR lpPackageBuf, // buffer for path to product package
  607. DWORD *pcchPackageBuf);// in/out path buffer character count
  608. UINT WINAPI MsiGetProductInfoFromScriptW(
  609. LPCWSTR szScriptFile, // path to installer script file
  610. LPWSTR lpProductBuf39, // buffer for product code string GUID, 39 chars
  611. LANGID *plgidLanguage, // return language Id
  612. DWORD *pdwVersion, // return version: Maj:Min:Build <8:8:16>
  613. LPWSTR lpNameBuf, // buffer to return readable product name
  614. DWORD *pcchNameBuf, // in/out name buffer character count
  615. LPWSTR lpPackageBuf, // buffer for path to product package
  616. DWORD *pcchPackageBuf);// in/out path buffer character count
  617. #ifdef UNICODE
  618. #define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptW
  619. #else
  620. #define MsiGetProductInfoFromScript MsiGetProductInfoFromScriptA
  621. #endif // !UNICODE
  622. // Return the product code for a registered component, called once by apps
  623. UINT WINAPI MsiGetProductCodeA(
  624. LPCSTR szComponent, // component Id registered for this product
  625. LPSTR lpBuf39); // returned string GUID, sized for 39 characters
  626. UINT WINAPI MsiGetProductCodeW(
  627. LPCWSTR szComponent, // component Id registered for this product
  628. LPWSTR lpBuf39); // returned string GUID, sized for 39 characters
  629. #ifdef UNICODE
  630. #define MsiGetProductCode MsiGetProductCodeW
  631. #else
  632. #define MsiGetProductCode MsiGetProductCodeA
  633. #endif // !UNICODE
  634. // Return the registered user information for an installed product
  635. USERINFOSTATE WINAPI MsiGetUserInfoA(
  636. LPCSTR szProduct, // product code, string GUID
  637. LPSTR lpUserNameBuf, // return user name
  638. DWORD *pcchUserNameBuf, // in/out buffer character count
  639. LPSTR lpOrgNameBuf, // return company name
  640. DWORD *pcchOrgNameBuf, // in/out buffer character count
  641. LPSTR lpSerialBuf, // return product serial number
  642. DWORD *pcchSerialBuf); // in/out buffer character count
  643. USERINFOSTATE WINAPI MsiGetUserInfoW(
  644. LPCWSTR szProduct, // product code, string GUID
  645. LPWSTR lpUserNameBuf, // return user name
  646. DWORD *pcchUserNameBuf, // in/out buffer character count
  647. LPWSTR lpOrgNameBuf, // return company name
  648. DWORD *pcchOrgNameBuf, // in/out buffer character count
  649. LPWSTR lpSerialBuf, // return product serial number
  650. DWORD *pcchSerialBuf); // in/out buffer character count
  651. #ifdef UNICODE
  652. #define MsiGetUserInfo MsiGetUserInfoW
  653. #else
  654. #define MsiGetUserInfo MsiGetUserInfoA
  655. #endif // !UNICODE
  656. // Obtain and store user info and PID from installation wizard (first run)
  657. UINT WINAPI MsiCollectUserInfoA(
  658. LPCSTR szProduct); // product code, string GUID
  659. UINT WINAPI MsiCollectUserInfoW(
  660. LPCWSTR szProduct); // product code, string GUID
  661. #ifdef UNICODE
  662. #define MsiCollectUserInfo MsiCollectUserInfoW
  663. #else
  664. #define MsiCollectUserInfo MsiCollectUserInfoA
  665. #endif // !UNICODE
  666. // --------------------------------------------------------------------------
  667. // Functions to query, apply, and remove patches to a product.
  668. // --------------------------------------------------------------------------
  669. // Patch all possible installed products.
  670. UINT WINAPI MsiApplyPatchA(
  671. LPCSTR szPatchPackage, // location of patch package
  672. LPCSTR szInstallPackage, // location of package for install to patch <optional>
  673. INSTALLTYPE eInstallType, // type of install to patch
  674. LPCSTR szCommandLine); // command line <property settings>
  675. UINT WINAPI MsiApplyPatchW(
  676. LPCWSTR szPatchPackage, // location of patch package
  677. LPCWSTR szInstallPackage, // location of package for install to patch <optional>
  678. INSTALLTYPE eInstallType, // type of install to patch
  679. LPCWSTR szCommandLine); // command line <property settings>
  680. #ifdef UNICODE
  681. #define MsiApplyPatch MsiApplyPatchW
  682. #else
  683. #define MsiApplyPatch MsiApplyPatchA
  684. #endif // !UNICODE
  685. // Return patch info for first visible patch
  686. UINT WINAPI MsiGetPatchInfoA(
  687. LPCSTR szPatch, // patch code
  688. LPCSTR szAttribute, // attribute name, case-sensitive
  689. LPSTR lpValueBuf, // returned value, NULL if not desired
  690. DWORD *pcchValueBuf); // in/out buffer character count
  691. UINT WINAPI MsiGetPatchInfoW(
  692. LPCWSTR szPatch, // patch code
  693. LPCWSTR szAttribute, // attribute name, case-sensitive
  694. LPWSTR lpValueBuf, // returned value, NULL if not desired
  695. DWORD *pcchValueBuf); // in/out buffer character count
  696. #ifdef UNICODE
  697. #define MsiGetPatchInfo MsiGetPatchInfoW
  698. #else
  699. #define MsiGetPatchInfo MsiGetPatchInfoA
  700. #endif // !UNICODE
  701. // Enumerate all patches for a product in contexts visible to caller
  702. UINT WINAPI MsiEnumPatchesA(
  703. LPCSTR szProduct,
  704. DWORD iPatchIndex,
  705. LPSTR lpPatchBuf,
  706. LPSTR lpTransformsBuf,
  707. DWORD *pcchTransformsBuf);
  708. UINT WINAPI MsiEnumPatchesW(
  709. LPCWSTR szProduct,
  710. DWORD iPatchIndex,
  711. LPWSTR lpPatchBuf,
  712. LPWSTR lpTransformsBuf,
  713. DWORD *pcchTransformsBuf);
  714. #ifdef UNICODE
  715. #define MsiEnumPatches MsiEnumPatchesW
  716. #else
  717. #define MsiEnumPatches MsiEnumPatchesA
  718. #endif // !UNICODE
  719. #if (_WIN32_MSI >= 300)
  720. // Remove one or more patches from the specified product.
  721. UINT WINAPI MsiRemovePatchesA(
  722. LPCSTR szPatchList, // semi-colon delimited list of patches to remove; patch can be referenced by patch package path or Patch GUID
  723. LPCSTR szProductCode, // ProductCode GUID of product with patch to remove
  724. INSTALLTYPE eUninstallType, // type of patch uninstall to perform. Must be INSTALLTYPE_SINGLE_INSTANCE.
  725. LPCSTR szPropertyList); // command line property settings using PROPERTY=VALUE pairs
  726. UINT WINAPI MsiRemovePatchesW(
  727. LPCWSTR szPatchList, // semi-colon delimited list of patches to remove; patch can be referenced by patch package path or Patch GUID
  728. LPCWSTR szProductCode, // ProductCode GUID of product with patch to remove
  729. INSTALLTYPE eUninstallType, // type of patch uninstall to perform. Must be INSTALLTYPE_SINGLE_INSTANCE.
  730. LPCWSTR szPropertyList); // command line property settings using PROPERTY=VALUE pairs
  731. #ifdef UNICODE
  732. #define MsiRemovePatches MsiRemovePatchesW
  733. #else
  734. #define MsiRemovePatches MsiRemovePatchesA
  735. #endif // !UNICODE
  736. // Extract XML data from the patch
  737. UINT WINAPI MsiExtractPatchXMLDataA(
  738. LPCSTR szPatchPath, // Patch file to open
  739. DWORD dwReserved, // Reserved
  740. LPSTR szXMLData, // Buffer that gets the XML data
  741. DWORD *pcchXMLData); // in/out XML data buffer character count
  742. UINT WINAPI MsiExtractPatchXMLDataW(
  743. LPCWSTR szPatchPath, // Patch file to open
  744. DWORD dwReserved, // Reserved
  745. LPWSTR szXMLData, // Buffer that gets the XML data
  746. DWORD *pcchXMLData); // in/out XML data buffer character count
  747. #ifdef UNICODE
  748. #define MsiExtractPatchXMLData MsiExtractPatchXMLDataW
  749. #else
  750. #define MsiExtractPatchXMLData MsiExtractPatchXMLDataA
  751. #endif // !UNICODE
  752. // Retrieve extended patch info for a particular patch applied
  753. // to a particular product instance.
  754. UINT WINAPI MsiGetPatchInfoExA(
  755. LPCSTR szPatchCode, // target patch to query
  756. LPCSTR szProductCode, // target product of patch application
  757. LPCSTR szUserSid, // Account of this product instance
  758. MSIINSTALLCONTEXT dwContext, // context to query for product and patch
  759. LPCSTR szProperty, // property of patch to retrieve
  760. LPSTR lpValue, // address buffer for data
  761. DWORD *pcchValue); // in/out value buffer character count
  762. UINT WINAPI MsiGetPatchInfoExW(
  763. LPCWSTR szPatchCode, // target patch to query
  764. LPCWSTR szProductCode, // target product of patch application
  765. LPCWSTR szUserSid, // Account of this product instance
  766. MSIINSTALLCONTEXT dwContext, // context to query for product and patch
  767. LPCWSTR szProperty, // property of patch to retrieve
  768. LPWSTR lpValue, // address buffer for data
  769. DWORD *pcchValue); // in/out value buffer character count
  770. #ifdef UNICODE
  771. #define MsiGetPatchInfoEx MsiGetPatchInfoExW
  772. #else
  773. #define MsiGetPatchInfoEx MsiGetPatchInfoExA
  774. #endif // !UNICODE
  775. // Apply multiple patches to the specified product or to all eligible products
  776. // on the machine
  777. UINT WINAPI MsiApplyMultiplePatchesA(
  778. LPCSTR szPatchPackages, // Patches to apply
  779. LPCSTR szProductCode, // target product of patch application
  780. LPCSTR szPropertiesList); // Properties settings
  781. UINT WINAPI MsiApplyMultiplePatchesW(
  782. LPCWSTR szPatchPackages, // Patches to apply
  783. LPCWSTR szProductCode, // target product of patch application
  784. LPCWSTR szPropertiesList); // Properties settings
  785. #ifdef UNICODE
  786. #define MsiApplyMultiplePatches MsiApplyMultiplePatchesW
  787. #else
  788. #define MsiApplyMultiplePatches MsiApplyMultiplePatchesA
  789. #endif // !UNICODE
  790. // Determines which patches apply and in what sequence for the provided set of
  791. // patch files, XML files, and/or XML blobs. Patches already applied to the product
  792. // are taken into account
  793. UINT WINAPI MsiDeterminePatchSequenceA(
  794. LPCSTR szProductCode, // Product code GUID of an installed product
  795. LPCSTR szUserSid, // User account we're interested in
  796. MSIINSTALLCONTEXT dwContext, // Installation context we're interested in
  797. DWORD cPatchInfo, // Number of patches in the array
  798. PMSIPATCHSEQUENCEINFOA pPatchInfo); // Array of patch sequence information data
  799. UINT WINAPI MsiDeterminePatchSequenceW(
  800. LPCWSTR szProductCode, // Product code GUID of an installed product
  801. LPCWSTR szUserSid, // User account we're interested in
  802. MSIINSTALLCONTEXT dwContext, // Installation context we're interested in
  803. DWORD cPatchInfo, // Number of patches in the array
  804. PMSIPATCHSEQUENCEINFOW pPatchInfo); // Array of patch sequence information data
  805. #ifdef UNICODE
  806. #define MsiDeterminePatchSequence MsiDeterminePatchSequenceW
  807. #else
  808. #define MsiDeterminePatchSequence MsiDeterminePatchSequenceA
  809. #endif // !UNICODE
  810. // Determines which patches apply and what sequence for the provided set of patch files,
  811. // XML files, and/or XML blobs. Does not take into account either products or patches
  812. // already installed on the machine.
  813. UINT WINAPI MsiDetermineApplicablePatchesA(
  814. LPCSTR szProductPackagePath, // Fully qualified path to a product MSI database
  815. DWORD cPatchInfo, // Number of patches in the array
  816. PMSIPATCHSEQUENCEINFOA pPatchInfo); // Array of patch sequence information data
  817. UINT WINAPI MsiDetermineApplicablePatchesW(
  818. LPCWSTR szProductPackagePath, // Fully qualified path to a product MSI database
  819. DWORD cPatchInfo, // Number of patches in the array
  820. PMSIPATCHSEQUENCEINFOW pPatchInfo); // Array of patch sequence information data
  821. #ifdef UNICODE
  822. #define MsiDetermineApplicablePatches MsiDetermineApplicablePatchesW
  823. #else
  824. #define MsiDetermineApplicablePatches MsiDetermineApplicablePatchesA
  825. #endif // !UNICODE
  826. // Enumerates all patches applied for a single product or all products based upon
  827. // enumeration context and filter.
  828. UINT WINAPI MsiEnumPatchesExA(
  829. LPCSTR szProductCode, // Enumerate patches on instances of this product
  830. LPCSTR szUserSid, // Account for enumeration
  831. DWORD dwContext, // Contexts for enumeration
  832. DWORD dwFilter, // Filter for enumeration
  833. DWORD dwIndex, // Index for enumeration
  834. CHAR szPatchCode[39], // Enumerated patch code
  835. CHAR szTargetProductCode[39], // Enumerated patch's product code
  836. MSIINSTALLCONTEXT *pdwTargetProductContext, //Enumerated patch's context
  837. LPSTR szTargetUserSid, // Enumerated patch's user account
  838. LPDWORD pcchTargetUserSid); // in/out character count of szTargetUserSid
  839. UINT WINAPI MsiEnumPatchesExW(
  840. LPCWSTR szProductCode, // Enumerate patches on instances of this product
  841. LPCWSTR szUserSid, // Account for enumeration
  842. DWORD dwContext, // Contexts for enumeration
  843. DWORD dwFilter, // Filter for enumeration
  844. DWORD dwIndex, // Index for enumeration
  845. WCHAR szPatchCode[39], // Enumerated patch code
  846. WCHAR szTargetProductCode[39], // Enumerated patch's product code
  847. MSIINSTALLCONTEXT *pdwTargetProductContext, //Enumerated patch's context
  848. LPWSTR szTargetUserSid, // Enumerated patch's user account
  849. LPDWORD pcchTargetUserSid); // in/out character count of szTargetUserSid
  850. #ifdef UNICODE
  851. #define MsiEnumPatchesEx MsiEnumPatchesExW
  852. #else
  853. #define MsiEnumPatchesEx MsiEnumPatchesExA
  854. #endif // !UNICODE
  855. #endif //(_WIN32_MSI >= 300)
  856. // --------------------------------------------------------------------------
  857. // Functions to query and configure a feature within a product.
  858. // --------------------------------------------------------------------------
  859. // Return the installed state for a product feature
  860. INSTALLSTATE WINAPI MsiQueryFeatureStateA(
  861. LPCSTR szProduct,
  862. LPCSTR szFeature);
  863. INSTALLSTATE WINAPI MsiQueryFeatureStateW(
  864. LPCWSTR szProduct,
  865. LPCWSTR szFeature);
  866. #ifdef UNICODE
  867. #define MsiQueryFeatureState MsiQueryFeatureStateW
  868. #else
  869. #define MsiQueryFeatureState MsiQueryFeatureStateA
  870. #endif // !UNICODE
  871. #if (_WIN32_MSI >= 300)
  872. // Retrieve the installed state for a product feature in a particular product instance
  873. UINT WINAPI MsiQueryFeatureStateExA(
  874. LPCSTR szProductCode, // Information is queried on this product
  875. LPCSTR szUserSid, // Account of this product instance
  876. MSIINSTALLCONTEXT dwContext,// Context of this product instance
  877. LPCSTR szFeature, // Name of the feature being queried
  878. INSTALLSTATE *pdwState); // State value
  879. UINT WINAPI MsiQueryFeatureStateExW(
  880. LPCWSTR szProductCode, // Information is queried on this product
  881. LPCWSTR szUserSid, // Account of this product instance
  882. MSIINSTALLCONTEXT dwContext,// Context of this product instance
  883. LPCWSTR szFeature, // Name of the feature being queried
  884. INSTALLSTATE *pdwState); // State value
  885. #ifdef UNICODE
  886. #define MsiQueryFeatureStateEx MsiQueryFeatureStateExW
  887. #else
  888. #define MsiQueryFeatureStateEx MsiQueryFeatureStateExA
  889. #endif // !UNICODE
  890. #endif //(_WIN32_MSI >= 300)
  891. // Indicate intent to use a product feature, increments usage count
  892. // Prompts for CD if not loaded, does not install feature
  893. INSTALLSTATE WINAPI MsiUseFeatureA(
  894. LPCSTR szProduct,
  895. LPCSTR szFeature);
  896. INSTALLSTATE WINAPI MsiUseFeatureW(
  897. LPCWSTR szProduct,
  898. LPCWSTR szFeature);
  899. #ifdef UNICODE
  900. #define MsiUseFeature MsiUseFeatureW
  901. #else
  902. #define MsiUseFeature MsiUseFeatureA
  903. #endif // !UNICODE
  904. // Indicate intent to use a product feature, increments usage count
  905. // Prompts for CD if not loaded, does not install feature
  906. // Allows for bypassing component detection where performance is critical
  907. INSTALLSTATE WINAPI MsiUseFeatureExA(
  908. LPCSTR szProduct, // product code
  909. LPCSTR szFeature, // feature ID
  910. DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
  911. DWORD dwReserved); // reserved, must be 0
  912. INSTALLSTATE WINAPI MsiUseFeatureExW(
  913. LPCWSTR szProduct, // product code
  914. LPCWSTR szFeature, // feature ID
  915. DWORD dwInstallMode, // INSTALLMODE_NODETECTION, else 0
  916. DWORD dwReserved); // reserved, must be 0
  917. #ifdef UNICODE
  918. #define MsiUseFeatureEx MsiUseFeatureExW
  919. #else
  920. #define MsiUseFeatureEx MsiUseFeatureExA
  921. #endif // !UNICODE
  922. // Return the usage metrics for a product feature
  923. UINT WINAPI MsiGetFeatureUsageA(
  924. LPCSTR szProduct, // product code
  925. LPCSTR szFeature, // feature ID
  926. DWORD *pdwUseCount, // returned use count
  927. WORD *pwDateUsed); // last date used (DOS date format)
  928. UINT WINAPI MsiGetFeatureUsageW(
  929. LPCWSTR szProduct, // product code
  930. LPCWSTR szFeature, // feature ID
  931. DWORD *pdwUseCount, // returned use count
  932. WORD *pwDateUsed); // last date used (DOS date format)
  933. #ifdef UNICODE
  934. #define MsiGetFeatureUsage MsiGetFeatureUsageW
  935. #else
  936. #define MsiGetFeatureUsage MsiGetFeatureUsageA
  937. #endif // !UNICODE
  938. // Force the installed state for a product feature
  939. UINT WINAPI MsiConfigureFeatureA(
  940. LPCSTR szProduct,
  941. LPCSTR szFeature,
  942. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  943. UINT WINAPI MsiConfigureFeatureW(
  944. LPCWSTR szProduct,
  945. LPCWSTR szFeature,
  946. INSTALLSTATE eInstallState); // local/source/default/absent/lock/uncache
  947. #ifdef UNICODE
  948. #define MsiConfigureFeature MsiConfigureFeatureW
  949. #else
  950. #define MsiConfigureFeature MsiConfigureFeatureA
  951. #endif // !UNICODE
  952. // Reinstall feature, used to validate or correct problems
  953. UINT WINAPI MsiReinstallFeatureA(
  954. LPCSTR szProduct, // product code
  955. LPCSTR szFeature, // feature ID, NULL for entire product
  956. DWORD dwReinstallMode); // one or more REINSTALLMODE modes
  957. UINT WINAPI MsiReinstallFeatureW(
  958. LPCWSTR szProduct, // product code
  959. LPCWSTR szFeature, // feature ID, NULL for entire product
  960. DWORD dwReinstallMode); // one or more REINSTALLMODE modes
  961. #ifdef UNICODE
  962. #define MsiReinstallFeature MsiReinstallFeatureW
  963. #else
  964. #define MsiReinstallFeature MsiReinstallFeatureA
  965. #endif // !UNICODE
  966. // --------------------------------------------------------------------------
  967. // Functions to query a component. For functions that return a path to
  968. // a particular component, the state of the feature being used should
  969. // have been checked previously.
  970. // --------------------------------------------------------------------------
  971. // Return full component path, performing any necessary installation
  972. // calls MsiQueryFeatureState to detect that all components are installed
  973. // then calls MsiConfigureFeature if any of its components are uninstalled
  974. // then calls MsiLocateComponent to obtain the path the its key file
  975. UINT WINAPI MsiProvideComponentA(
  976. LPCSTR szProduct, // product code in case install required
  977. LPCSTR szFeature, // feature ID in case install required
  978. LPCSTR szComponent, // component ID
  979. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  980. LPSTR lpPathBuf, // returned path, NULL if not desired
  981. DWORD *pcchPathBuf);// in/out buffer character count
  982. UINT WINAPI MsiProvideComponentW(
  983. LPCWSTR szProduct, // product code in case install required
  984. LPCWSTR szFeature, // feature ID in case install required
  985. LPCWSTR szComponent, // component ID
  986. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  987. LPWSTR lpPathBuf, // returned path, NULL if not desired
  988. DWORD *pcchPathBuf);// in/out buffer character count
  989. #ifdef UNICODE
  990. #define MsiProvideComponent MsiProvideComponentW
  991. #else
  992. #define MsiProvideComponent MsiProvideComponentA
  993. #endif // !UNICODE
  994. // Return full component path for a qualified component, performing any necessary installation.
  995. // Prompts for source if necessary and increments the usage count for the feature.
  996. UINT WINAPI MsiProvideQualifiedComponentA(
  997. LPCSTR szCategory, // component category ID
  998. LPCSTR szQualifier, // specifies which component to access
  999. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  1000. LPSTR lpPathBuf, // returned path, NULL if not desired
  1001. DWORD *pcchPathBuf); // in/out buffer character count
  1002. UINT WINAPI MsiProvideQualifiedComponentW(
  1003. LPCWSTR szCategory, // component category ID
  1004. LPCWSTR szQualifier, // specifies which component to access
  1005. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  1006. LPWSTR lpPathBuf, // returned path, NULL if not desired
  1007. DWORD *pcchPathBuf); // in/out buffer character count
  1008. #ifdef UNICODE
  1009. #define MsiProvideQualifiedComponent MsiProvideQualifiedComponentW
  1010. #else
  1011. #define MsiProvideQualifiedComponent MsiProvideQualifiedComponentA
  1012. #endif // !UNICODE
  1013. // Return full component path for a qualified component, performing any necessary installation.
  1014. // Prompts for source if necessary and increments the usage count for the feature.
  1015. // The szProduct parameter specifies the product to match that has published the qualified
  1016. // component. If null, this API works the same as MsiProvideQualifiedComponent.
  1017. UINT WINAPI MsiProvideQualifiedComponentExA(
  1018. LPCSTR szCategory, // component category ID
  1019. LPCSTR szQualifier, // specifies which component to access
  1020. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  1021. LPCSTR szProduct, // the product code
  1022. DWORD dwUnused1, // not used, must be zero
  1023. DWORD dwUnused2, // not used, must be zero
  1024. LPSTR lpPathBuf, // returned path, NULL if not desired
  1025. DWORD *pcchPathBuf); // in/out buffer character count
  1026. UINT WINAPI MsiProvideQualifiedComponentExW(
  1027. LPCWSTR szCategory, // component category ID
  1028. LPCWSTR szQualifier, // specifies which component to access
  1029. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  1030. LPCWSTR szProduct, // the product code
  1031. DWORD dwUnused1, // not used, must be zero
  1032. DWORD dwUnused2, // not used, must be zero
  1033. LPWSTR lpPathBuf, // returned path, NULL if not desired
  1034. DWORD *pcchPathBuf); // in/out buffer character count
  1035. #ifdef UNICODE
  1036. #define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExW
  1037. #else
  1038. #define MsiProvideQualifiedComponentEx MsiProvideQualifiedComponentExA
  1039. #endif // !UNICODE
  1040. // Return full path to an installed component
  1041. INSTALLSTATE WINAPI MsiGetComponentPathA(
  1042. LPCSTR szProduct, // product code for client product
  1043. LPCSTR szComponent, // component Id, string GUID
  1044. LPSTR lpPathBuf, // returned path
  1045. DWORD *pcchBuf); // in/out buffer character count
  1046. INSTALLSTATE WINAPI MsiGetComponentPathW(
  1047. LPCWSTR szProduct, // product code for client product
  1048. LPCWSTR szComponent, // component Id, string GUID
  1049. LPWSTR lpPathBuf, // returned path
  1050. DWORD *pcchBuf); // in/out buffer character count
  1051. #ifdef UNICODE
  1052. #define MsiGetComponentPath MsiGetComponentPathW
  1053. #else
  1054. #define MsiGetComponentPath MsiGetComponentPathA
  1055. #endif // !UNICODE
  1056. #if (_WIN32_MSI >= 150)
  1057. #define MSIASSEMBLYINFO_NETASSEMBLY 0 // Net assemblies
  1058. #define MSIASSEMBLYINFO_WIN32ASSEMBLY 1 // Win32 assemblies
  1059. // Return full component path for an assembly installed via the WI, performing any necessary installation.
  1060. // Prompts for source if necessary and increments the usage count for the feature.
  1061. // The szAssemblyName parameter specifies the stringized assembly name.
  1062. // The szAppContext is the full path to the .cfg file or the app exe to which the assembly being requested
  1063. // has been privatised to, which is null for global assemblies
  1064. UINT WINAPI MsiProvideAssemblyA(
  1065. LPCSTR szAssemblyName, // stringized assembly name
  1066. LPCSTR szAppContext, // specifies the full path to the parent asm's .cfg file, null for global assemblies
  1067. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  1068. DWORD dwAssemblyInfo, // assembly info, including assembly type
  1069. LPSTR lpPathBuf, // returned path, NULL if not desired
  1070. DWORD *pcchPathBuf); // in/out buffer character count
  1071. UINT WINAPI MsiProvideAssemblyW(
  1072. LPCWSTR szAssemblyName, // stringized assembly name
  1073. LPCWSTR szAppContext, // specifies the full path to the parent asm's .cfg file, null for global assemblies
  1074. DWORD dwInstallMode,// either of type INSTALLMODE or a combination of the REINSTALLMODE flags
  1075. DWORD dwAssemblyInfo, // assembly info, including assembly type
  1076. LPWSTR lpPathBuf, // returned path, NULL if not desired
  1077. DWORD *pcchPathBuf); // in/out buffer character count
  1078. #ifdef UNICODE
  1079. #define MsiProvideAssembly MsiProvideAssemblyW
  1080. #else
  1081. #define MsiProvideAssembly MsiProvideAssemblyA
  1082. #endif // !UNICODE
  1083. #endif //(_WIN32_MSI >= 150)
  1084. #if (_WIN32_MSI >= 300)
  1085. // Query the installed state of a component in the specified product instance
  1086. UINT WINAPI MsiQueryComponentStateA(
  1087. LPCSTR szProductCode, // Information is queried on this product
  1088. LPCSTR szUserSid, // Account of this product instance
  1089. MSIINSTALLCONTEXT dwContext,// Context of this product instance
  1090. LPCSTR szComponentCode, // Name of the component being queried
  1091. INSTALLSTATE *pdwState); // State value
  1092. UINT WINAPI MsiQueryComponentStateW(
  1093. LPCWSTR szProductCode, // Information is queried on this product
  1094. LPCWSTR szUserSid, // Account of this product instance
  1095. MSIINSTALLCONTEXT dwContext,// Context of this product instance
  1096. LPCWSTR szComponentCode, // Name of the component being queried
  1097. INSTALLSTATE *pdwState); // State value
  1098. #ifdef UNICODE
  1099. #define MsiQueryComponentState MsiQueryComponentStateW
  1100. #else
  1101. #define MsiQueryComponentState MsiQueryComponentStateA
  1102. #endif // !UNICODE
  1103. #endif //(_WIN32_MSI >= 300)
  1104. // --------------------------------------------------------------------------
  1105. // Functions to iterate registered products, features, and components.
  1106. // As with reg keys, they accept a 0-based index into the enumeration.
  1107. // --------------------------------------------------------------------------
  1108. // Enumerate the registered products, either installed or advertised
  1109. UINT WINAPI MsiEnumProductsA(
  1110. DWORD iProductIndex, // 0-based index into registered products
  1111. LPSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  1112. UINT WINAPI MsiEnumProductsW(
  1113. DWORD iProductIndex, // 0-based index into registered products
  1114. LPWSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  1115. #ifdef UNICODE
  1116. #define MsiEnumProducts MsiEnumProductsW
  1117. #else
  1118. #define MsiEnumProducts MsiEnumProductsA
  1119. #endif // !UNICODE
  1120. #if (_WIN32_MSI >= 300)
  1121. // Enumerate the registered products, either installed or advertised in
  1122. // the specified context
  1123. UINT WINAPI MsiEnumProductsExA(
  1124. LPCSTR szProductCode, // Enumerate instances of this product
  1125. LPCSTR szUserSid, // Account for enumeration
  1126. DWORD dwContext, // Contexts for enumeration
  1127. DWORD dwIndex, // Index for enumeration
  1128. CHAR szInstalledProductCode[39], // Enumerated product's ProductCode
  1129. MSIINSTALLCONTEXT *pdwInstalledContext, //Enumerated product's context
  1130. LPSTR szSid, // Enumerated product's user account
  1131. LPDWORD pcchSid); // in/out character count of szSid
  1132. // Enumerate the registered products, either installed or advertised in
  1133. // the specified context
  1134. UINT WINAPI MsiEnumProductsExW(
  1135. LPCWSTR szProductCode, // Enumerate instances of this product
  1136. LPCWSTR szUserSid, // Account for enumeration
  1137. DWORD dwContext, // Contexts for enumeration
  1138. DWORD dwIndex, // Index for enumeration
  1139. WCHAR szInstalledProductCode[39], // Enumerated product's ProductCode
  1140. MSIINSTALLCONTEXT *pdwInstalledContext, //Enumerated product's context
  1141. LPWSTR szSid, // Enumerated product's user account
  1142. LPDWORD pcchSid); // in/out character count of szSid
  1143. #ifdef UNICODE
  1144. #define MsiEnumProductsEx MsiEnumProductsExW
  1145. #else
  1146. #define MsiEnumProductsEx MsiEnumProductsExA
  1147. #endif // !UNICODE
  1148. #endif //(_WIN32_MSI >= 300)
  1149. #if (_WIN32_MSI >= 110)
  1150. // Enumerate products with given upgrade code
  1151. UINT WINAPI MsiEnumRelatedProductsA(
  1152. LPCSTR lpUpgradeCode, // upgrade code of products to enumerate
  1153. DWORD dwReserved, // reserved, must be 0
  1154. DWORD iProductIndex, // 0-based index into registered products
  1155. LPSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  1156. UINT WINAPI MsiEnumRelatedProductsW(
  1157. LPCWSTR lpUpgradeCode, // upgrade code of products to enumerate
  1158. DWORD dwReserved, // reserved, must be 0
  1159. DWORD iProductIndex, // 0-based index into registered products
  1160. LPWSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  1161. #ifdef UNICODE
  1162. #define MsiEnumRelatedProducts MsiEnumRelatedProductsW
  1163. #else
  1164. #define MsiEnumRelatedProducts MsiEnumRelatedProductsA
  1165. #endif // !UNICODE
  1166. #endif //(_WIN32_MSI >= 110)
  1167. // Enumerate the advertised features for a given product.
  1168. // If parent is not required, supplying NULL will improve performance.
  1169. UINT WINAPI MsiEnumFeaturesA(
  1170. LPCSTR szProduct,
  1171. DWORD iFeatureIndex, // 0-based index into published features
  1172. LPSTR lpFeatureBuf, // feature name buffer, size=MAX_FEATURE_CHARS+1
  1173. LPSTR lpParentBuf); // parent feature buffer, size=MAX_FEATURE_CHARS+1
  1174. UINT WINAPI MsiEnumFeaturesW(
  1175. LPCWSTR szProduct,
  1176. DWORD iFeatureIndex, // 0-based index into published features
  1177. LPWSTR lpFeatureBuf, // feature name buffer, size=MAX_FEATURE_CHARS+1
  1178. LPWSTR lpParentBuf); // parent feature buffer, size=MAX_FEATURE_CHARS+1
  1179. #ifdef UNICODE
  1180. #define MsiEnumFeatures MsiEnumFeaturesW
  1181. #else
  1182. #define MsiEnumFeatures MsiEnumFeaturesA
  1183. #endif // !UNICODE
  1184. // Enumerate the installed components for all products
  1185. UINT WINAPI MsiEnumComponentsA(
  1186. DWORD iComponentIndex, // 0-based index into installed components
  1187. LPSTR lpComponentBuf); // buffer of char count: 39 (size of string GUID)
  1188. UINT WINAPI MsiEnumComponentsW(
  1189. DWORD iComponentIndex, // 0-based index into installed components
  1190. LPWSTR lpComponentBuf); // buffer of char count: 39 (size of string GUID)
  1191. #ifdef UNICODE
  1192. #define MsiEnumComponents MsiEnumComponentsW
  1193. #else
  1194. #define MsiEnumComponents MsiEnumComponentsA
  1195. #endif // !UNICODE
  1196. // Enumerate the client products for a component
  1197. UINT WINAPI MsiEnumClientsA(
  1198. LPCSTR szComponent,
  1199. DWORD iProductIndex, // 0-based index into client products
  1200. LPSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  1201. UINT WINAPI MsiEnumClientsW(
  1202. LPCWSTR szComponent,
  1203. DWORD iProductIndex, // 0-based index into client products
  1204. LPWSTR lpProductBuf); // buffer of char count: 39 (size of string GUID)
  1205. #ifdef UNICODE
  1206. #define MsiEnumClients MsiEnumClientsW
  1207. #else
  1208. #define MsiEnumClients MsiEnumClientsA
  1209. #endif // !UNICODE
  1210. // Enumerate the qualifiers for an advertised component.
  1211. UINT WINAPI MsiEnumComponentQualifiersA(
  1212. LPCSTR szComponent, // generic component ID that is qualified
  1213. DWORD iIndex, // 0-based index into qualifiers
  1214. LPSTR lpQualifierBuf, // qualifier buffer
  1215. DWORD *pcchQualifierBuf, // in/out qualifier buffer character count
  1216. LPSTR lpApplicationDataBuf, // description buffer
  1217. DWORD *pcchApplicationDataBuf); // in/out description buffer character count
  1218. UINT WINAPI MsiEnumComponentQualifiersW(
  1219. LPCWSTR szComponent, // generic component ID that is qualified
  1220. DWORD iIndex, // 0-based index into qualifiers
  1221. LPWSTR lpQualifierBuf, // qualifier buffer
  1222. DWORD *pcchQualifierBuf, // in/out qualifier buffer character count
  1223. LPWSTR lpApplicationDataBuf, // description buffer
  1224. DWORD *pcchApplicationDataBuf); // in/out description buffer character count
  1225. #ifdef UNICODE
  1226. #define MsiEnumComponentQualifiers MsiEnumComponentQualifiersW
  1227. #else
  1228. #define MsiEnumComponentQualifiers MsiEnumComponentQualifiersA
  1229. #endif // !UNICODE
  1230. // --------------------------------------------------------------------------
  1231. // Functions to obtain product or package information.
  1232. // --------------------------------------------------------------------------
  1233. // Open the installation for a product to obtain detailed information
  1234. UINT WINAPI MsiOpenProductA(
  1235. LPCSTR szProduct, // product code
  1236. MSIHANDLE *hProduct); // returned product handle, must be closed
  1237. UINT WINAPI MsiOpenProductW(
  1238. LPCWSTR szProduct, // product code
  1239. MSIHANDLE *hProduct); // returned product handle, must be closed
  1240. #ifdef UNICODE
  1241. #define MsiOpenProduct MsiOpenProductW
  1242. #else
  1243. #define MsiOpenProduct MsiOpenProductA
  1244. #endif // !UNICODE
  1245. // Open a product package in order to access product properties
  1246. UINT WINAPI MsiOpenPackageA(
  1247. LPCSTR szPackagePath, // path to package, or database handle: #nnnn
  1248. MSIHANDLE *hProduct); // returned product handle, must be closed
  1249. UINT WINAPI MsiOpenPackageW(
  1250. LPCWSTR szPackagePath, // path to package, or database handle: #nnnn
  1251. MSIHANDLE *hProduct); // returned product handle, must be closed
  1252. #ifdef UNICODE
  1253. #define MsiOpenPackage MsiOpenPackageW
  1254. #else
  1255. #define MsiOpenPackage MsiOpenPackageA
  1256. #endif // !UNICODE
  1257. #if (_WIN32_MSI >= 150)
  1258. // Open a product package in order to access product properties
  1259. // Option to create a "safe" engine that does not look at machine state
  1260. // and does not allow for modification of machine state
  1261. UINT WINAPI MsiOpenPackageExA(
  1262. LPCSTR szPackagePath, // path to package, or database handle: #nnnn
  1263. DWORD dwOptions, // options flags to indicate whether or not to ignore machine state
  1264. MSIHANDLE *hProduct); // returned product handle, must be closed
  1265. UINT WINAPI MsiOpenPackageExW(
  1266. LPCWSTR szPackagePath, // path to package, or database handle: #nnnn
  1267. DWORD dwOptions, // options flags to indicate whether or not to ignore machine state
  1268. MSIHANDLE *hProduct); // returned product handle, must be closed
  1269. #ifdef UNICODE
  1270. #define MsiOpenPackageEx MsiOpenPackageExW
  1271. #else
  1272. #define MsiOpenPackageEx MsiOpenPackageExA
  1273. #endif // !UNICODE
  1274. #endif //(_WIN32_MSI >= 150)
  1275. // Provide the value for an installation property.
  1276. UINT WINAPI MsiGetProductPropertyA(
  1277. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  1278. LPCSTR szProperty, // property name, case-sensitive
  1279. LPSTR lpValueBuf, // returned value, NULL if not desired
  1280. DWORD *pcchValueBuf); // in/out buffer character count
  1281. UINT WINAPI MsiGetProductPropertyW(
  1282. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  1283. LPCWSTR szProperty, // property name, case-sensitive
  1284. LPWSTR lpValueBuf, // returned value, NULL if not desired
  1285. DWORD *pcchValueBuf); // in/out buffer character count
  1286. #ifdef UNICODE
  1287. #define MsiGetProductProperty MsiGetProductPropertyW
  1288. #else
  1289. #define MsiGetProductProperty MsiGetProductPropertyA
  1290. #endif // !UNICODE
  1291. // Determine whether a file is a package
  1292. // Returns ERROR_SUCCESS if file is a package.
  1293. UINT WINAPI MsiVerifyPackageA(
  1294. LPCSTR szPackagePath); // location of package
  1295. UINT WINAPI MsiVerifyPackageW(
  1296. LPCWSTR szPackagePath); // location of package
  1297. #ifdef UNICODE
  1298. #define MsiVerifyPackage MsiVerifyPackageW
  1299. #else
  1300. #define MsiVerifyPackage MsiVerifyPackageA
  1301. #endif // !UNICODE
  1302. // Provide descriptive information for product feature: title and description.
  1303. // Returns the install level for the feature, or -1 if feature is unknown.
  1304. // 0 = feature is not available on this machine
  1305. // 1 = highest priority, feature installed if parent is installed
  1306. // >1 = decreasing priority, feature installation based on InstallLevel property
  1307. UINT WINAPI MsiGetFeatureInfoA(
  1308. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  1309. LPCSTR szFeature, // feature name
  1310. DWORD *lpAttributes, // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  1311. LPSTR lpTitleBuf, // returned localized name, NULL if not desired
  1312. DWORD *pcchTitleBuf, // in/out buffer character count
  1313. LPSTR lpHelpBuf, // returned description, NULL if not desired
  1314. DWORD *pcchHelpBuf); // in/out buffer character count
  1315. UINT WINAPI MsiGetFeatureInfoW(
  1316. MSIHANDLE hProduct, // product handle obtained from MsiOpenProduct
  1317. LPCWSTR szFeature, // feature name
  1318. DWORD *lpAttributes, // attribute flags for the feature, using INSTALLFEATUREATTRIBUTE
  1319. LPWSTR lpTitleBuf, // returned localized name, NULL if not desired
  1320. DWORD *pcchTitleBuf, // in/out buffer character count
  1321. LPWSTR lpHelpBuf, // returned description, NULL if not desired
  1322. DWORD *pcchHelpBuf); // in/out buffer character count
  1323. #ifdef UNICODE
  1324. #define MsiGetFeatureInfo MsiGetFeatureInfoW
  1325. #else
  1326. #define MsiGetFeatureInfo MsiGetFeatureInfoA
  1327. #endif // !UNICODE
  1328. // --------------------------------------------------------------------------
  1329. // Functions to access or install missing components and files.
  1330. // These should be used as a last resort.
  1331. // --------------------------------------------------------------------------
  1332. // Install a component unexpectedly missing, provided only for error recovery
  1333. // This would typically occur due to failue to establish feature availability
  1334. // The product feature having the smallest incremental cost is installed
  1335. UINT WINAPI MsiInstallMissingComponentA(
  1336. LPCSTR szProduct, // product code
  1337. LPCSTR szComponent, // component Id, string GUID
  1338. INSTALLSTATE eInstallState); // local/source/default, absent invalid
  1339. UINT WINAPI MsiInstallMissingComponentW(
  1340. LPCWSTR szProduct, // product code
  1341. LPCWSTR szComponent, // component Id, string GUID
  1342. INSTALLSTATE eInstallState); // local/source/default, absent invalid
  1343. #ifdef UNICODE
  1344. #define MsiInstallMissingComponent MsiInstallMissingComponentW
  1345. #else
  1346. #define MsiInstallMissingComponent MsiInstallMissingComponentA
  1347. #endif // !UNICODE
  1348. // Install a file unexpectedly missing, provided only for error recovery
  1349. // This would typically occur due to failue to establish feature availability
  1350. // The missing component is determined from the product's File table, then
  1351. // the product feature having the smallest incremental cost is installed
  1352. UINT WINAPI MsiInstallMissingFileA(
  1353. LPCSTR szProduct, // product code
  1354. LPCSTR szFile); // file name, without path
  1355. UINT WINAPI MsiInstallMissingFileW(
  1356. LPCWSTR szProduct, // product code
  1357. LPCWSTR szFile); // file name, without path
  1358. #ifdef UNICODE
  1359. #define MsiInstallMissingFile MsiInstallMissingFileW
  1360. #else
  1361. #define MsiInstallMissingFile MsiInstallMissingFileA
  1362. #endif // !UNICODE
  1363. // Return full path to an installed component without a product code
  1364. // This function attempts to determine the product using MsiGetProductCode
  1365. // but is not guaranteed to find the correct product for the caller.
  1366. // MsiGetComponentPath should always be called when possible.
  1367. INSTALLSTATE WINAPI MsiLocateComponentA(
  1368. LPCSTR szComponent, // component Id, string GUID
  1369. LPSTR lpPathBuf, // returned path
  1370. DWORD *pcchBuf); // in/out buffer character count
  1371. INSTALLSTATE WINAPI MsiLocateComponentW(
  1372. LPCWSTR szComponent, // component Id, string GUID
  1373. LPWSTR lpPathBuf, // returned path
  1374. DWORD *pcchBuf); // in/out buffer character count
  1375. #ifdef UNICODE
  1376. #define MsiLocateComponent MsiLocateComponentW
  1377. #else
  1378. #define MsiLocateComponent MsiLocateComponentA
  1379. #endif // !UNICODE
  1380. #if (_WIN32_MSI >= 110)
  1381. // --------------------------------------------------------------------------
  1382. // Functions used to manage the list of valid sources.
  1383. // --------------------------------------------------------------------------
  1384. // Opens the list of sources for the specified user's install of the product
  1385. // and removes all network sources from the list. A NULL or empty value for
  1386. // the user name indicates the per-machine install.
  1387. UINT WINAPI MsiSourceListClearAllA(
  1388. LPCSTR szProduct, // product code
  1389. LPCSTR szUserName, // user name or NULL/empty for per-machine
  1390. DWORD dwReserved); // reserved - must be 0
  1391. UINT WINAPI MsiSourceListClearAllW(
  1392. LPCWSTR szProduct, // product code
  1393. LPCWSTR szUserName, // user name or NULL/empty for per-machine
  1394. DWORD dwReserved); // reserved - must be 0
  1395. #ifdef UNICODE
  1396. #define MsiSourceListClearAll MsiSourceListClearAllW
  1397. #else
  1398. #define MsiSourceListClearAll MsiSourceListClearAllA
  1399. #endif // !UNICODE
  1400. // Opens the list of sources for the specified user's install of the product
  1401. // and adds the provided source as a new network source. A NULL or empty
  1402. // value for the user name indicates the per-machine install.
  1403. UINT WINAPI MsiSourceListAddSourceA(
  1404. LPCSTR szProduct, // product code
  1405. LPCSTR szUserName, // user name or NULL/empty for per-machine
  1406. DWORD dwReserved, // reserved - must be 0
  1407. LPCSTR szSource); // new source
  1408. UINT WINAPI MsiSourceListAddSourceW(
  1409. LPCWSTR szProduct, // product code
  1410. LPCWSTR szUserName, // user name or NULL/empty for per-machine
  1411. DWORD dwReserved, // reserved - must be 0
  1412. LPCWSTR szSource); // new source
  1413. #ifdef UNICODE
  1414. #define MsiSourceListAddSource MsiSourceListAddSourceW
  1415. #else
  1416. #define MsiSourceListAddSource MsiSourceListAddSourceA
  1417. #endif // !UNICODE
  1418. // Forces the installer to reevaluate the list of sources the next time that
  1419. // the specified product needs a source.
  1420. UINT WINAPI MsiSourceListForceResolutionA(
  1421. LPCSTR szProduct, // product code
  1422. LPCSTR szUserName, // user name or NULL/empty for per-machine
  1423. DWORD dwReserved); // reserved - must be 0
  1424. UINT WINAPI MsiSourceListForceResolutionW(
  1425. LPCWSTR szProduct, // product code
  1426. LPCWSTR szUserName, // user name or NULL/empty for per-machine
  1427. DWORD dwReserved); // reserved - must be 0
  1428. #ifdef UNICODE
  1429. #define MsiSourceListForceResolution MsiSourceListForceResolutionW
  1430. #else
  1431. #define MsiSourceListForceResolution MsiSourceListForceResolutionA
  1432. #endif // !UNICODE
  1433. #endif //(_WIN32_MSI >= 110)
  1434. #if (_WIN32_MSI >= 300)
  1435. // Adds a source or moves a source within the list of sources for the
  1436. // specified product or patch instance. The source can be network/url type.
  1437. UINT WINAPI MsiSourceListAddSourceExA(
  1438. LPCSTR szProductCodeOrPatchCode,// Source will be added to this product or patch
  1439. LPCSTR szUserSid, // Account of this product/patch instance
  1440. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1441. DWORD dwOptions, // Additional qualifiers
  1442. LPCSTR szSource, // source to be added/re-ordered
  1443. DWORD dwIndex); // new index for the source
  1444. UINT WINAPI MsiSourceListAddSourceExW(
  1445. LPCWSTR szProductCodeOrPatchCode,// Source will be added to this product or patch
  1446. LPCWSTR szUserSid, // Account of this product/patch instance
  1447. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1448. DWORD dwOptions, // Additional qualifiers
  1449. LPCWSTR szSource, // source to be added/re-ordered
  1450. DWORD dwIndex); // new index for the source
  1451. #ifdef UNICODE
  1452. #define MsiSourceListAddSourceEx MsiSourceListAddSourceExW
  1453. #else
  1454. #define MsiSourceListAddSourceEx MsiSourceListAddSourceExA
  1455. #endif // !UNICODE
  1456. // Add or update a media source for the specified product or patch instance
  1457. UINT WINAPI MsiSourceListAddMediaDiskA(
  1458. LPCSTR szProductCodeOrPatchCode,// Disk will be added to this product or patch
  1459. LPCSTR szUserSid, // Account of this product/patch instance
  1460. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1461. DWORD dwOptions, // Additional qualifiers
  1462. DWORD dwDiskId, // ID of the disk to be added/updated
  1463. LPCSTR szVolumeLabel, // Volume Label of the disk
  1464. LPCSTR szDiskPrompt); // Disk Prompt of the disk
  1465. UINT WINAPI MsiSourceListAddMediaDiskW(
  1466. LPCWSTR szProductCodeOrPatchCode,// Disk will be added to this product or patch
  1467. LPCWSTR szUserSid, // Account of this product/patch instance
  1468. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1469. DWORD dwOptions, // Additional qualifiers
  1470. DWORD dwDiskId, // ID of the disk to be added/updated
  1471. LPCWSTR szVolumeLabel, // Volume Label of the disk
  1472. LPCWSTR szDiskPrompt); // Disk Prompt of the disk
  1473. #ifdef UNICODE
  1474. #define MsiSourceListAddMediaDisk MsiSourceListAddMediaDiskW
  1475. #else
  1476. #define MsiSourceListAddMediaDisk MsiSourceListAddMediaDiskA
  1477. #endif // !UNICODE
  1478. // Remove an existing source for the specified product or patch instance
  1479. UINT WINAPI MsiSourceListClearSourceA(
  1480. LPCSTR szProductCodeOrPatchCode, // Source will be cleared for this product or patch
  1481. LPCSTR szUserSid, // Account of this product/patch instance
  1482. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1483. DWORD dwOptions, // Additional qualifiers
  1484. LPCSTR szSource); // source to be removed
  1485. UINT WINAPI MsiSourceListClearSourceW(
  1486. LPCWSTR szProductCodeOrPatchCode, // Source will be cleared for this product or patch
  1487. LPCWSTR szUserSid, // Account of this product/patch instance
  1488. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1489. DWORD dwOptions, // Additional qualifiers
  1490. LPCWSTR szSource); // source to be removed
  1491. #ifdef UNICODE
  1492. #define MsiSourceListClearSource MsiSourceListClearSourceW
  1493. #else
  1494. #define MsiSourceListClearSource MsiSourceListClearSourceA
  1495. #endif // !UNICODE
  1496. // Remove an existing registered disk under the media source for the specified product or
  1497. // patch instance
  1498. UINT WINAPI MsiSourceListClearMediaDiskA(
  1499. LPCSTR szProductCodeOrPatchCode, // Disk will be cleared for this product or patch
  1500. LPCSTR szUserSid, // Account of this product/patch instance
  1501. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1502. DWORD dwOptions, // Additional qualifiers
  1503. DWORD dwDiskId); // DiskID to be removed
  1504. UINT WINAPI MsiSourceListClearMediaDiskW(
  1505. LPCWSTR szProductCodeOrPatchCode, // Disk will be cleared for this product or patch
  1506. LPCWSTR szUserSid, // Account of this product/patch instance
  1507. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1508. DWORD dwOptions, // Additional qualifiers
  1509. DWORD dwDiskId); // DiskID to be removed
  1510. #ifdef UNICODE
  1511. #define MsiSourceListClearMediaDisk MsiSourceListClearMediaDiskW
  1512. #else
  1513. #define MsiSourceListClearMediaDisk MsiSourceListClearMediaDiskA
  1514. #endif // !UNICODE
  1515. // Remove all existing sources of the given source type for the specified product or patch
  1516. // instance
  1517. UINT WINAPI MsiSourceListClearAllExA(
  1518. LPCSTR szProductCodeOrPatchCode, // All sources will be cleared for this product or patch
  1519. LPCSTR szUserSid, // Account of this product/patch instance
  1520. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1521. DWORD dwOptions); // Additional qualifiers
  1522. UINT WINAPI MsiSourceListClearAllExW(
  1523. LPCWSTR szProductCodeOrPatchCode, // All sources will be cleared for this product or patch
  1524. LPCWSTR szUserSid, // Account of this product/patch instance
  1525. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1526. DWORD dwOptions); // Additional qualifiers
  1527. #ifdef UNICODE
  1528. #define MsiSourceListClearAllEx MsiSourceListClearAllExW
  1529. #else
  1530. #define MsiSourceListClearAllEx MsiSourceListClearAllExA
  1531. #endif // !UNICODE
  1532. // Forces the installer to reevaluate the list of sources the next time that
  1533. // the specified product or patch instance needs a source.
  1534. UINT WINAPI MsiSourceListForceResolutionExA(
  1535. LPCSTR szProductCodeOrPatchCode, // Source Resolution will be forced for this product or patch
  1536. LPCSTR szUserSid, // Account of this product/patch instance
  1537. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1538. DWORD dwOptions); // Additional qualifiers
  1539. UINT WINAPI MsiSourceListForceResolutionExW(
  1540. LPCWSTR szProductCodeOrPatchCode, // Source Resolution will be forced for this product or patch
  1541. LPCWSTR szUserSid, // Account of this product/patch instance
  1542. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1543. DWORD dwOptions); // Additional qualifiers
  1544. #ifdef UNICODE
  1545. #define MsiSourceListForceResolutionEx MsiSourceListForceResolutionExW
  1546. #else
  1547. #define MsiSourceListForceResolutionEx MsiSourceListForceResolutionExA
  1548. #endif // !UNICODE
  1549. // Set the source list property to the provided value for the specified product or patch instance
  1550. UINT WINAPI MsiSourceListSetInfoA(
  1551. LPCSTR szProductCodeOrPatchCode, // Source Info will be set for this product or patch
  1552. LPCSTR szUserSid, // Account of this product/patch instance
  1553. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1554. DWORD dwOptions, // Additional qualifiers
  1555. LPCSTR szProperty, // Property being set/modified
  1556. LPCSTR szValue); // Value to be set
  1557. UINT WINAPI MsiSourceListSetInfoW(
  1558. LPCWSTR szProductCodeOrPatchCode, // Source Info will be set for this product or patch
  1559. LPCWSTR szUserSid, // Account of this product/patch instance
  1560. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1561. DWORD dwOptions, // Additional qualifiers
  1562. LPCWSTR szProperty, // Property being set/modified
  1563. LPCWSTR szValue); // Value to be set
  1564. #ifdef UNICODE
  1565. #define MsiSourceListSetInfo MsiSourceListSetInfoW
  1566. #else
  1567. #define MsiSourceListSetInfo MsiSourceListSetInfoA
  1568. #endif // !UNICODE
  1569. // Query the given source list property for the specified product or patch instance
  1570. UINT WINAPI MsiSourceListGetInfoA(
  1571. LPCSTR szProductCodeOrPatchCode, // Source Info will be queried for this produt or patch
  1572. LPCSTR szUserSid, // Account of this product/patch instance
  1573. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1574. DWORD dwOptions, // Additional qualifiers
  1575. LPCSTR szProperty, // Property being queried
  1576. LPSTR szValue, // Buffer to get the value
  1577. LPDWORD pcchValue); // in/out character count of szValue
  1578. UINT WINAPI MsiSourceListGetInfoW(
  1579. LPCWSTR szProductCodeOrPatchCode, // Source Info will be queried for this produt or patch
  1580. LPCWSTR szUserSid, // Account of this product/patch instance
  1581. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1582. DWORD dwOptions, // Additional qualifiers
  1583. LPCWSTR szProperty, // Property being queried
  1584. LPWSTR szValue, // Buffer to get the value
  1585. LPDWORD pcchValue); // in/out character count of szValue
  1586. #ifdef UNICODE
  1587. #define MsiSourceListGetInfo MsiSourceListGetInfoW
  1588. #else
  1589. #define MsiSourceListGetInfo MsiSourceListGetInfoA
  1590. #endif // !UNICODE
  1591. // Enumerate all sources for the specified product or patch instance
  1592. UINT WINAPI MsiSourceListEnumSourcesA(
  1593. LPCSTR szProductCodeOrPatchCode, // Sources will be enumerated for this product or patch
  1594. LPCSTR szUserSid, // Account of this product/patch instance
  1595. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1596. DWORD dwOptions, // Additional qualifiers
  1597. DWORD dwIndex, // Index value for enumeration
  1598. LPSTR szSource, // Buffer to receive the enumerated source
  1599. LPDWORD pcchSource); // in/out character count of szSource
  1600. UINT WINAPI MsiSourceListEnumSourcesW(
  1601. LPCWSTR szProductCodeOrPatchCode, // Sources will be enumerated for this product or patch
  1602. LPCWSTR szUserSid, // Account of this product/patch instance
  1603. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1604. DWORD dwOptions, // Additional qualifiers
  1605. DWORD dwIndex, // Index value for enumeration
  1606. LPWSTR szSource, // Buffer to receive the enumerated source
  1607. LPDWORD pcchSource); // in/out character count of szSource
  1608. #ifdef UNICODE
  1609. #define MsiSourceListEnumSources MsiSourceListEnumSourcesW
  1610. #else
  1611. #define MsiSourceListEnumSources MsiSourceListEnumSourcesA
  1612. #endif // !UNICODE
  1613. // Enumerate all registered media disks for the specified product or patch instance
  1614. UINT WINAPI MsiSourceListEnumMediaDisksA(
  1615. LPCSTR szProductCodeOrPatchCode, // Disks will be enumerated for this product or patch
  1616. LPCSTR szUserSid, // Account of this product/patch instance
  1617. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1618. DWORD dwOptions, // Additional qualifiers
  1619. DWORD dwIndex, // Index value for enumeration
  1620. LPDWORD pdwDiskId, // ID of the disk being enumerated
  1621. LPSTR szVolumeLabel, // Volume label of the disk being enumerated
  1622. LPDWORD pcchVolumeLabel, // in/out character count of szVolumeLabel
  1623. LPSTR szDiskPrompt, // DiskPrompt of the disk being enumerated
  1624. LPDWORD pcchDiskPrompt); // in/out character count of szDiskPrompt
  1625. UINT WINAPI MsiSourceListEnumMediaDisksW(
  1626. LPCWSTR szProductCodeOrPatchCode, // Disks will be enumerated for this product or patch
  1627. LPCWSTR szUserSid, // Account of this product/patch instance
  1628. MSIINSTALLCONTEXT dwContext, // Context of this product/patch instance
  1629. DWORD dwOptions, // Additional qualifiers
  1630. DWORD dwIndex, // Index value for enumeration
  1631. LPDWORD pdwDiskId, // ID of the disk being enumerated
  1632. LPWSTR szVolumeLabel, // Volume label of the disk being enumerated
  1633. LPDWORD pcchVolumeLabel, // in/out character count of szVolumeLabel
  1634. LPWSTR szDiskPrompt, // DiskPrompt of the disk being enumerated
  1635. LPDWORD pcchDiskPrompt); // in/out character count of szDiskPrompt
  1636. #ifdef UNICODE
  1637. #define MsiSourceListEnumMediaDisks MsiSourceListEnumMediaDisksW
  1638. #else
  1639. #define MsiSourceListEnumMediaDisks MsiSourceListEnumMediaDisksA
  1640. #endif // !UNICODE
  1641. #endif //(_WIN32_MSI >= 300)
  1642. // --------------------------------------------------------------------------
  1643. // Utility functions
  1644. // --------------------------------------------------------------------------
  1645. // Give the version string and language for a specified file
  1646. UINT WINAPI MsiGetFileVersionA(
  1647. LPCSTR szFilePath, // path to the file
  1648. LPSTR lpVersionBuf, // returned version string
  1649. DWORD *pcchVersionBuf, // in/out buffer byte count
  1650. LPSTR lpLangBuf, // returned language string
  1651. DWORD *pcchLangBuf); // in/out buffer byte count
  1652. UINT WINAPI MsiGetFileVersionW(
  1653. LPCWSTR szFilePath, // path to the file
  1654. LPWSTR lpVersionBuf, // returned version string
  1655. DWORD *pcchVersionBuf, // in/out buffer byte count
  1656. LPWSTR lpLangBuf, // returned language string
  1657. DWORD *pcchLangBuf); // in/out buffer byte count
  1658. #ifdef UNICODE
  1659. #define MsiGetFileVersion MsiGetFileVersionW
  1660. #else
  1661. #define MsiGetFileVersion MsiGetFileVersionA
  1662. #endif // !UNICODE
  1663. #if (_WIN32_MSI >= 150)
  1664. UINT WINAPI MsiGetFileHashA(
  1665. LPCSTR szFilePath, // path to the file
  1666. DWORD dwOptions, // options
  1667. PMSIFILEHASHINFO pHash); // returned file hash info
  1668. UINT WINAPI MsiGetFileHashW(
  1669. LPCWSTR szFilePath, // path to the file
  1670. DWORD dwOptions, // options
  1671. PMSIFILEHASHINFO pHash); // returned file hash info
  1672. #ifdef UNICODE
  1673. #define MsiGetFileHash MsiGetFileHashW
  1674. #else
  1675. #define MsiGetFileHash MsiGetFileHashA
  1676. #endif // !UNICODE
  1677. #endif //(_WIN32_MSI >= 150)
  1678. #if (_WIN32_MSI >= 150)
  1679. #ifndef _MSI_NO_CRYPTO
  1680. HRESULT WINAPI MsiGetFileSignatureInformationA(
  1681. LPCSTR szSignedObjectPath, // path to the signed object
  1682. DWORD dwFlags, // special extra error case flags
  1683. PCCERT_CONTEXT *ppcCertContext, // returned signer cert context
  1684. BYTE *pbHashData, // returned hash buffer, NULL if not desired
  1685. DWORD *pcbHashData); // in/out buffer byte count
  1686. HRESULT WINAPI MsiGetFileSignatureInformationW(
  1687. LPCWSTR szSignedObjectPath, // path to the signed object
  1688. DWORD dwFlags, // special extra error case flags
  1689. PCCERT_CONTEXT *ppcCertContext, // returned signer cert context
  1690. BYTE *pbHashData, // returned hash buffer, NULL if not desired
  1691. DWORD *pcbHashData); // in/out buffer byte count
  1692. #ifdef UNICODE
  1693. #define MsiGetFileSignatureInformation MsiGetFileSignatureInformationW
  1694. #else
  1695. #define MsiGetFileSignatureInformation MsiGetFileSignatureInformationA
  1696. #endif // !UNICODE
  1697. // By default, when only requesting the certificate context, an invalid hash
  1698. // in the digital signature is not a fatal error. Set this flag in the dwFlags
  1699. // parameter to make the TRUST_E_BAD_DIGEST error fatal.
  1700. #define MSI_INVALID_HASH_IS_FATAL 0x1
  1701. #endif// _MSI_NO_CRYPTO
  1702. #endif //(_WIN32_MSI >= 150)
  1703. #if (_WIN32_MSI >= 110)
  1704. // examine a shortcut, and retrieve its descriptor information
  1705. // if available.
  1706. UINT WINAPI MsiGetShortcutTargetA(
  1707. LPCSTR szShortcutPath, // full file path for the shortcut
  1708. LPSTR szProductCode, // returned product code - GUID
  1709. LPSTR szFeatureId, // returned Feature Id.
  1710. LPSTR szComponentCode); // returned component code - GUID
  1711. UINT WINAPI MsiGetShortcutTargetW(
  1712. LPCWSTR szShortcutPath, // full file path for the shortcut
  1713. LPWSTR szProductCode, // returned product code - GUID
  1714. LPWSTR szFeatureId, // returned Feature Id.
  1715. LPWSTR szComponentCode); // returned component code - GUID
  1716. #ifdef UNICODE
  1717. #define MsiGetShortcutTarget MsiGetShortcutTargetW
  1718. #else
  1719. #define MsiGetShortcutTarget MsiGetShortcutTargetA
  1720. #endif // !UNICODE
  1721. #endif //(_WIN32_MSI >= 110)
  1722. #if (_WIN32_MSI >= 110)
  1723. // checks to see if a product is managed
  1724. // checks per-machine if called from system context, per-user if from
  1725. // user context
  1726. UINT WINAPI MsiIsProductElevatedA(
  1727. LPCSTR szProduct, // product code
  1728. BOOL *pfElevated); // result
  1729. // checks to see if a product is managed
  1730. // checks per-machine if called from system context, per-user if from
  1731. // user context
  1732. UINT WINAPI MsiIsProductElevatedW(
  1733. LPCWSTR szProduct, // product code
  1734. BOOL *pfElevated); // result
  1735. #ifdef UNICODE
  1736. #define MsiIsProductElevated MsiIsProductElevatedW
  1737. #else
  1738. #define MsiIsProductElevated MsiIsProductElevatedA
  1739. #endif // !UNICODE
  1740. #endif //(_WIN32_MSI >= 110)
  1741. #ifdef __cplusplus
  1742. }
  1743. #endif
  1744. // --------------------------------------------------------------------------
  1745. // Error codes for installer access functions
  1746. // --------------------------------------------------------------------------
  1747. #ifndef ERROR_INSTALL_FAILURE
  1748. #define ERROR_INSTALL_USEREXIT 1602L // User cancel installation.
  1749. #define ERROR_INSTALL_FAILURE 1603L // Fatal error during installation.
  1750. #define ERROR_INSTALL_SUSPEND 1604L // Installation suspended, incomplete.
  1751. // LOCALIZE BEGIN:
  1752. #define ERROR_UNKNOWN_PRODUCT 1605L // This action is only valid for products that are currently installed.
  1753. // LOCALIZE END
  1754. #define ERROR_UNKNOWN_FEATURE 1606L // Feature ID not registered.
  1755. #define ERROR_UNKNOWN_COMPONENT 1607L // Component ID not registered.
  1756. #define ERROR_UNKNOWN_PROPERTY 1608L // Unknown property.
  1757. #define ERROR_INVALID_HANDLE_STATE 1609L // Handle is in an invalid state.
  1758. // LOCALIZE BEGIN:
  1759. #define ERROR_BAD_CONFIGURATION 1610L // The configuration data for this product is corrupt. Contact your support personnel.
  1760. // LOCALIZE END:
  1761. #define ERROR_INDEX_ABSENT 1611L // Component qualifier not present.
  1762. // LOCALIZE BEGIN:
  1763. #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.
  1764. // LOCALIZE END
  1765. #define ERROR_PRODUCT_UNINSTALLED 1614L // Product is uninstalled.
  1766. #define ERROR_BAD_QUERY_SYNTAX 1615L // SQL query syntax invalid or unsupported.
  1767. #define ERROR_INVALID_FIELD 1616L // Record field does not exist.
  1768. #endif
  1769. // LOCALIZE BEGIN:
  1770. #ifndef ERROR_INSTALL_SERVICE_FAILURE
  1771. #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.
  1772. #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.
  1773. #define ERROR_INSTALL_ALREADY_RUNNING 1618L // Another installation is already in progress. Complete that installation before proceeding with this install.
  1774. #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.
  1775. #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.
  1776. #define ERROR_INSTALL_UI_FAILURE 1621L // There was an error starting the Windows Installer service user interface. Contact your support personnel.
  1777. #define ERROR_INSTALL_LOG_FAILURE 1622L // Error opening installation log file. Verify that the specified log file location exists and is writable.
  1778. #define ERROR_INSTALL_LANGUAGE_UNSUPPORTED 1623L // This language of this installation package is not supported by your system.
  1779. #define ERROR_INSTALL_PACKAGE_REJECTED 1625L // The system administrator has set policies to prevent this installation.
  1780. // LOCALIZE END
  1781. #define ERROR_FUNCTION_NOT_CALLED 1626L // Function could not be executed.
  1782. #define ERROR_FUNCTION_FAILED 1627L // Function failed during execution.
  1783. #define ERROR_INVALID_TABLE 1628L // Invalid or unknown table specified.
  1784. #define ERROR_DATATYPE_MISMATCH 1629L // Data supplied is of wrong type.
  1785. #define ERROR_UNSUPPORTED_TYPE 1630L // Data of this type is not supported.
  1786. // LOCALIZE BEGIN:
  1787. #define ERROR_CREATE_FAILED 1631L // The Windows Installer service failed to start. Contact your support personnel.
  1788. // LOCALIZE END:
  1789. #endif
  1790. // LOCALIZE BEGIN:
  1791. #ifndef ERROR_INSTALL_TEMP_UNWRITABLE
  1792. #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.
  1793. #endif
  1794. #ifndef ERROR_INSTALL_PLATFORM_UNSUPPORTED
  1795. #define ERROR_INSTALL_PLATFORM_UNSUPPORTED 1633L // This installation package is not supported by this processor type. Contact your product vendor.
  1796. #endif
  1797. // LOCALIZE END
  1798. #ifndef ERROR_INSTALL_NOTUSED
  1799. #define ERROR_INSTALL_NOTUSED 1634L // Component not used on this machine
  1800. #endif
  1801. // LOCALIZE BEGIN:
  1802. #ifndef ERROR_INSTALL_TRANSFORM_FAILURE
  1803. #define ERROR_INSTALL_TRANSFORM_FAILURE 1624L // Error applying transforms. Verify that the specified transform paths are valid.
  1804. #endif
  1805. #ifndef ERROR_PATCH_PACKAGE_OPEN_FAILED
  1806. #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.
  1807. #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.
  1808. #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.
  1809. #endif
  1810. #ifndef ERROR_PRODUCT_VERSION
  1811. #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.
  1812. #endif
  1813. #ifndef ERROR_INVALID_COMMAND_LINE
  1814. #define ERROR_INVALID_COMMAND_LINE 1639L // Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
  1815. #endif
  1816. // The following three error codes are not returned from MSI version 1.0
  1817. #ifndef ERROR_INSTALL_REMOTE_DISALLOWED
  1818. #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.
  1819. #endif
  1820. // LOCALIZE END
  1821. #ifndef ERROR_SUCCESS_REBOOT_INITIATED
  1822. #define ERROR_SUCCESS_REBOOT_INITIATED 1641L // The requested operation completed successfully. The system will be restarted so the changes can take effect.
  1823. #endif
  1824. // LOCALIZE BEGIN:
  1825. #ifndef ERROR_PATCH_TARGET_NOT_FOUND
  1826. #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.
  1827. #endif
  1828. // LOCALIZE END
  1829. // The following two error codes are not returned from MSI version 1.0, 1.1. or 1.2
  1830. // LOCALIZE BEGIN:
  1831. #ifndef ERROR_PATCH_PACKAGE_REJECTED
  1832. #define ERROR_PATCH_PACKAGE_REJECTED 1643L // The patch package is not permitted by software restriction policy.
  1833. #endif
  1834. #ifndef ERROR_INSTALL_TRANSFORM_REJECTED
  1835. #define ERROR_INSTALL_TRANSFORM_REJECTED 1644L // One or more customizations are not permitted by software restriction policy.
  1836. #endif
  1837. // LOCALIZE END
  1838. // The following error code is returned only from MSI post version 2.0
  1839. // LOCALIZE BEGIN:
  1840. #ifndef ERROR_INSTALL_REMOTE_PROHIBITED
  1841. #define ERROR_INSTALL_REMOTE_PROHIBITED 1645L // The Windows Installer does not permit installation from a Remote Desktop Connection.
  1842. #endif
  1843. // LOCALIZE END
  1844. // The following error codes are returned from MSI 3.0 and later.
  1845. // LOCALIZE BEGIN:
  1846. #ifndef ERROR_PATCH_REMOVAL_UNSUPPORTED
  1847. #define ERROR_PATCH_REMOVAL_UNSUPPORTED 1646L // Uninstallation of the patch package is not supported.
  1848. #endif
  1849. // LOCALIZE END
  1850. // LOCALIZE BEGIN:
  1851. #ifndef ERROR_UNKNOWN_PATCH
  1852. #define ERROR_UNKNOWN_PATCH 1647L // The patch is not applied to this product.
  1853. #endif
  1854. // LOCALIZE END
  1855. // LOCALIZE BEGIN:
  1856. #ifndef ERROR_PATCH_NO_SEQUENCE
  1857. #define ERROR_PATCH_NO_SEQUENCE 1648L // No valid sequence could be found for the set of patches.
  1858. #endif
  1859. // LOCALIZE END
  1860. // LOCALIZE BEGIN:
  1861. #ifndef ERROR_PATCH_REMOVAL_DISALLOWED
  1862. #define ERROR_PATCH_REMOVAL_DISALLOWED 1649L // Patch removal was disallowed by policy.
  1863. #endif
  1864. // LOCALIZE END
  1865. // LOCALIZE BEGIN:
  1866. #ifndef ERROR_INVALID_PATCH_XML
  1867. #define ERROR_INVALID_PATCH_XML 1650L // The XML patch data is invalid.
  1868. #endif
  1869. // LOCALIZE END
  1870. // LOCALIZE BEGIN:
  1871. #ifndef ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT
  1872. #define ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT 1651L // Windows Installer does not permit patching of managed advertised products. At least one feature of the product must be installed before applying the patch.
  1873. #endif
  1874. // LOCALIZE END
  1875. #endif // _MSI_H_