1. Location and status Special command line procedures are not specifically stored in a Command directory, but in the warehouse of 32-bit system files, the SYSTEM32 subdirectories in thewin 2000 installation directory, so you can know that the win2000 command line command has been It is no longer the system's "little" but is called "正房", and by viewing the System32 / DLLCache directory, Win2000 also includes the protected system files, once the command line in the System32 directory The command is damaged, and the backup in the DLLCache directory is recovered immediately; of course, since the win2000 is a spiotic WinNT, the command line call is not a Command.com of the Win9 X era, but is similar to the cmd.exe under NT. 2. Some commands can only perform the system file scanner Sfc.exe in Win9x directly through the command line is a Windows-style dialog interface, and this command in Win2000 must be manually entered on the command line status. Run as required, while running is a standard graphical interface (Figure 1). 3. The use of the command line window is different from before, and the paste operation is different. In the window state, there is no longer like a Win9X's DOS window, so many people find that they cannot be copied in the Win2000's command line window, in fact, the win2000 command line window is the selected selection of the content of the network. , Copy, paste, etc., but the command is hidden. The direct operation of the window content can only be selected, ie, press the left mouse button to drag the content, if the Ctrl c command is pressed again, you cannot copy the selected content to the clipboard, but must be on the window. On the title bar, click the right mouse button, then select Edit, you will see the menu for the operation commands such as copying, paste (Figure 2). 2 You can browse the content displayed in each step of the screen. This is not line in full screen, you must use the Alt Enter key to switch to window status, then a scroll bar appears on the right side of the window, drag the scroll bar, you can navigate before and after, but if the display result is too More, the content that exceeds the memory buffer is automatically discarded according to FIFO (First In First Out, advanced first out) principles, and the screen and buffer can be cleared at the same time after using the CLS command. 4. Add a large number of shortcut and powerful class Doskey feature Win2000 command line, passing the DOSKEY.EXE command in memory via MEM / C, but does have a very powerful similar tradition Doskey's features, such as: Pageup, Pagedown: Recall the nearest two command ↑ ↓: Re-call the command in the history command; ← →: Move the cursor in the command line, edit the command line that has entered Insert: Switch the insertion and rewrite status of the command line editor; Home, End: quickly move the cursor to the beginning or end of the command line; delete: Delete the characters behind the cursor; Enter: Copy the selected content in the window (with it replaces Ctrl C Command); F7: Display History Command List, can easily select the command used in the list; F9: Enter the command number function, directly enter the number of the history command to use the command directly. Others define different functions from F1 to F9 keys, and they will beware of the specific operation.
5. Direct support for the system-mounted code table input method to display and enter Chinese characters under the Win9x DOS command prompt, you must start the Chinese input method, such as PDOS95 or UCDOS, etc., in Win2000 CMD. The exe command can be displayed directly to the Chinese character, and can directly call the various code table input methods installed in the system according to the fully identical hotkey of the graphical interface, such as the Ctrl Shift switching method, CTRL SPACE switching input method switch, SHIFT SPACE switches the full corner and half-angle state, Ctrl . Switch in English punctuation, etc. It's a role, this can't be said to be a big regret! 6. Add a number of internal commands Color: Set the default console foreground and background color. We don't have to envy other operating systems rich console color setting commands! Usage: Color [attr] where attr is specified by two hexadecimal numbers to specify the color attribute of the specified console - the first as the background, the second is the foreground. Each number can be one of the following: If no parameters given, the command restoring the color to the color of cmd.exe startup. This value comes from the current console window, / t command line command option or defaultcolor registry value. If you use the same foreground and background color, the color command will set ErrorLevel to 1 with the color command. For example, "Color FC" produces bright red on the bright white, try to enter a "color 02", haha ... Your screen display turns into a black bottom, no longer a constant black body. Pushd: Save the current directory for use, and then change to the specified directory. Usage: pushd [path | ..] Where PATH is a directory that you want to be the current directory. If the command extension is enabled, in addition to the general drive letter and path, the pushd command also accepts the network path. If the network path is specified, Pushd will create a temporary drive letter to specify the network resource, and then change the current drive and directory with the active drive letter. You can assign a temporary drive from Z: to the next, use the first unused drive letter. Popd: Command Options to the directory saved in the pushd command. If the command extension is enabled, the POPD command deletes the temporary drive letter created by PushD from the Push Popd drive. SetLocal: Start the localization of environmental changes in the batch file. The environmental modification made after SetLocal is limited to batch files. To restore the original setting, you must perform endlocal. When reaching the end of the batch file, a setlocal command for each batch file has not been executed, there will be an implicit endlocal executed. Assoc: Displayed or modified file extension association usage: assoc [.ext [= [filety]]] Where .ext Specifies the file extension associated with the file type, fileType specifies the file type associated with the file extension. Type ASSOC without parameters, display the current file association. If only the file extension is called, the current file association of that file extension is displayed. If no parameters are specified for the file type, the command deletes the association of the file extension. For example: assoc .pl = perlscript ftype perlscript = perl.exe% 1% * Allows you to enable the following Perl scripts: Script.pl 1 2 3 If you do not want to type the extension, type the following string: set pathext = .pl;% PATHEXT % The started script is as follows: Script 1 2 3
7.cmd.exe more complex, powerful command line parameters cmd.exe has many command line parameters, the specific conditions are as follows: CMD [/ a | / u] [/ q] [/ d] [/ E: on | / E : OFF] [/ f: ON | / F: OFF] [/ v: on | / v: OFF] [[/ s] [/ c | / k] String] / c Execute the command specified by the string and then interrupt; / K execute the command specified by the string but retained; / s modifies the string processing after / c or / k; / q Close the response; / D Deactivate the executun command from the registry; / a makes the internal pipe or file The output of commands becomes ansi; / u makes the output of the internal pipe or file command become Unicode / T: FG Setting the foreground / background color (see Color /?); / E: ON Enable command extension; / E: Off Disable Command Extensions; / F: ON Enables File and Directory Name Complete Character; / F: OFF Disable File and Directory Name Complete Character; / V: ON to initiate C to delay the environment variable extension as a delimiter. / V: OFF deactivation delay environment extension. Note that if the string has quotation marks, multiple commands separated by command separator "&&" can be accepted. Also, since the compatibility cause, / x and / E: ON are the same, / y is the same as / e: OFF, and /r is the same as / c. Ignore any other command options. If you specify / c or / k, the rest of the command line will be processed as a command line, in which case the following logic processing quotation marks ("): (1) If all the following conditions are met, then The quotation characters on the command line will be retained: without / s command option; full two quotes characters; there is no special characters between the two quotes characters, special characters are one of the following: <> () @ ^ | There is at least one blank character between the two quotes characters; there is at least one executable name between the two quotes characters. (2) Otherwise, the old way is to see if the first character is a quoter character, If it is, let's go, remove the last quotation mark character on the command line, keep the last quotation number character. If / D is not specified on the command line, it will look for the following when cmd.exe starts REG_SZ / REG_EXPAND_SZ registry variables. If one or both are present, these two variables will first be executed. HKEY_LOCAL_MACHINE / Software / Microsoft / command Processor / AutoRun and HKEY_CURRENT_USER / Software / Microsoft / command Processor / AutoRun command extensions by default The value is enabled. You can also use / E: OFF to deactivate an extension for a particular call. You can enable or deactivate all CMD.exe all calls to extensions on a user login session, which is used to use regedit32. exe registry REG_DWORD one or two values: HKEY_LOCAL_MACHINE / Software / Microsoft / Command Processor / EnableExtensions and HKEY_CURRENT_USER / Software / Microsoft / Command Processor / EnableExtensions to 0x 0. 0x1 or user specific settings than the machine setting. The command line command option is priority than the registry. Command line extensions include changes made to the following commands: Del or ERASE, Color, CD or ChDIR, MD, POPD, SET, SETLOCAL, End Local, IF, FOR, CALL, SHIFT, GOTO, and START (including changes made to external command calls), as soc, ftype. For more information, type "Help Command Name". Delay Variable Environment Expansion does not press The default is enabled.
You can use the / V: ON or / V: OFF command option to enable or deactivate delay environment variable expansion for a certain call for cmd.exe. You can enable or deactivate CMD on the machine or login session. EXE All calls are completed, this is to set one or two registry in the registry of regedit32.exe: HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Command Processor / DelayedExpansion and HKEY_CURRENT_USER / SOFTWARE / Microsoft / Command Processor / DelayedExpansion to 0x1 or 0x 0. User-specific settings are prioritized than the machine settings. The command line command option is prioritized than the registry settings. If the delay environment variable expansion is enabled, the exclamation mark character can be used instead of a value of an environment variable at execution time. Files and directory names are not enabled by default. You can use the / f: on or / f: off command option to enable or deactivate the file name for a certain call for cmd.exe. You can enable or deactivate all CMD.exe's completion on the machine or user login session, which is to use the registry of the registry using regedit32.exe, one or two reg_dword values in the registry: HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Command Processor / CompletionChar HKEY_LOCAL_MACHINE / Software / Microsoft / Command Processor / PathCompletionChar and HKEY_CURRENT_USER / Software / Microsoft / Command Processor / CompletionChar HKEY_CURRENT_USER / Software / Microsoft / Command Processor / PathCompletionChar hexadecimal value of a control character as a particular parameter (e.g., 0x4 is Ctrl-D, 0x6 is Ctrl-f). User-specific settings are preferred over the machine settings. The command line command option takes precedence over the registry settings. If the completion is enabled with / f: ON command option, the control character to use is: Directory name completes with Ctrl-D, file name completes Ctrl-f. To deactivate a character in the registry, use the value of the space (0x20) because this character is not a control character. If you type one of two control characters, it is complete to be called. The completion function takes the path character to the left side of the cursor. If there is no wildcard, attach the wildcard to the left and establish a logged path list. Then, the path of the first inquiry is displayed. If there is no way to match the path, you don't affect the display. Thereafter, repeat the list of matching paths in accordance with a control character. Press the Shift key to control the characters simultaneously and will catch a list. If you have any edit on the line, press the control character again, the list of saved matching paths will be discarded, and the new will be generated. If the command option is completed between the file and the directory name, the same phenomenon occurs. The only area between the two control characters is that the file completes the character in line with the file and directory name, and the directory completed characters only in accordance with the directory name. If the file is completed for built-in directory commands (CD, MD or RD), the directory is complete. The quotation marks enclose the cross-enclosure, and the completion code can correctly handle the file name containing spaces or other special characters. At the same time, if the backup is completed, then the file is called to be called is the word in the right side of the cursor.