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.

271 lines
11 KiB

  1. #pragma once
  2. #include "VarSetBase.h"
  3. #include <time.h>
  4. //---------------------------------------------------------------------------
  5. // VarSet Reports Class
  6. //---------------------------------------------------------------------------
  7. class CVarSetReports : public CVarSet
  8. {
  9. public:
  10. CVarSetReports(const CVarSet& rVarSet) :
  11. CVarSet(rVarSet)
  12. {
  13. Put(DCTVS_GatherInformation, true);
  14. Put(DCTVS_Reports_Generate, true);
  15. }
  16. //
  17. void SetType(int nType)
  18. {
  19. UINT uIdType;
  20. UINT uIdTime;
  21. switch (nType)
  22. {
  23. case admtReportMigratedAccounts:
  24. uIdType = DCTVS_Reports_MigratedAccounts;
  25. uIdTime = DCTVS_Reports_MigratedAccounts_TimeGenerated;
  26. break;
  27. case admtReportMigratedComputers:
  28. uIdType = DCTVS_Reports_MigratedComputers;
  29. uIdTime = DCTVS_Reports_MigratedComputers_TimeGenerated;
  30. break;
  31. case admtReportExpiredComputers:
  32. uIdType = DCTVS_Reports_ExpiredComputers;
  33. uIdTime = DCTVS_Reports_ExpiredComputers_TimeGenerated;
  34. break;
  35. case admtReportAccountReferences:
  36. uIdType = DCTVS_Reports_AccountReferences;
  37. uIdTime = DCTVS_Reports_AccountReferences_TimeGenerated;
  38. break;
  39. case admtReportNameConflicts:
  40. uIdType = DCTVS_Reports_NameConflicts;
  41. uIdTime = DCTVS_Reports_NameConflicts_TimeGenerated;
  42. break;
  43. default:
  44. _ASSERT(FALSE);
  45. break;
  46. }
  47. Put(uIdType, true);
  48. Put(uIdTime, _bstr_t(_variant_t(time(NULL))));
  49. }
  50. void SetReportsDirectory(LPCTSTR pszDirectory)
  51. {
  52. _bstr_t strDirectory;
  53. if (pszDirectory && pszDirectory[0])
  54. {
  55. strDirectory = pszDirectory;
  56. }
  57. else
  58. {
  59. strDirectory = GetReportsFolder();
  60. }
  61. Put(DCTVS_Reports_Directory, strDirectory);
  62. }
  63. };
  64. //---------------------------------------------------------------------------
  65. // Validation Functions
  66. //---------------------------------------------------------------------------
  67. inline bool IsReportTypeValid(long lType)
  68. {
  69. return ((lType >= admtReportMigratedAccounts) && (lType <= admtReportNameConflicts));
  70. }
  71. /*
  72. Migrated Users & Groups
  73. 2000-11-20 12:05:27 VarSet
  74. 2000-11-20 12:05:27 Case Sensitive: Yes, Indexed: Yes
  75. 2000-11-20 12:05:27 User Data ( 25 ) items
  76. 2000-11-20 12:05:27 [] <Empty>
  77. 2000-11-20 12:05:27 [GatherInformation] Yes
  78. 2000-11-20 12:05:27 [Options] <Empty>
  79. 2000-11-20 12:05:27 [Options.AppendToLogs] Yes
  80. 2000-11-20 12:05:27 [Options.DispatchLog] E:\Program Files\Active Directory Migration Tool\Logs\dispatch.log
  81. 2000-11-20 12:05:27 [Options.IsIntraforest] No
  82. 2000-11-20 12:05:27 [Options.Logfile] E:\Program Files\Active Directory Migration Tool\Logs\Migration.log
  83. 2000-11-20 12:05:27 [Options.MaxThreads] 20
  84. 2000-11-20 12:05:27 [Options.SourceDomain] HAY-BUV
  85. 2000-11-20 12:05:27 [Options.SourceDomainDns] hay-buv.nttest.microsoft.com
  86. 2000-11-20 12:05:27 [Options.TargetDomain] HAY-BUV-MPO
  87. 2000-11-20 12:05:27 [Options.TargetDomainDns] hay-buv-mpo.nttest.microsoft.com
  88. 2000-11-20 12:05:27 [Options.Wizard] reporting
  89. 2000-11-20 12:05:27 [PlugIn] <Empty>
  90. 2000-11-20 12:05:27 [PlugIn.0] None
  91. 2000-11-20 12:05:27 [Reports] <Empty>
  92. 2000-11-20 12:05:27 [Reports.AccountReferences] No
  93. 2000-11-20 12:05:27 [Reports.Directory] E:\Program Files\Active Directory Migration Tool\Reports
  94. 2000-11-20 12:05:27 [Reports.ExpiredComputers] No
  95. 2000-11-20 12:05:27 [Reports.Generate] Yes
  96. 2000-11-20 12:05:27 [Reports.MigratedAccounts] Yes
  97. 2000-11-20 12:05:27 [Reports.MigratedAccounts.TimeGenerated] 974750727
  98. 2000-11-20 12:05:27 [Reports.MigratedComputers] No
  99. 2000-11-20 12:05:27 [Reports.NameConflicts] No
  100. 2000-11-20 12:05:27 [Security] <Empty>
  101. 2000-11-20 12:05:27 [Security.TranslateContainers]
  102. Migrated Computers
  103. 2000-11-20 12:21:13 VarSet
  104. 2000-11-20 12:21:13 Case Sensitive: Yes, Indexed: Yes
  105. 2000-11-20 12:21:13 User Data ( 25 ) items
  106. 2000-11-20 12:21:13 [] <Empty>
  107. 2000-11-20 12:21:13 [GatherInformation] Yes
  108. 2000-11-20 12:21:13 [Options] <Empty>
  109. 2000-11-20 12:21:13 [Options.AppendToLogs] Yes
  110. 2000-11-20 12:21:13 [Options.DispatchLog] E:\Program Files\Active Directory Migration Tool\Logs\dispatch.log
  111. 2000-11-20 12:21:13 [Options.IsIntraforest] No
  112. 2000-11-20 12:21:13 [Options.Logfile] E:\Program Files\Active Directory Migration Tool\Logs\Migration.log
  113. 2000-11-20 12:21:13 [Options.MaxThreads] 20
  114. 2000-11-20 12:21:13 [Options.SourceDomain] HAY-BUV
  115. 2000-11-20 12:21:13 [Options.SourceDomainDns] hay-buv.nttest.microsoft.com
  116. 2000-11-20 12:21:13 [Options.TargetDomain] HAY-BUV-MPO
  117. 2000-11-20 12:21:13 [Options.TargetDomainDns] hay-buv-mpo.nttest.microsoft.com
  118. 2000-11-20 12:21:13 [Options.Wizard] reporting
  119. 2000-11-20 12:21:13 [PlugIn] <Empty>
  120. 2000-11-20 12:21:13 [PlugIn.0] None
  121. 2000-11-20 12:21:13 [Reports] <Empty>
  122. 2000-11-20 12:21:13 [Reports.AccountReferences] No
  123. 2000-11-20 12:21:13 [Reports.Directory] E:\Program Files\Active Directory Migration Tool\Reports
  124. 2000-11-20 12:21:13 [Reports.ExpiredComputers] No
  125. 2000-11-20 12:21:13 [Reports.Generate] Yes
  126. 2000-11-20 12:21:13 [Reports.MigratedAccounts] No
  127. 2000-11-20 12:21:13 [Reports.MigratedComputers] Yes
  128. 2000-11-20 12:21:13 [Reports.MigratedComputers.TimeGenerated] 974751673
  129. 2000-11-20 12:21:13 [Reports.NameConflicts] No
  130. 2000-11-20 12:21:13 [Security] <Empty>
  131. 2000-11-20 12:21:13 [Security.TranslateContainers]
  132. Expired Computer Accounts
  133. 2000-11-20 12:22:49 VarSet
  134. 2000-11-20 12:22:49 Case Sensitive: Yes, Indexed: Yes
  135. 2000-11-20 12:22:49 User Data ( 25 ) items
  136. 2000-11-20 12:22:49 [] <Empty>
  137. 2000-11-20 12:22:49 [GatherInformation] Yes
  138. 2000-11-20 12:22:49 [Options] <Empty>
  139. 2000-11-20 12:22:49 [Options.AppendToLogs] Yes
  140. 2000-11-20 12:22:49 [Options.DispatchLog] E:\Program Files\Active Directory Migration Tool\Logs\dispatch.log
  141. 2000-11-20 12:22:49 [Options.IsIntraforest] No
  142. 2000-11-20 12:22:49 [Options.Logfile] E:\Program Files\Active Directory Migration Tool\Logs\Migration.log
  143. 2000-11-20 12:22:49 [Options.MaxThreads] 20
  144. 2000-11-20 12:22:49 [Options.SourceDomain] HAY-BUV
  145. 2000-11-20 12:22:49 [Options.SourceDomainDns] hay-buv.nttest.microsoft.com
  146. 2000-11-20 12:22:49 [Options.TargetDomain] HAY-BUV-MPO
  147. 2000-11-20 12:22:49 [Options.TargetDomainDns] hay-buv-mpo.nttest.microsoft.com
  148. 2000-11-20 12:22:49 [Options.Wizard] reporting
  149. 2000-11-20 12:22:49 [PlugIn] <Empty>
  150. 2000-11-20 12:22:49 [PlugIn.0] None
  151. 2000-11-20 12:22:49 [Reports] <Empty>
  152. 2000-11-20 12:22:49 [Reports.AccountReferences] No
  153. 2000-11-20 12:22:49 [Reports.Directory] E:\Program Files\Active Directory Migration Tool\Reports
  154. 2000-11-20 12:22:49 [Reports.ExpiredComputers] Yes
  155. 2000-11-20 12:22:49 [Reports.ExpiredComputers.TimeGenerated] 974751769
  156. 2000-11-20 12:22:49 [Reports.Generate] Yes
  157. 2000-11-20 12:22:49 [Reports.MigratedAccounts] No
  158. 2000-11-20 12:22:49 [Reports.MigratedComputers] No
  159. 2000-11-20 12:22:49 [Reports.NameConflicts] No
  160. 2000-11-20 12:22:49 [Security] <Empty>
  161. 2000-11-20 12:22:49 [Security.TranslateContainers]
  162. Account Reference
  163. 2000-11-20 12:25:16 VarSet
  164. 2000-11-20 12:25:16 Case Sensitive: Yes, Indexed: Yes
  165. 2000-11-20 12:25:16 User Data ( 43 ) items
  166. 2000-11-20 12:25:16 [] <Empty>
  167. 2000-11-20 12:25:16 [Accounts] <Empty>
  168. 2000-11-20 12:25:16 [Accounts.0] HAY-BUV3-DC1
  169. 2000-11-20 12:25:16 [Accounts.0.TargetName]
  170. 2000-11-20 12:25:16 [Accounts.0.Type] computer
  171. 2000-11-20 12:25:16 [Accounts.1] HB-RES-MEM
  172. 2000-11-20 12:25:16 [Accounts.1.TargetName]
  173. 2000-11-20 12:25:16 [Accounts.1.Type] computer
  174. 2000-11-20 12:25:16 [Accounts.NumItems] 2
  175. 2000-11-20 12:25:16 [GatherInformation] Yes
  176. 2000-11-20 12:25:16 [Options] <Empty>
  177. 2000-11-20 12:25:16 [Options.AppendToLogs] Yes
  178. 2000-11-20 12:25:16 [Options.Credentials] <Empty>
  179. 2000-11-20 12:25:16 [Options.Credentials.Domain] HAY-BUV
  180. 2000-11-20 12:25:16 [Options.Credentials.Password] xyz
  181. 2000-11-20 12:25:16 [Options.Credentials.UserName] Administrator
  182. 2000-11-20 12:25:16 [Options.DispatchLog] E:\Program Files\Active Directory Migration Tool\Logs\dispatch.log
  183. 2000-11-20 12:25:16 [Options.IsIntraforest] No
  184. 2000-11-20 12:25:16 [Options.Logfile] E:\Program Files\Active Directory Migration Tool\Logs\Migration.log
  185. 2000-11-20 12:25:16 [Options.MaxThreads] 20
  186. 2000-11-20 12:25:16 [Options.SourceDomain] HAY-BUV
  187. 2000-11-20 12:25:16 [Options.SourceDomainDns] hay-buv.nttest.microsoft.com
  188. 2000-11-20 12:25:16 [Options.TargetDomain] HAY-BUV-MPO
  189. 2000-11-20 12:25:16 [Options.TargetDomainDns] hay-buv-mpo.nttest.microsoft.com
  190. 2000-11-20 12:25:16 [Options.Wizard] reporting
  191. 2000-11-20 12:25:16 [PlugIn] <Empty>
  192. 2000-11-20 12:25:16 [PlugIn.0] None
  193. 2000-11-20 12:25:16 [Reports] <Empty>
  194. 2000-11-20 12:25:16 [Reports.AccountReferences] Yes
  195. 2000-11-20 12:25:16 [Reports.AccountReferences.TimeGenerated] 974751916
  196. 2000-11-20 12:25:16 [Reports.Directory] E:\Program Files\Active Directory Migration Tool\Reports
  197. 2000-11-20 12:25:16 [Reports.ExpiredComputers] No
  198. 2000-11-20 12:25:16 [Reports.Generate] Yes
  199. 2000-11-20 12:25:16 [Reports.MigratedAccounts] No
  200. 2000-11-20 12:25:16 [Reports.MigratedComputers] No
  201. 2000-11-20 12:25:16 [Reports.NameConflicts] No
  202. 2000-11-20 12:25:16 [Security] <Empty>
  203. 2000-11-20 12:25:16 [Security.TranslateContainers]
  204. 2000-11-20 12:25:16 [Servers] <Empty>
  205. 2000-11-20 12:25:16 [Servers.0] \\HAY-BUV3-DC1
  206. 2000-11-20 12:25:16 [Servers.0.MigrateOnly] No
  207. 2000-11-20 12:25:16 [Servers.1] \\HB-RES-MEM
  208. 2000-11-20 12:25:16 [Servers.1.MigrateOnly] No
  209. 2000-11-20 12:25:16 [Servers.NumItems] 2
  210. Account Name Conflict
  211. 2000-11-20 12:40:05 VarSet
  212. 2000-11-20 12:40:05 Case Sensitive: Yes, Indexed: Yes
  213. 2000-11-20 12:40:05 User Data ( 25 ) items
  214. 2000-11-20 12:40:05 [] <Empty>
  215. 2000-11-20 12:40:05 [GatherInformation] Yes
  216. 2000-11-20 12:40:05 [Options] <Empty>
  217. 2000-11-20 12:40:05 [Options.AppendToLogs] Yes
  218. 2000-11-20 12:40:05 [Options.DispatchLog] E:\Program Files\Active Directory Migration Tool\Logs\dispatch.log
  219. 2000-11-20 12:40:05 [Options.IsIntraforest] No
  220. 2000-11-20 12:40:05 [Options.Logfile] E:\Program Files\Active Directory Migration Tool\Logs\Migration.log
  221. 2000-11-20 12:40:05 [Options.MaxThreads] 20
  222. 2000-11-20 12:40:05 [Options.SourceDomain] HAY-BUV
  223. 2000-11-20 12:40:05 [Options.SourceDomainDns] hay-buv.nttest.microsoft.com
  224. 2000-11-20 12:40:05 [Options.TargetDomain] HAY-BUV-MPO
  225. 2000-11-20 12:40:05 [Options.TargetDomainDns] hay-buv-mpo.nttest.microsoft.com
  226. 2000-11-20 12:40:05 [Options.Wizard] reporting
  227. 2000-11-20 12:40:05 [PlugIn] <Empty>
  228. 2000-11-20 12:40:05 [PlugIn.0] None
  229. 2000-11-20 12:40:05 [Reports] <Empty>
  230. 2000-11-20 12:40:05 [Reports.AccountReferences] No
  231. 2000-11-20 12:40:05 [Reports.Directory] E:\Program Files\Active Directory Migration Tool\Reports
  232. 2000-11-20 12:40:05 [Reports.ExpiredComputers] No
  233. 2000-11-20 12:40:05 [Reports.Generate] Yes
  234. 2000-11-20 12:40:05 [Reports.MigratedAccounts] No
  235. 2000-11-20 12:40:05 [Reports.MigratedComputers] No
  236. 2000-11-20 12:40:05 [Reports.NameConflicts] Yes
  237. 2000-11-20 12:40:05 [Reports.NameConflicts.TimeGenerated] 974752805
  238. 2000-11-20 12:40:05 [Security] <Empty>
  239. 2000-11-20 12:40:05 [Security.TranslateContainers]
  240. */