Cmd.exe is more complex, powerful command line parameters

xiaoxiao2021-03-06  42

Cmd.exe has a lot of 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] String] / c Execute the command specified by the string and then interrupt; / k execute the command specified by the string but retained; / S Modify string processing after / c or / k; / q Close response; / D Deactivate the execution autorun command from the registry; / A makes the output of the internal pipe or file command into ansi; / u makes the internal pipe or The output of the file command becomes Unicode / T: FG sets the foreground / background color (for more information, see Color /?); / E: ON Enable Command Extension; / E: OFF Disable Command Extension; / F: ON Enable file and The directory name completes the character; / f: OFF deactivate file and directory name Complete character; / V: ON will latency 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, due to compatibility, / 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 0x1 or 0x0 user specific settings than the machine setting command. The 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, START (while including changes made to external commands), as soc, ftype. For more information, type "Help Command Name". Delay variable environment extension does not press by default Value is enabled. You can use / v: on or / v: OFF command option, enable it for a call for cmd.exe Or deactivate the delay environment variable expansion.

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 0x0. 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 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 / CompletionCharHKEY_LOCAL_MACHINE / Software / Microsoft / Command Processor / PathCompletionChar and HKEY_CURRENT_USER / Software / Microsoft / Command Processor / CompletionCharHKEY_CURRENT_USER / Software / Microsoft / Command Processor / PathCompletionChar a hexadecimal value of a control character for a particular function (e.g., 0x4 is Ctrl-d, 0x6 is Ctrl-f), and user-specific settings are preferred for 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 will take the path character to the left side of the cursor, if there is no wildcard, attach the wildcard to the left and establish a list of matching paths. Then, the path of the first match 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 consistent 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 difference between the two control characters is that the file completed characters in accordance 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 done. 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.

转载请注明原文地址:https://www.9cbs.com/read-73086.html

New Post(0)