Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- === Windows CMD.EXE Changes Rev. 7 ===
- Compiled by jcunews. March 2020 - November 2023.
- https://www.reddit.com/u/jcunews1
- https://pastebin.com/u/jcunews
- https://greasyfork.org/en/users/85671-jcunews
- (*) Best viewed using monospace/fixed font with at least 80 columns view.
- Windows NT 3.5 (September 1994): (in comparison with Windows NT 3.1)
- - Added full support for Unicode. Note: Windows NT 3.1 has partial support.
- - Added CMD /A, /U switches.
- - Added CD /D switch.
- - Added DIR /C switch.
- - Added START /SEPARATE, /WAIT switches.
- Windows NT 3.51 (May 1995):
- - Added CMD /X switch for Command Extensions.
- Default setting can be specified in below registry value as DWORD 0x1:
- HKEY_CURRENT_USER\Software\MicroSoft\Command Processor\EnableExtensions
- If Command Extensions is enabled via registry, /X switch disables the Command
- Extensions.
- If Command Extensions is enabled:
- - Associated file can be used as a command using complete file name.
- - %* built in variable to represent all of the command line arguments.
- - Added ASSOC command.
- - DEL /S display the deleted files instead of the files which are not found.
- - MD can create multiple subdirectory levels in one step.
- - SET will display variables starting with the specified variable name, if
- only a variable name is given. ERRORLEVEL will be set to 1 if none found.
- - Added RMDIR /Q switch.
- - Added START /SHARED switch.
- - Added undocumented internal variables %=ExitCode% and %=ExitCodeAscii%. They
- contain the exit code value of external command, and are available only
- after an external command or EXIT /B has been executed. %=ExitCode% contains
- a 32-bit 8-digits hexadecimal number. %=ExitCodeAscii% contains an ASCII
- character of the least sigmificant byte of the exit code value.
- {CMDEXTVERSION 1}
- Windows NT 4.0 (July 1996):
- - Added CMD /T, /Y switches.
- - Added COLOR command. ERRORLEVEL will be set to 1 if color is invalid or same
- as current.
- - Added COPY /Z switch.
- - Added FTYPE command.
- - Command Extensions. If enabled:
- - Added %~d1, %~f1, %~n1, %~p1, %~s1, %~x1, %~$PATH:1 batch argument variable
- substitutions.
- - Added %CMDCMDLINE%, %ERRORLEVEL% built in variables.
- - Added variable substitution and substring.
- - CALL can use ":<any>" label to create a new batch execution context
- starting from the specified label.
- - CD can use unquoted directory names.
- - CMD/START replace the first token with COMSPEC variable if it's CMD without
- extension and path.
- - CMD/START use the %PATHEXT% variable if the first token has no extension.
- - CMD/START treat the first token as directory if no extension matched but it
- matches a directory, then open it using Explorer.
- - Added DATE /T switch.
- - Added FOR /D, /F, /L, /R switches.
- - GOTO can use ":EOF" label to end the current batch execution context.
- - Added IF /I switch.
- - Added IF EQU, NEQ, LSS, LEQ, GTR, GEQ, CDMEXTVERSION, DEFINED operators.
- - POPD will delete temporary drive letter created by PUSHD.
- - Added PROMPT $+, $M formatting characters.
- - PUSHD can use network paths, and it will be mapped to a temporary drive
- letter from Z: to A:.
- - Added SET /A switch.
- - Added SETLOCAL ENABLEEXTENSION|DISABLEEXTENSION option.
- ERRORLEVEL will be set to 1 if any option is invalid.
- - Added SHIFT /N switch.
- - Added TIME /T switch.
- {CMDEXTVERSION 2}
- Windows 2000 (December 1999) [NT 5.0]:
- - Added %COPYCMD% to store /Y switch of COPY and MOVE commands.
- - Added CMD /D, /E, /F, /S, /V switches.
- AutoRun commands are stored in the below registry value as STRING:
- HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
- HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
- - Added COPY /Y switch.
- - Added DIR /4, /Q switches.
- - Added EXIT /B switch.
- - Added MOVE /Y switch.
- - Added SET /P switch.
- - Added START /ABOVENORMAL, /BELOWNORMAL switches.
- - Command Extensions default setting can also be specified in below registry
- value as DWORD 0x1:
- HKEY_LOCAL_MACHINE\Software\MicroSoft\Command Processor\EnableExtensions
- - Command Extensions has been enabled by default by Windows installation.
- - Command Extensions. If enabled:
- - Added %~a1, %~t1, %~z1 batch argument variable substitutions.
- - Added %CD%, %CMDEXTVERSION%, %DATE%, %RANDOM%, %TIME% built in variables.
- - Added variable Delayed Expansion.
- - Variable substring accepts negative offset and length.
- - Added FOR /F switch "usebackq" option.
- - FOR /F switch can use string or command as source.
- - Added FOR %~I, %~aI, %~tI, %~zI variable substitutions.
- - Added SET /P switch.
- - Added SETLOCAL ENABLEDELAYEDEXPANSION|DISABLEDELAYEDEXPANSION options.
- - Added help text for non existent MKLNK and RMLNK commands. See below notes.
- Windows XP 32-Bit (August 2001) [NT 5.1]:
- - Added COPY /D switch.
- - File and directory name completion default settings can be stored in below
- registry values as DWORD:
- HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
- HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
- HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
- HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
- - Command Extensions. If enabled:
- - Added SET /A "!", "~", "-" unary operators.
- - Variable Delayed Expansion default setting can be stored in below registry
- values as DWORD 0x1:
- HKEY_CURRENT_USER\Software\MicroSoft\Command Processor\DelayedExpansion
- HKEY_LOCAL_MACHINE\Software\MicroSoft\Command Processor\DelayedExpansion
- - Removed help text for non existent MKLNK and RMLNK commands.
- - BREAK command no longer break into the debugger if run under a debugger.
- However, its help message is still unchanged.
- Windows XP 64-Bit (April 2005) / Windows Server 2003 (March 2003) [NT 5.2]:
- (No change)
- Windows Vista (November 2006) [NT 6.0]:
- - Added COPY /L switch.
- - Added DEL /A "I", "L" attributes.
- - Added DIR /A "I", "L" attributes.
- - Added DIR /R switch.
- - Added MKLINK command.
- - Added START /AFFINITY switch.
- - Added help text for non existent TRANSACTION command. See below notes.
- Windows 7 (July 2009) [NT 6.1]:
- - Added START /NODE switch.
- - Command Extensions. If enabled:
- - Added %HIGHESTNUMANODENUMBER% built in variable.
- Windows 8 (August 2012) [NT 6.2]:
- (No change)
- Windows 8.1 (August 2013) [NT 6.3]:
- (No change)
- Windows 10 v1507 Build 10240 (July 2015) [NT 10.0]:
- (No change)
- Windows 10 v1511 Build 10586 (November 2015) [NT 10.0]:
- (No change)
- Windows 10 v1607 Build 14393 (August 2016) [NT 10.0]:
- (No change)
- Windows 10 v1703 Build 15063 (Creators Update; April 2017) [NT 10.0]:
- (No change)
- Windows 10 v1709 Build 16299 (Fall Creators Update; October 2017) [NT 10.0]:
- (No change)
- Windows 10 v1803 Build 17134 (April 2018) [NT 10.0]:
- (No change)
- Windows 10 v1903 Build 18362 (May 2019) [NT 10.0]:
- - Added DEL /A "O" attribute.
- - Added DIR /A "O" attribute.
- Windows 10 v1909 Build 18363 (November 2019) [NT 10.0]:
- (No change)
- Windows 10 v2004 Build 19041 (May 2020) [NT 10.0]:
- (No change)
- Windows 10 v2009/v20H2 Build 19042 (October 2020) [NT 10.0]:
- (No change)
- Windows 10 v21H1 Build 19043 (March 2021) [NT 10.0]:
- (No change)
- Windows 11 v21H2 Build 22000 (October 2021) [NT 10.0]:
- (No change)
- Windows 10 v21H2 Build 19044 (November 2021) [NT 10.0]:
- (No change)
- Windows 11 v22H2 Build 22621 (September 2022) [NT 10.0]:
- - Added START /MACHINE switch.
- Windows 10 v22H2 Build 19045 (October 2022) [NT 10.0]:
- (No change)
- Windows 11 v23H2 Build 22631 (October 2023) [NT 10.0]:
- (No change)
- Notes:
- - Internal variables can be shown by specifying a delimiter character as a
- parameter. e.g.: `SET;`, `SET,`, or `SET "`. Batch argument variables and
- built in variables can not be show whatsoever.
- - %=C:%, %=D:%, etc. are undocumented internal variables which contain the
- current working directory of each drive. Each variable will only exist after
- the corresponding drive has been accessed using either the CD or PUSHD
- command. These variables are available since CMD v3.1.
- - DPATH is an undocumented command which is same as DOS APPEND command, where
- its help text also refers to the DOS APPEND command. If used, it sets the
- %DPATH% variable. DPATH is available since CMD v3.1.
- - Help text for the non existent MKLNK command of CMD v5.0
- (resource message ID 0x00002725 of CMD.EXE):
- ----------------------------------------------------------------------
- Create a symbolic or hard link.
- MKLNK [/D | /H] path target-path
- path Specifies the name of the link
- target-path Specifies the name of the file or directory that the
- link points to.
- /D Makes the link name a directory. Only needed if the
- target-path does not exists. Otherwise the type of
- link created matches the type of the target-path.
- /H Makes the link a hard link instead of a symbolic link.
- ----------------------------------------------------------------------
- - Help text for the non existent RMLNK command of CMD v5.0
- (resource message ID 0x00002726 of CMD.EXE):
- -----------------------------------------------------------------
- Deletes a symbolic link.
- RMLNK path
- path Specifies the name of the symbolic link to remove
- -----------------------------------------------------------------
- - Help text for the non existent TRANSACTION command of CMD v6.0+
- (resource message ID 0x40002732 of CMD.EXE.MUI):
- -----------------------------------------------------------------------
- Allows control of file operations via transactions to commit or abort
- changes.
- TRANSACTION [/START | /COMMIT | /ROLLBACK | /SUSPEND | /RESUME]
- /START - Start a new transaction. Only one can be pending
- at a time.
- /COMMIT - Commit all changes for the current transaction.
- /ROLLBACK - Rolls back all changes for the current transaction.
- /SUSPEND - Disables the running transaction, leaving it pending,
- and continue in non-transacted mode.
- /RESUME - Enable the transaction disabled with suspend.
- For both commit and rollback, the transaction is then closed after
- the command executes.
- If no argument is given, this command displays the current state of the
- transaction for CMD.EXE.
- -----------------------------------------------------------------------
- - As of this point of Windows version & build, the TRANSACTION command is
- still non existent.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement