Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

250 lines
3.3 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. BOOL
  69. CheckOSVersion(
  70. VOID
  71. );
  72. //
  73. // from spapip.h
  74. //
  75. BOOL
  76. pSetupIsUserAdmin(
  77. VOID
  78. );
  79. BOOL
  80. pSetupDoesUserHavePrivilege(
  81. PCTSTR
  82. );
  83. BOOL
  84. EnablePrivilege(
  85. IN PCTSTR,
  86. IN BOOL
  87. );
  88. VOID
  89. BuildMassStorageSection(
  90. IN BOOL
  91. );
  92. DWORD
  93. ReArm(
  94. VOID
  95. );
  96. BOOL
  97. AdjustRegistry(
  98. IN BOOL RemoveNetworkSettings
  99. );
  100. BOOL
  101. AdjustFiles(
  102. VOID
  103. );
  104. BOOL
  105. PopulateDeviceDatabase(
  106. OUT BOOL*
  107. );
  108. BOOL
  109. CleanDeviceDatabase(
  110. VOID
  111. );
  112. BOOL
  113. BackupHives(
  114. VOID
  115. );
  116. VOID
  117. FreeSysprepContext(
  118. IN PVOID SysprepContext
  119. );
  120. PVOID
  121. InitSysprepQueueCallback(
  122. VOID
  123. );
  124. UINT
  125. SysprepQueueCallback(
  126. IN PVOID Context,
  127. IN UINT Notification,
  128. IN UINT_PTR Param1,
  129. IN UINT_PTR Param2
  130. );
  131. BOOL
  132. ValidateAndChecksumFile(
  133. IN PCTSTR Filename,
  134. OUT PBOOLEAN IsNtImage,
  135. OUT PULONG Checksum,
  136. OUT PBOOLEAN Valid
  137. );
  138. VOID
  139. LogRepairInfo(
  140. IN PWSTR Source,
  141. IN PWSTR Target,
  142. IN PWSTR DirectoryOnSourceDevice,
  143. IN PWSTR DiskDescription,
  144. IN PWSTR DiskTag
  145. );
  146. BOOL
  147. ChangeBootTimeout(
  148. IN UINT
  149. );
  150. VOID
  151. DisableSR(
  152. VOID
  153. );
  154. VOID
  155. EnableSR(
  156. VOID
  157. );
  158. BOOL
  159. LocateWinBOM
  160. (
  161. LPTSTR lpFileName
  162. );
  163. BOOL PrepForSidGen
  164. (
  165. void
  166. );
  167. VOID
  168. NukeEventLogs(
  169. VOID
  170. );
  171. BOOL SetCloneTag
  172. (
  173. void
  174. );
  175. BOOL SetupFirstRunApp
  176. (
  177. void
  178. );
  179. BOOL SetOEMDuplicatorString
  180. (
  181. LPTSTR lpszSysprepINFPath
  182. );
  183. BOOL SetBigLbaSupport
  184. (
  185. LPTSTR lpszSysprepINFPath
  186. );
  187. BOOL RemoveTapiSettings
  188. (
  189. LPTSTR lpszSysprepINFPath
  190. );
  191. BOOL IsPnPDriver
  192. (
  193. IN LPTSTR ServiceName
  194. );
  195. LPTSTR OPKAddPathN
  196. (
  197. LPTSTR lpPath,
  198. LPCTSTR lpName,
  199. DWORD cbPath
  200. );
  201. #endif // _SYSPREP_H