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.

245 lines
3.5 KiB

  1. #ifndef _SYSPREP_H
  2. #define _SYSPREP_H
  3. #include <cfgmgr32.h>
  4. #include <setupapi.h>
  5. // ============================================================================
  6. // USEFUL STRINGS
  7. // ============================================================================
  8. #define SYSCLONE_PART2 "setupcl.exe"
  9. #define IDS_ADMINISTRATOR 1
  10. // ============================================================================
  11. // USEFUL CONSTANTS
  12. // ============================================================================
  13. #define SETUPTYPE 1 // from winlogon\setup.h
  14. #define SETUPTYPE_NOREBOOT 2
  15. #define REGISTRY_QUOTA_BUMP (10* (1024 * 1024))
  16. #define DEFAULT_REGISTRY_QUOTA (32 * (1024 * 1024))
  17. #define SFC_DISABLE_NOPOPUPS 4 // from sfc.h
  18. #define FILE_SRCLIENT_DLL L"SRCLIENT.DLL"
  19. #ifdef ARRAYSIZE
  20. #undef ARRAYSIZE
  21. #endif // ARRAYSIZE
  22. #define ARRAYSIZE(a) ( sizeof(a) / sizeof(a[0]) )
  23. #ifdef AS
  24. #undef AS
  25. #endif // AS
  26. #define AS(a) ARRAYSIZE(a)
  27. // ============================================================================
  28. // FUNCTION DECLARATIONS
  29. // ============================================================================
  30. BOOL
  31. IsDomainMember(
  32. VOID
  33. );
  34. BOOL
  35. ResetRegistryKey(
  36. IN HKEY Rootkey,
  37. IN PCWSTR Subkey,
  38. IN PCWSTR Delkey
  39. );
  40. BOOL
  41. DeleteWinlogonDefaults(
  42. VOID
  43. );
  44. VOID
  45. FixDevicePaths(
  46. VOID
  47. );
  48. BOOL
  49. NukeUserSettings(
  50. VOID
  51. );
  52. BOOL
  53. NukeMruList(
  54. VOID
  55. );
  56. BOOL
  57. RemoveNetworkSettings(
  58. LPTSTR lpszSysprepINFPath
  59. );
  60. VOID
  61. RunExternalUniqueness(
  62. VOID
  63. );
  64. BOOL
  65. IsSetupClPresent(
  66. VOID
  67. );
  68. //
  69. // from spapip.h
  70. //
  71. BOOL
  72. pSetupIsUserAdmin(
  73. VOID
  74. );
  75. BOOL
  76. pSetupDoesUserHavePrivilege(
  77. PCTSTR
  78. );
  79. BOOL
  80. EnablePrivilege(
  81. IN PCTSTR,
  82. IN BOOL
  83. );
  84. VOID
  85. BuildMassStorageSection(
  86. IN BOOL
  87. );
  88. DWORD
  89. ReArm(
  90. VOID
  91. );
  92. BOOL
  93. AdjustRegistry(
  94. IN BOOL RemoveNetworkSettings
  95. );
  96. BOOL
  97. AdjustFiles(
  98. VOID
  99. );
  100. BOOL
  101. PopulateDeviceDatabase(
  102. OUT BOOL*
  103. );
  104. BOOL
  105. CleanDeviceDatabase(
  106. VOID
  107. );
  108. BOOL
  109. BackupHives(
  110. VOID
  111. );
  112. VOID
  113. FreeSysprepContext(
  114. IN PVOID SysprepContext
  115. );
  116. PVOID
  117. InitSysprepQueueCallback(
  118. VOID
  119. );
  120. UINT
  121. SysprepQueueCallback(
  122. IN PVOID Context,
  123. IN UINT Notification,
  124. IN UINT_PTR Param1,
  125. IN UINT_PTR Param2
  126. );
  127. BOOL
  128. ValidateAndChecksumFile(
  129. IN PCTSTR Filename,
  130. OUT PBOOLEAN IsNtImage,
  131. OUT PULONG Checksum,
  132. OUT PBOOLEAN Valid
  133. );
  134. VOID
  135. LogRepairInfo(
  136. IN PWSTR Source,
  137. IN PWSTR Target,
  138. IN PWSTR DirectoryOnSourceDevice,
  139. IN PWSTR DiskDescription,
  140. IN PWSTR DiskTag
  141. );
  142. BOOL
  143. ChangeBootTimeout(
  144. IN UINT
  145. );
  146. VOID
  147. DisableSR(
  148. VOID
  149. );
  150. VOID
  151. EnableSR(
  152. VOID
  153. );
  154. BOOL
  155. LocateWinBOM
  156. (
  157. LPTSTR lpFileName
  158. );
  159. BOOL PrepForSidGen
  160. (
  161. void
  162. );
  163. VOID
  164. NukeEventLogs(
  165. VOID
  166. );
  167. BOOL SetCloneTag
  168. (
  169. void
  170. );
  171. BOOL SetupFirstRunApp
  172. (
  173. void
  174. );
  175. BOOL SetOEMDuplicatorString
  176. (
  177. LPTSTR lpszSysprepINFPath
  178. );
  179. BOOL SetBigLbaSupport
  180. (
  181. LPTSTR lpszSysprepINFPath
  182. );
  183. BOOL RemoveTapiSettings
  184. (
  185. LPTSTR lpszSysprepINFPath
  186. );
  187. BOOL IsPnPDriver
  188. (
  189. IN LPTSTR ServiceName
  190. );
  191. LPTSTR OPKAddPathN
  192. (
  193. LPTSTR lpPath,
  194. LPCTSTR lpName,
  195. DWORD cbPath
  196. );
  197. #endif // _SYSPREP_H