Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
11 KiB

  1. /****************************************************************************\
  2. OPTCOMP.H / Setup Manager
  3. Microsoft Confidential
  4. Copyright (c) Microsoft Corporation 2002
  5. All rights reserved
  6. Source file for the Setup Manager that contains the external and internal
  7. functions used by the "Windows Components" wizard page.
  8. 01/02 - Stephen Lodwick (STELO)
  9. Added header file for OPTCOMP.C
  10. \****************************************************************************/
  11. //
  12. // Internal Structure(s):
  13. //
  14. typedef struct _COMPONENT_GROUP
  15. {
  16. DWORD dwComponentsIndex;
  17. DWORD64 dwComponents;
  18. UINT uId;
  19. DWORD dwValidSkus;
  20. DWORD dwDefaultSkus;
  21. } COMPONENT_GROUP, *PCOMPONENT_GROUP, *LPCOMPONENT_GROUP;
  22. typedef struct _COMPONENT
  23. {
  24. DWORD64 dwComponent;
  25. LPTSTR lpComponentString;
  26. UINT uId;
  27. }COMPONENT, *PCOMPONENT, *LPCOMPONENT;
  28. //
  29. // Internal Defined Value(s):
  30. //
  31. // Individual components that are installed
  32. //
  33. #define FLG_OCS_ACCE 0x0000000000000001 // Accessibility
  34. #define FLG_OCS_CALC 0x0000000000000002 // Calculator
  35. #define FLG_OCS_CHAR 0x0000000000000004 // Character Map
  36. #define FLG_OCS_CLIP 0x0000000000000008 // Clipboard
  37. #define FLG_OCS_DESK 0x0000000000000010 // Desktop Wallpaper
  38. #define FLG_OCS_TEMP 0x0000000000000020 // Document Templates
  39. #define FLG_OCS_MOUS 0x0000000000000040 // Mouse Pointers
  40. #define FLG_OCS_PAIN 0x0000000000000080 // Paint
  41. #define FLG_OCS_FREE 0x0000000000000100 // Freecell
  42. #define FLG_OCS_HEAR 0x0000000000000200 // Hearts
  43. #define FLG_OCS_ZONE 0x0000000000000400 // Internet Games
  44. #define FLG_OCS_MINE 0x0000000000000800 // Minesweeper
  45. #define FLG_OCS_SOLI 0x0000000000001000 // Solitaire
  46. #define FLG_OCS_SPID 0x0000000000002000 // Spider
  47. #define FLG_OCS_INDE 0x0000000000004000 // Index Server
  48. #define FLG_OCS_MSNE 0x0000000000008000 // MSN Explorer
  49. #define FLG_OCS_CERT 0x0000000000010000 // Certificate Server Components
  50. #define FLG_OCS_CERC 0x0000000000020000 // Certificate Server Client
  51. #define FLG_OCS_CERS 0x0000000000040000 // Certificate Server
  52. #define FLG_OCS_IISW 0x0000000000080000 // World Wide Web
  53. #define FLG_OCS_IISF 0x0000000000100000 // File Transfer Protocol
  54. #define FLG_OCS_SMTP 0x0000000000200000 // SMTP Services
  55. #define FLG_OCS_SMTD 0x0000000000400000 // SMTP Services Documentation
  56. #define FLG_OCS_NNTP 0x0000000000800000 // NNTP Services
  57. #define FLG_OCS_NNTD 0x0000000001000000 // NNTP Services Documentation
  58. #define FLG_OCS_REMI 0x0000000002000000 // RIS Service
  59. #define FLG_OCS_REST 0x0000000004000000 // Remote Storage
  60. #define FLG_OCS_TERM 0x0000000008000000 // Terminal Services
  61. #define FLG_OCS_WMSS 0x0000000010000000 // Windows Media Services Core
  62. #define FLG_OCS_WASP 0x0000000020000000 // Windows Media Services ASP Console
  63. #define FLG_OCS_WMMC 0x0000000040000000 // Windows Media Services MMC Console
  64. #define FLG_OCS_WASS 0x0000000080000000 // Windows Media Services Components
  65. #define FLG_OCS_CHAT 0x0000000100000000 // Windows Chat
  66. #define FLG_OCS_DIAL 0x0000000200000000 // Windows Dialer
  67. #define FLG_OCS_HYPE 0x0000000400000000 // Hyperterminal
  68. #define FLG_OCS_CDPL 0x0000000800000000 // CD Player
  69. #define FLG_OCS_MEDI 0x0000001000000000 // Windows Media Player
  70. #define FLG_OCS_SAMP 0x0000002000000000 // Samples sounds
  71. #define FLG_OCS_UTOP 0x0000004000000000 // Samples utopia sounds
  72. #define FLG_OCS_RECO 0x0000008000000000 // Recorder Control
  73. #define FLG_OCS_VOLU 0x0000010000000000 // Volume Control
  74. // Groups of components that can be selected by user
  75. //
  76. #define VAL_OCS_ACCE ( FLG_OCS_ACCE ) // Accessibility group
  77. #define VAL_OCS_ACSS ( FLG_OCS_CALC | FLG_OCS_CHAR | FLG_OCS_CLIP | FLG_OCS_DESK | FLG_OCS_TEMP | FLG_OCS_MOUS | FLG_OCS_PAIN ) // Accessories group
  78. #define VAL_OCS_GAME ( FLG_OCS_FREE | FLG_OCS_HEAR | FLG_OCS_ZONE | FLG_OCS_MINE | FLG_OCS_SOLI | FLG_OCS_SPID ) // Games group
  79. #define VAL_OCS_INDE ( FLG_OCS_INDE ) // Index service group
  80. #define VAL_OCS_MSNE ( FLG_OCS_MSNE ) // MSNExplorer group
  81. #define VAL_OCS_CERT ( FLG_OCS_CERT | FLG_OCS_CERC | FLG_OCS_CERS ) // Certificate server group
  82. #define VAL_OCS_IISW ( FLG_OCS_IISW ) // IIS - Web Services group
  83. #define VAL_OCS_IISF ( FLG_OCS_IISF ) // IIS - FTP Services group
  84. #define VAL_OCS_SMTP ( FLG_OCS_SMTP | FLG_OCS_SMTD ) // IIS - SMTP Services group
  85. #define VAL_OCS_NNTP ( FLG_OCS_NNTP | FLG_OCS_NNTD ) // IIS - NNTP Service group
  86. #define VAL_OCS_REMI ( FLG_OCS_REMI ) // Remote Installation Services (RIS)
  87. #define VAL_OCS_REST ( FLG_OCS_REST ) // Remote Storage group
  88. #define VAL_OCS_TERM ( FLG_OCS_TERM ) // Terminal Server group
  89. #define VAL_OCS_WMSS ( FLG_OCS_WMSS | FLG_OCS_WASP | FLG_OCS_WMMC | FLG_OCS_WASS ) // Windows media services group
  90. #define VAL_OCS_COMM ( FLG_OCS_CHAT | FLG_OCS_DIAL | FLG_OCS_HYPE ) // Communications
  91. #define VAL_OCS_MULT ( FLG_OCS_CDPL | FLG_OCS_MEDI | FLG_OCS_SAMP | FLG_OCS_UTOP | FLG_OCS_RECO | FLG_OCS_VOLU ) // Multimedia group
  92. // Mapping for component so it can be written to unattend file
  93. //
  94. static COMPONENT s_cComponent[] =
  95. {
  96. { FLG_OCS_ACCE, _T("accessopt"), IDS_CPT_ACCE },
  97. { FLG_OCS_CALC, _T("calc"), IDS_CPT_CALC },
  98. { FLG_OCS_CHAR, _T("charmap"), IDS_CPT_CHAR },
  99. { FLG_OCS_CLIP, _T("clipbook"), IDS_CPT_CLIP },
  100. { FLG_OCS_DESK, _T("deskpaper"), IDS_CPT_DESK },
  101. { FLG_OCS_TEMP, _T("templates"), IDS_CPT_TEMP },
  102. { FLG_OCS_MOUS, _T("mousepoint"), IDS_CPT_MOUS },
  103. { FLG_OCS_PAIN, _T("paint"), IDS_CPT_PAIN },
  104. { FLG_OCS_FREE, _T("freecell"), IDS_CPT_FREE },
  105. { FLG_OCS_HEAR, _T("hearts"), IDS_CPT_HEAR },
  106. { FLG_OCS_ZONE, _T("zonegames"), IDS_CPT_ZONE },
  107. { FLG_OCS_MINE, _T("minesweeper"), IDS_CPT_MINE },
  108. { FLG_OCS_SOLI, _T("solitaire"), IDS_CPT_SOLI },
  109. { FLG_OCS_SPID, _T("spider"), IDS_CPT_SPID },
  110. { FLG_OCS_INDE, _T("indexsrv_system"), IDS_CPT_INDE },
  111. { FLG_OCS_MSNE, _T("msnexplr"), IDS_CPT_MSNE },
  112. { FLG_OCS_CERT, _T("certsrv"), IDS_CPT_CERT },
  113. { FLG_OCS_CERC, _T("certsrv_client"), IDS_CPT_CERC },
  114. { FLG_OCS_CERS, _T("certsrv_server"), IDS_CPT_CERS },
  115. { FLG_OCS_IISW, _T("iis_www"), IDS_CPT_IISW },
  116. { FLG_OCS_IISF, _T("iis_ftp"), IDS_CPT_IISF },
  117. { FLG_OCS_SMTP, _T("iis_smtp"), IDS_CPT_SMTP },
  118. { FLG_OCS_SMTD, _T("iis_smtp_docs"), IDS_CPT_SMTD },
  119. { FLG_OCS_NNTP, _T("iis_nntp"), IDS_CPT_NNTP },
  120. { FLG_OCS_NNTD, _T("iis_nntp_docs"), IDS_CPT_NNTD },
  121. { FLG_OCS_REMI, _T("reminst"), IDS_CPT_REMI },
  122. { FLG_OCS_REST, _T("rstorage"), IDS_CPT_REST },
  123. { FLG_OCS_TERM, _T("TerminalServer"), IDS_CPT_TERM },
  124. { FLG_OCS_WMSS, _T("wms"), IDS_CPT_WMSS },
  125. { FLG_OCS_WASP, _T("wms_admin_asp"), IDS_CPT_WASP },
  126. { FLG_OCS_WMMC, _T("wms_admin_mmc"), IDS_CPT_WMMC },
  127. { FLG_OCS_WASS, _T("wms_server"), IDS_CPT_WASS },
  128. { FLG_OCS_CHAT, _T("chat"), IDS_CPT_CHAT },
  129. { FLG_OCS_DIAL, _T("dialer"), IDS_CPT_DIAL },
  130. { FLG_OCS_HYPE, _T("hypertrm"), IDS_CPT_HYPE },
  131. { FLG_OCS_CDPL, _T("cdplayer"), IDS_CPT_CDPL },
  132. { FLG_OCS_MEDI, _T("mplay"), IDS_CPT_MEDI },
  133. { FLG_OCS_SAMP, _T("media_clips"), IDS_CPT_SAMP },
  134. { FLG_OCS_UTOP, _T("media_utopia"), IDS_CPT_UTOP },
  135. { FLG_OCS_RECO, _T("rec"), IDS_CPT_RECO },
  136. { FLG_OCS_VOLU, _T("vol"), IDS_CPT_VOLU },
  137. };
  138. // List of groups with their cooresponding friendly names
  139. //
  140. static COMPONENT_GROUP s_cgComponentNames[] =
  141. {
  142. { 0, VAL_OCS_ACCE, IDS_OCS_ACCE, PLATFORM_ALL, PLATFORM_ALL },
  143. { 1, VAL_OCS_ACSS, IDS_OCS_ACSS, PLATFORM_ALL, PLATFORM_ALL },
  144. { 2, VAL_OCS_GAME, IDS_OCS_GAME, PLATFORM_ALL, PLATFORM_USER },
  145. { 3, VAL_OCS_COMM, IDS_OCS_COMM, PLATFORM_ALL, PLATFORM_ALL },
  146. { 4, VAL_OCS_MULT, IDS_OCS_MULT, PLATFORM_ALL, PLATFORM_ALL },
  147. { 5, VAL_OCS_MSNE, IDS_OCS_MSNE, PLATFORM_ALL, PLATFORM_USER },
  148. { 6, VAL_OCS_INDE, IDS_OCS_INDE, PLATFORM_ALL, PLATFORM_ALL },
  149. { 7, VAL_OCS_CERT, IDS_OCS_CERT, PLATFORM_SERVER | PLATFORM_ENTERPRISE, PLATFORM_NONE },
  150. { 8, VAL_OCS_IISW, IDS_OCS_IISW, PLATFORM_SERVERS | PLATFORM_WORKSTATION, PLATFORM_WEBBLADE },
  151. { 9, VAL_OCS_IISF, IDS_OCS_IISF, PLATFORM_SERVERS | PLATFORM_WORKSTATION, PLATFORM_NONE },
  152. { 10, VAL_OCS_SMTP, IDS_OCS_SMTP, PLATFORM_SERVERS | PLATFORM_WORKSTATION, PLATFORM_WEBBLADE },
  153. { 11, VAL_OCS_NNTP, IDS_OCS_NNTP, PLATFORM_SERVERS | PLATFORM_WORKSTATION, PLATFORM_NONE },
  154. { 12, VAL_OCS_REMI, IDS_OCS_REMI, PLATFORM_SERVER | PLATFORM_ENTERPRISE, PLATFORM_NONE },
  155. { 13, VAL_OCS_REST, IDS_OCS_REST, PLATFORM_SERVER | PLATFORM_ENTERPRISE, PLATFORM_NONE },
  156. { 14, VAL_OCS_TERM, IDS_OCS_TERM, PLATFORM_SERVER | PLATFORM_ENTERPRISE, PLATFORM_NONE },
  157. { 15, VAL_OCS_WMSS, IDS_OCS_WMSS, PLATFORM_SERVER | PLATFORM_ENTERPRISE, PLATFORM_NONE },
  158. };