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.

390 lines
20 KiB

  1. #include <windows.h>
  2. #include "uilstf.h"
  3. #include "gauge.h"
  4. #include "_shell.h"
  5. #include "rc_ids.h"
  6. /*-----------------------------
  7. DEFINE ICON RESOURCES
  8. -----------------------------*/
  9. asetup ICON MOVEABLE PRELOAD RESOURCE\setup.ico
  10. tutor ICON MOVEABLE PRELOAD RESOURCE\tutor.ico
  11. disk ICON MOVEABLE PRELOAD RESOURCE\disks04.ico
  12. harddrive ICON MOVEABLE PRELOAD RESOURCE\drive01.ico
  13. bang ICON MOVEABLE PRELOAD RESOURCE\bang.ico
  14. ques ICON MOVEABLE PRELOAD RESOURCE\ques.ico
  15. IDB_BACKGROUND BITMAP RESOURCE\backgrou.bmp
  16. /*-----------------------------
  17. DEFINE MENU RESOURCES
  18. ---------------------------*/
  19. ID_MAINTAIN MENU
  20. BEGIN
  21. POPUP "&Options"
  22. BEGIN
  23. MENUITEM "&Change Mouse or Keyboard...", MENU_CHANGE
  24. MENUITEM SEPARATOR
  25. MENUITEM "E&xit", MENU_EXIT
  26. END
  27. POPUP "&Help"
  28. BEGIN
  29. MENUITEM "&Contents", MENU_HELPINDEX
  30. MENUITEM "&Search for Help On...", MENU_HELPSEARCH
  31. MENUITEM "&How to Use Help", MENU_HELPONHELP
  32. MENUITEM SEPARATOR
  33. MENUITEM "&About Setup...", MENU_ABOUT
  34. END
  35. END
  36. /*----------------------------
  37. DEFINE DIALOG RESOURCES
  38. -----------------------------*/
  39. #include "resource\ui.dlg"
  40. #include "resource\netui.dlg"
  41. #include "resource\gauge.dlg"
  42. IDI_STF_ICON ICON RESOURCE\SETUP.ICO
  43. sreboot BITMAP RESOURCE\REBOOT.bmp
  44. swin BITMAP RESOURCE\resrtwin.bmp
  45. 301 BITMAP ev.bmp
  46. 302 BITMAP fm.bmp
  47. 303 BITMAP fp.bmp
  48. 304 BITMAP ms.bmp
  49. 305 BITMAP reg.bmp
  50. 306 BITMAP pm.bmp
  51. 307 BITMAP ras.bmp
  52. 308 BITMAP rasmac.bmp
  53. 309 BITMAP sm.bmp
  54. 310 BITMAP mum.bmp
  55. 311 BITMAP um.bmp
  56. 312 BITMAP regs.bmp
  57. STRINGTABLE LOADONCALL MOVEABLE DISCARDABLE
  58. {
  59. IDS_NULL, ""
  60. IDS_USAGE_TITLE, "Usage"
  61. IDS_USAGE_MSG1, "Microsoft Setup\n\n"
  62. IDS_USAGE_MSG2, "SETUP\t[/?] [/f] [/i <INF Src File>]\n\t[/c <Script Section>] [/s <Src Path>]\n\t[/t <Var> = <Value>] [/v]\n\n"
  63. IDS_USAGE_USAGE, "/? -- generates this Usage message.\n"
  64. IDS_USAGE_F, "/f -- turns off blue background.\n"
  65. IDS_USAGE_I, "/i -- defaults to Current Working Directory + 'SETUP.INF'.\n"
  66. IDS_USAGE_C, "/c -- defaults to 'Shell Commands'.\n"
  67. IDS_USAGE_S, "/s -- defaults to Current Working Directory.\n"
  68. IDS_USAGE_T, "/t -- set INF <var> to <value>. multiple /T valid.\n"
  69. IDS_USAGE_V, "/v -- turn on INF syntax checking.\n"
  70. IDS_APP_TITLE "Setup"
  71. IDS_MAINTOBS_MSG1 "Please go to the Control Panel to install and configure system components."
  72. IDS_REPAIR_BOOTCODE_MSG "The Emergency Repair Disk is not startable.\r\n\r\nRepairing a damaged Windows installation is an option\r\navailable at the beginning of Windows 2000 Setup.\r\nTo start Setup, insert the Windows 2000 Setup Disk into drive A:.
  73. \r\n\r\nPress control+alt+delete to restart your computer."
  74. IDS_ERROR, "Setup Message"
  75. IDS_INTERNAL_ERROR, "Internal Setup Message"
  76. IDS_BAD_SHL_SCRIPT_SECT, "Unable to find the Setup Script. Check the /c switch on the Setup command line."
  77. IDS_BAD_INF_SRC, "Unable to find the .INF Source File. Check the /i switch on the Setup command line."
  78. IDS_BAD_SRC_PATH, "The source path specified in the Setup command is invalid. Check the /s switch."
  79. IDS_EXE_PATH_LONG, "The full path for the executable is too long"
  80. IDS_GET_MOD_FAIL, "GetModuleFileName did not return a full path."
  81. IDS_CANT_FIND_SHL_SECT, "Unable to find the Setup Script Section in the INF file."
  82. IDS_REGISTER_CLASS, "Another instance of Setup may already be running"
  83. IDS_CREATE_WINDOW, "Unable to create the Setup Window."
  84. IDS_UPDATE_INF, "Setup is unable to update a .INF file"
  85. IDS_UI_CMD_ERROR, "Badly formed Setup UI Script Command."
  86. IDS_SHELL_CMDS_SECT, "Shell Commands"
  87. IDS_SHL_CMD_ERROR, "Badly formed Setup Script Command"
  88. IDS_NEED_EXIT, "Setup Script must end with an EXIT command"
  89. IDS_INF_SECT_REF, "A non-existent section was referenced in a Setup Script command in section: "
  90. IDS_CD_BLANKNAME, "A name is required."
  91. IDS_CD_BLANKORG, "A company name is required."
  92. IDS_WARNING, "WARNING"
  93. IDS_MESSAGE, " - Message"
  94. IDS_CANT_END_SESSION, "Please exit the Program normally rather\nthan trying to end the session\nthrough the Program Manager."
  95. IDS_GAUGE_TEXT_1, "Copying:"
  96. IDS_GAUGE_TEXT_2, "To:"
  97. IDS_INS_DISK, "Please insert the disk labeled:\n'"
  98. IDS_INTO, "'\ninto "
  99. IDS_BAD_CMDLINE, "Could not verify the INF file.\nThe command line is faulty."
  100. IDS_CANCEL, "---Cancel---"
  101. IDS_PROGRESS, "Progress"
  102. IDS_NOTDONE, "The software is not correctly installed. Are you sure you want to exit Setup?"
  103. IDS_SURECANCEL, "This will end file copying. Are you sure you want to cancel?"
  104. IDS_WINDOWS_NT_SETUP, "Windows 2000 Setup"
  105. // error messages
  106. IDS_ERROR_DIALOGCAPTION, "Setup Message"
  107. IDS_ERROR_OOM, "More memory needed to complete Setup.\n\nTry shutting down some other active programs."
  108. IDS_ERROR_OPENFILE, "Unable to open the file %s."
  109. IDS_ERROR_OPENSAMEFILE, "The source and destination of the file: '%s' are the same. Please choose Ignore to skip copying this file."
  110. IDS_ERROR_CREATEFILE, "Unable to create the file %s."
  111. IDS_ERROR_READFILE, "Unable to read from the file %s."
  112. IDS_ERROR_WRITEFILE, "Unable to write to the file %s."
  113. IDS_ERROR_CLOSEFILE, "Unable to close the file %s."
  114. IDS_ERROR_VERIFYFILE, "The file %s was not copied correctly or is not a valid Windows image."
  115. IDS_ERROR_REMOVEFILE, "Unable to remove the file %s."
  116. IDS_ERROR_RENAMEFILE, "Unable to rename the file %s to %s."
  117. IDS_ERROR_READDISK, "Unable to read from disk drive %s."
  118. IDS_ERROR_CREATEDIR, "Unable to create the directory %s."
  119. IDS_ERROR_REMOVEDIR, "Unable to remove the directory %s."
  120. IDS_ERROR_CHANGEDIR, "Unable to change to the directory %s."
  121. IDS_ERROR_GENERALINF, "General INF file error in file %s."
  122. IDS_ERROR_INFBADSECTION, "Invalid section name in .INF file %s."
  123. IDS_ERROR_INFBADLINE, "A list variable in the .INF file %s is not terminated."
  124. IDS_ERROR_INFXKEYS, "There are too many keys\nin INF file '%s'."
  125. IDS_ERROR_INFSMDSECT, "The setup .INF file %s has a missing or invalid [Source Media Descriptions] section."
  126. IDS_ERROR_WRITEINF, "Unable to write new INF file %s."
  127. IDS_ERROR_INVALIDPOER, "Invalid options in a file description line in a .INF file."
  128. IDS_ERROR_INFMISSINGLINE, "The INF %s is missing a referenced file description line in section [%s].\n\nCheck for missing lines."
  129. IDS_ERROR_INFBADFDLINE, "The INF %s has a invalid file description line in section [%s]."
  130. IDS_ERROR_INFMISSINGSECT, "The INF %s is missing the referenced file description section [%s].\n\nCheck for missing lines."
  131. IDS_ERROR_INFBADRSLINE, "The INF file contains an invalid read-syms script command."
  132. IDS_ERROR_LOADLIBRARY, "Unable to load library file %s."
  133. IDS_ERROR_BADLIBENTRY, "Invalid library procedure: %s."
  134. IDS_ERROR_INVOKEAPPLET, "Unable to invoke the control panel option: %s"
  135. IDS_ERROR_EXTERNALERROR, "External library procedure %s reported the following error: %s"
  136. IDS_ERROR_SPAWN, "Unable to invoke the external program: %s"
  137. IDS_ERROR_DISKFULL, "The destination disk is full."
  138. // end of error messages
  139. IDS_SETUP_WARNING "Setup Warning"
  140. IDS_BAD_LIB_HANDLE "Invalid library handle: %s"
  141. IDS_INSTRUCTIONS, "Instructions"
  142. IDS_EXITCAP, "Exit Windows 2000 Setup"
  143. IDS_ERROR_INVALIDPATH, "Invalid path created by combining %s and %s."
  144. IDS_ERROR_WRITEINIVALUE, "Unable to write a line to INI file\nFile: %s\nSection: %s\nKey: %s"
  145. IDS_ERROR_REPLACEINIVALUE, "Unable to replace line in INI file\nFile: %s\nSection: %s\nKey: %s"
  146. IDS_ERROR_INIVALUETOOLONG, "String is too long to write to INI file."
  147. IDS_ERROR_DDEINIT, "Unable to initiate DDE communication with the Program Manager."
  148. IDS_ERROR_DDEEXEC, "Unable to execute DDE command '%s' in Program Manager."
  149. IDS_ERROR_BADWINEXEFILEFORMAT, "File %s is not a Windows Executable file. It may be corrupted."
  150. IDS_ERROR_RESOURCETOOLONG, "Unable to write a new resource in %s because the old resource was shorter."
  151. IDS_ERROR_MISSINGSYSINISECTION, "Unable to find section %s in .INI file %s."
  152. IDS_ERROR_DECOMPGENERIC, "A general error occurred while trying to decompress the file %s."
  153. IDS_ERROR_DECOMPUNKNOWNALG, "File %s was compressed with an algorithm unknown to Windows 2000 Setup. It cannot be decompressed."
  154. IDS_ERROR_MISSINGRESOURCE, "Unable to find the referenced resource in %s."
  155. IDS_ERROR_DDEADDITEM, "Unable to add item %s to the program group %s."
  156. IDS_ERROR_DDEREMOVEITEM, "Unable to remove item %s in the program group %s."
  157. IDS_ERROR_RUNTIMEPARSE, "The INF %s has an invalid construct in the line:\n\n'%s'"
  158. IDS_INSERTDISKETTE "Insert Disk"
  159. IDS_ALLDATAWILLBELOST "Warning: Setup will erase data currently on the floppy disk."
  160. IDS_FIRSTREPAIRDISKPROMPT, "Label a floppy disk 'Emergency Repair Disk' and insert it into drive %c. Setup will save system information on this disk, which can be used in the future to repair Windows NT. Click OK when the disk is in the drive.\n\n%s"
  161. IDS_SECONDREPAIRDISKPROMPT,"The Setup disk may not be used as the Emergency Repair Disk. Insert a different disk into drive %c and click OK.\n\n%s"
  162. IDS_FORMATTINGDISK, "Formatting Disk"
  163. IDS_FORMATGENERALFAILURE, "Setup was unable to format the disk."
  164. IDS_CANTDETERMINEFLOPTYPE, "Setup is unable to get configuration information for the selected floppy disk drive."
  165. IDS_BADFLOPPYTYPE, "The selected floppy drive is unable to support the required media type."
  166. IDS_FLOPPYWRITEPROT, "The floppy cannot be written to because it is write-protected."
  167. IDS_FLOPPYIOERR, "An error occurred reading from or writing to the disk.\n\nThe disk is unusable."
  168. IDS_FLOPPYUNKERR, "An unknown error has occurred reading from or writing to the disk.\n\nThe disk is possibly unusable."
  169. IDS_RETRYFORMATREPAIRDISK, "Setup was unable to create the Emergency Repair Disk from the disk you provided because the disk could not be formatted.\n\nInsert a new disk into drive %c: and click Retry."
  170. IDS_CANTINITFLOPPYSUP, "Setup was unable to load required floppy disk operation support."
  171. IDS_ERROR_GETVOLINFO, "Setup was unable to get the volume information for %s. Setup won't be able to preserve the security of %s.\n\n"
  172. IDS_ERROR_GETFILESECURITY, "Setup was unable to get the security information for %s. Setup won't be able to preserve the security on the file.\n\n"
  173. IDS_ERROR_SETFILESECURITY, "Setup was unable to set the security information for %s.\n\n"
  174. IDS_ERROR_FILENOTFOUND ,"File not found in root directory"
  175. IDS_ERROR_INVALIDNAME ,"Invalid filename passed to setup support library"
  176. IDS_ERROR_DLLOOM ,"Setup is out of memory, cannot continue."
  177. IDS_ERROR_INVALIDDISK ,"Invalid device name or path specified."
  178. IDS_ERROR_OPENFAIL ,"Unable to open a file."
  179. IDS_ERROR_IOCTLFAIL ,"Unable to determine sector size"
  180. IDS_ERROR_COPYFILE ,"Unable to do the specified file copy operation."
  181. IDS_ERROR_READFAILED ,"Unable to read the specified file."
  182. IDS_ERROR_WRITE ,"Unable to write to the specified file."
  183. IDS_ERROR_NOSIZE ,"Could not determine file size"
  184. IDS_ERROR_BADFILE ,"Setup support library could not open a file"
  185. IDS_ERROR_BADARGS ,"Bad arguments passed to a Setup support library routine"
  186. IDS_ERROR_RTLOOM ,"System memory heap allocation error."
  187. IDS_ERROR_OBJDIROPEN ,"Unable to open an object directory."
  188. IDS_ERROR_OBJDIRREAD ,"Unable to read some object directory entries."
  189. IDS_ERROR_SYMLNKOPEN ,"Unable to open the specified symbolic link object."
  190. IDS_ERROR_SYMLNKREAD ,"Unable to query an open symbolic link object."
  191. IDS_ERROR_ENVVARREAD ,"Error reading System Boot Options."
  192. IDS_ERROR_ENVVAROVF ,"Error modifying System Boot Options, Space Overflow"
  193. IDS_ERROR_ENVVARWRITE ,"Error writing System Boot Options"
  194. IDS_ERROR_OBJNAMOVF ,"Setup expanded the full path of a symbolic link and it overflowed the specified buffer."
  195. IDS_ERROR_BADNETNAME ,"Unable to redirect the specified local device over the network because the specified remote resource name was not acceptable to any provider."
  196. IDS_ERROR_BADLOCALNAME ,"Unable to redirect the specified local device over the network because the local device name is invalid."
  197. IDS_ERROR_BADPASSWORD ,"Unable to redirect the specified local device to a remote resource because the specified password is unacceptable to the remote device."
  198. IDS_ERROR_ALREADYCONNECTED,"Unable to redirect the specified local device to a remote resource because the local device is already redirected."
  199. IDS_ERROR_ACCESSDENIED ,"Setup was denied access to a remote resource on the network."
  200. IDS_ERROR_NONETWORK ,"Unable to use the network."
  201. IDS_ERROR_NOTCONNECTED ,"Unable to delete a network connection for the specified local device because it was not redirected over the network."
  202. IDS_ERROR_NETOPENFILES ,"Unable to delete a network connection because files were still open on the remote resource."
  203. IDS_ERROR_OPENPROCESSTOKEN,"Error opening Process Token"
  204. IDS_ERROR_ADJUSTPRIVILEGE,"Error adjusting process privilege"
  205. IDS_ERROR_ADDPRINTER ,"Error adding printer"
  206. IDS_ERROR_ADDPRINTERDRIVER,"Error adding printer driver"
  207. IDS_ERROR_UNSUPPORTEDPRIV,"This privilege is not supported by Setup"
  208. IDS_ERROR_PRIVILEGE ,"Setup does not have the privilege to perform this operation."
  209. IDS_ERROR_REGOPEN ,"Unable to open all the Registry keys that needed to be modified."
  210. IDS_ERROR_REGSAVE ,"Error saving a registry key to a file."
  211. IDS_ERROR_REGRESTORE ,"Error restoring a registry key from a file."
  212. IDS_ERROR_REGSETVALUE ,"Unable to set a Registry key value entry."
  213. IDS_ERROR_SETCOMPUTERNAME,"Unable to set the local computer name."
  214. IDS_BUFFER_OVERFLOW ,"Return Buffer size smaller than Value"
  215. IDS_ERROR_SHUTDOWN ,"Unable to shutdown the system."
  216. IDS_ERROR_SCOPEN ,"Bad or invalid parameters passed to open service controller call"
  217. IDS_ERROR_SCSCREATE ,"Bad or invalid parameters passed to create service call"
  218. IDS_ERROR_SCSCHANGE ,"Bad or invalid parameters passed to change service parameters call"
  219. IDS_ERROR_SCSOPEN ,"Bad or invalid parameters passed to open service call"
  220. IDS_ERROR_SERVDEL ,"The service being modified has been marked for delete."
  221. IDS_ERROR_NO_MEMORY ,"Insufficient memory to perform requested function."
  222. IDS_STRING_UNKNOWN_USER ,"Unknown User #"
  223. IDS_WINNT_SETUP ,"Windows 2000 Setup"
  224. }
  225. CRITERR DIALOG PRELOAD 30, 40, 210, 140
  226. STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  227. CAPTION "Critical Error"
  228. FONT 8, "MS Shell Dlg"
  229. BEGIN
  230. DEFPUSHBUTTON "E&xit Setup", IDC_X, 34, 120, 48, 14
  231. PUSHBUTTON "&Retry", IDC_R, 118, 120, 48, 14
  232. LTEXT "A critical error has occurred.", -1, 10, 8, 190, 8
  233. LTEXT "", IDC_TEXT1, 10, 24, 190, 32
  234. LTEXT "This error prevents Setup from continuing.", -1, 10, 64,
  235. 190, 8
  236. LTEXT "You may either retry the operation or exit Setup,", -1,
  237. 10, 72, 190, 8
  238. LTEXT "however the software is not completely installed.", -1, 10,
  239. 80, 190, 8
  240. LTEXT "If you exit, therefore, you will have to repeat", -1,
  241. 10, 88, 190, 8
  242. LTEXT "the Setup process from the beginning.", -1, 10, 96, 190, 8
  243. END
  244. NONCRITERR DIALOG PRELOAD 30, 40, 210, 148
  245. STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  246. CAPTION "Noncritical Error"
  247. FONT 8, "MS Shell Dlg"
  248. BEGIN
  249. DEFPUSHBUTTON "&Ignore", IDC_C, 14, 128, 48, 14
  250. PUSHBUTTON "&Retry", IDC_R, 76, 128, 48, 14
  251. PUSHBUTTON "E&xit Setup", IDC_X, 138, 128, 48, 14
  252. LTEXT "An error has occurred.", -1, 10, 8, 190, 8
  253. LTEXT "", IDC_TEXT1, 10, 24, 190, 32
  254. LTEXT "You may continue (ignoring the error), retry the", -1,
  255. 10, 64, 190, 8
  256. LTEXT "operation, or exit Setup. If you choose to", -1, 10,
  257. 72, 190, 8
  258. LTEXT "ignore the error, Setup may not be able to", -1, 10, 80,
  259. 190, 8
  260. LTEXT "completely and/or correctly install the software.", -1, 10,
  261. 88, 190, 8
  262. LTEXT "If you exit, you will have to repeat the Setup", -1, 10,
  263. 96, 190, 8
  264. LTEXT "process from the beginning.", -1, 10, 104, 190, 8
  265. END
  266. CRITERR2 DIALOG PRELOAD 30, 40, 210, 140
  267. STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  268. CAPTION "Critical Error"
  269. FONT 8, "MS Shell Dlg"
  270. BEGIN
  271. DEFPUSHBUTTON "E&xit", IDC_X, 34, 120, 48, 14
  272. PUSHBUTTON "&Retry", IDC_R, 118, 120, 48, 14
  273. LTEXT "A critical error has occurred.", -1, 10, 8, 190, 8
  274. LTEXT "", IDC_TEXT1, 10, 24, 190, 32
  275. LTEXT "This error prevents the operation from continuing. You may retry the action. If this fails, or you choose Exit, the operation has not been completed.",
  276. 101, 10, 69, 184, 42
  277. END
  278. NONCRITERR2 DIALOG PRELOAD 30, 40, 210, 148
  279. STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  280. CAPTION "Noncritical Error"
  281. FONT 8, "MS Shell Dlg"
  282. BEGIN
  283. DEFPUSHBUTTON "&Ignore", IDC_C, 14, 128, 48, 14
  284. PUSHBUTTON "&Retry", IDC_R, 76, 128, 48, 14
  285. PUSHBUTTON "E&xit", IDC_X, 138, 128, 48, 14
  286. LTEXT "An error has occurred.", -1, 10, 8, 190, 8
  287. LTEXT "", IDC_TEXT1, 10, 24, 190, 32
  288. LTEXT "A non-critical error has occurred. You may retry the operation, ignore it, or exit the entire Setup operation.",
  289. 201, 7, 65, 189, 37
  290. END
  291. //
  292. // Message text.
  293. //
  294. #include "msg.rc"
  295. //
  296. // Version resource
  297. //
  298. #include <windows.h>
  299. #include <ntverp.h>
  300. /*-----------------------------------------------*/
  301. /* the following lines are specific to this file */
  302. /*-----------------------------------------------*/
  303. /* VER_FILETYPE, VER_FILESUBTYPE, VER_FILEDESCRIPTION_STR
  304. * and VER_INTERNALNAME_STR must be defined before including COMMON.VER
  305. * The strings don't need a '\0', since common.ver has them.
  306. */
  307. #define VER_FILETYPE VFT_DLL
  308. /* possible values:
  309. VFT_UNKNOWN
  310. VFT_APP
  311. VFT_DLL
  312. VFT_DRV
  313. VFT_FONT
  314. VFT_VXD
  315. VFT_STATIC_LIB
  316. */
  317. #define VER_FILESUBTYPE VFT2_UNKNOWN
  318. /* possible values
  319. VFT2_UNKNOWN
  320. VFT2_DRV_PRINTER
  321. VFT2_DRV_KEYBOARD
  322. VFT2_DRV_LANGUAGE
  323. VFT2_DRV_DISPLAY
  324. VFT2_DRV_MOUSE
  325. VFT2_DRV_NETWORK
  326. VFT2_DRV_SYSTEM
  327. VFT2_DRV_INSTALLABLE
  328. VFT2_DRV_SOUND
  329. VFT2_DRV_COMM
  330. */
  331. #define VER_FILEDESCRIPTION_STR "Windows 2000 Setup Dynlink"
  332. #define VER_INTERNALNAME_STR "SETUPDLL.DLL"
  333. #define VER_ORIGINALFILENAME_STR "SETUPDLL.DLL"
  334. #include "common.ver"