Advertisement
jcunews

cmd-changes.txt

Oct 28th, 2020 (edited)
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.62 KB | None | 0 0
  1. === Windows CMD.EXE Changes Rev. 7 ===
  2.  
  3. Compiled by jcunews. March 2020 - November 2023.
  4.  
  5. https://www.reddit.com/u/jcunews1
  6. https://pastebin.com/u/jcunews
  7. https://greasyfork.org/en/users/85671-jcunews
  8.  
  9. (*) Best viewed using monospace/fixed font with at least 80 columns view.
  10.  
  11.  
  12. Windows NT 3.5 (September 1994): (in comparison with Windows NT 3.1)
  13. - Added full support for Unicode. Note: Windows NT 3.1 has partial support.
  14. - Added CMD /A, /U switches.
  15. - Added CD /D switch.
  16. - Added DIR /C switch.
  17. - Added START /SEPARATE, /WAIT switches.
  18.  
  19.  
  20. Windows NT 3.51 (May 1995):
  21. - Added CMD /X switch for Command Extensions.
  22. Default setting can be specified in below registry value as DWORD 0x1:
  23. HKEY_CURRENT_USER\Software\MicroSoft\Command Processor\EnableExtensions
  24. If Command Extensions is enabled via registry, /X switch disables the Command
  25. Extensions.
  26. If Command Extensions is enabled:
  27. - Associated file can be used as a command using complete file name.
  28. - %* built in variable to represent all of the command line arguments.
  29. - Added ASSOC command.
  30. - DEL /S display the deleted files instead of the files which are not found.
  31. - MD can create multiple subdirectory levels in one step.
  32. - SET will display variables starting with the specified variable name, if
  33. only a variable name is given. ERRORLEVEL will be set to 1 if none found.
  34. - Added RMDIR /Q switch.
  35. - Added START /SHARED switch.
  36. - Added undocumented internal variables %=ExitCode% and %=ExitCodeAscii%. They
  37. contain the exit code value of external command, and are available only
  38. after an external command or EXIT /B has been executed. %=ExitCode% contains
  39. a 32-bit 8-digits hexadecimal number. %=ExitCodeAscii% contains an ASCII
  40. character of the least sigmificant byte of the exit code value.
  41.  
  42.  
  43. {CMDEXTVERSION 1}
  44.  
  45.  
  46. Windows NT 4.0 (July 1996):
  47. - Added CMD /T, /Y switches.
  48. - Added COLOR command. ERRORLEVEL will be set to 1 if color is invalid or same
  49. as current.
  50. - Added COPY /Z switch.
  51. - Added FTYPE command.
  52. - Command Extensions. If enabled:
  53. - Added %~d1, %~f1, %~n1, %~p1, %~s1, %~x1, %~$PATH:1 batch argument variable
  54. substitutions.
  55. - Added %CMDCMDLINE%, %ERRORLEVEL% built in variables.
  56. - Added variable substitution and substring.
  57. - CALL can use ":<any>" label to create a new batch execution context
  58. starting from the specified label.
  59. - CD can use unquoted directory names.
  60. - CMD/START replace the first token with COMSPEC variable if it's CMD without
  61. extension and path.
  62. - CMD/START use the %PATHEXT% variable if the first token has no extension.
  63. - CMD/START treat the first token as directory if no extension matched but it
  64. matches a directory, then open it using Explorer.
  65. - Added DATE /T switch.
  66. - Added FOR /D, /F, /L, /R switches.
  67. - GOTO can use ":EOF" label to end the current batch execution context.
  68. - Added IF /I switch.
  69. - Added IF EQU, NEQ, LSS, LEQ, GTR, GEQ, CDMEXTVERSION, DEFINED operators.
  70. - POPD will delete temporary drive letter created by PUSHD.
  71. - Added PROMPT $+, $M formatting characters.
  72. - PUSHD can use network paths, and it will be mapped to a temporary drive
  73. letter from Z: to A:.
  74. - Added SET /A switch.
  75. - Added SETLOCAL ENABLEEXTENSION|DISABLEEXTENSION option.
  76. ERRORLEVEL will be set to 1 if any option is invalid.
  77. - Added SHIFT /N switch.
  78. - Added TIME /T switch.
  79.  
  80.  
  81. {CMDEXTVERSION 2}
  82.  
  83.  
  84. Windows 2000 (December 1999) [NT 5.0]:
  85. - Added %COPYCMD% to store /Y switch of COPY and MOVE commands.
  86. - Added CMD /D, /E, /F, /S, /V switches.
  87. AutoRun commands are stored in the below registry value as STRING:
  88. HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
  89. HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
  90. - Added COPY /Y switch.
  91. - Added DIR /4, /Q switches.
  92. - Added EXIT /B switch.
  93. - Added MOVE /Y switch.
  94. - Added SET /P switch.
  95. - Added START /ABOVENORMAL, /BELOWNORMAL switches.
  96. - Command Extensions default setting can also be specified in below registry
  97. value as DWORD 0x1:
  98. HKEY_LOCAL_MACHINE\Software\MicroSoft\Command Processor\EnableExtensions
  99. - Command Extensions has been enabled by default by Windows installation.
  100. - Command Extensions. If enabled:
  101. - Added %~a1, %~t1, %~z1 batch argument variable substitutions.
  102. - Added %CD%, %CMDEXTVERSION%, %DATE%, %RANDOM%, %TIME% built in variables.
  103. - Added variable Delayed Expansion.
  104. - Variable substring accepts negative offset and length.
  105. - Added FOR /F switch "usebackq" option.
  106. - FOR /F switch can use string or command as source.
  107. - Added FOR %~I, %~aI, %~tI, %~zI variable substitutions.
  108. - Added SET /P switch.
  109. - Added SETLOCAL ENABLEDELAYEDEXPANSION|DISABLEDELAYEDEXPANSION options.
  110. - Added help text for non existent MKLNK and RMLNK commands. See below notes.
  111.  
  112.  
  113. Windows XP 32-Bit (August 2001) [NT 5.1]:
  114. - Added COPY /D switch.
  115. - File and directory name completion default settings can be stored in below
  116. registry values as DWORD:
  117. HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
  118. HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
  119. HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
  120. HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
  121. - Command Extensions. If enabled:
  122. - Added SET /A "!", "~", "-" unary operators.
  123. - Variable Delayed Expansion default setting can be stored in below registry
  124. values as DWORD 0x1:
  125. HKEY_CURRENT_USER\Software\MicroSoft\Command Processor\DelayedExpansion
  126. HKEY_LOCAL_MACHINE\Software\MicroSoft\Command Processor\DelayedExpansion
  127. - Removed help text for non existent MKLNK and RMLNK commands.
  128. - BREAK command no longer break into the debugger if run under a debugger.
  129. However, its help message is still unchanged.
  130.  
  131.  
  132. Windows XP 64-Bit (April 2005) / Windows Server 2003 (March 2003) [NT 5.2]:
  133. (No change)
  134.  
  135.  
  136. Windows Vista (November 2006) [NT 6.0]:
  137. - Added COPY /L switch.
  138. - Added DEL /A "I", "L" attributes.
  139. - Added DIR /A "I", "L" attributes.
  140. - Added DIR /R switch.
  141. - Added MKLINK command.
  142. - Added START /AFFINITY switch.
  143. - Added help text for non existent TRANSACTION command. See below notes.
  144.  
  145.  
  146. Windows 7 (July 2009) [NT 6.1]:
  147. - Added START /NODE switch.
  148. - Command Extensions. If enabled:
  149. - Added %HIGHESTNUMANODENUMBER% built in variable.
  150.  
  151.  
  152. Windows 8 (August 2012) [NT 6.2]:
  153. (No change)
  154.  
  155.  
  156. Windows 8.1 (August 2013) [NT 6.3]:
  157. (No change)
  158.  
  159.  
  160. Windows 10 v1507 Build 10240 (July 2015) [NT 10.0]:
  161. (No change)
  162.  
  163.  
  164. Windows 10 v1511 Build 10586 (November 2015) [NT 10.0]:
  165. (No change)
  166.  
  167.  
  168. Windows 10 v1607 Build 14393 (August 2016) [NT 10.0]:
  169. (No change)
  170.  
  171.  
  172. Windows 10 v1703 Build 15063 (Creators Update; April 2017) [NT 10.0]:
  173. (No change)
  174.  
  175.  
  176. Windows 10 v1709 Build 16299 (Fall Creators Update; October 2017) [NT 10.0]:
  177. (No change)
  178.  
  179.  
  180. Windows 10 v1803 Build 17134 (April 2018) [NT 10.0]:
  181. (No change)
  182.  
  183.  
  184. Windows 10 v1903 Build 18362 (May 2019) [NT 10.0]:
  185. - Added DEL /A "O" attribute.
  186. - Added DIR /A "O" attribute.
  187.  
  188.  
  189. Windows 10 v1909 Build 18363 (November 2019) [NT 10.0]:
  190. (No change)
  191.  
  192.  
  193. Windows 10 v2004 Build 19041 (May 2020) [NT 10.0]:
  194. (No change)
  195.  
  196.  
  197. Windows 10 v2009/v20H2 Build 19042 (October 2020) [NT 10.0]:
  198. (No change)
  199.  
  200.  
  201. Windows 10 v21H1 Build 19043 (March 2021) [NT 10.0]:
  202. (No change)
  203.  
  204.  
  205. Windows 11 v21H2 Build 22000 (October 2021) [NT 10.0]:
  206. (No change)
  207.  
  208.  
  209. Windows 10 v21H2 Build 19044 (November 2021) [NT 10.0]:
  210. (No change)
  211.  
  212.  
  213. Windows 11 v22H2 Build 22621 (September 2022) [NT 10.0]:
  214. - Added START /MACHINE switch.
  215.  
  216.  
  217. Windows 10 v22H2 Build 19045 (October 2022) [NT 10.0]:
  218. (No change)
  219.  
  220.  
  221. Windows 11 v23H2 Build 22631 (October 2023) [NT 10.0]:
  222. (No change)
  223.  
  224.  
  225.  
  226. Notes:
  227.  
  228. - Internal variables can be shown by specifying a delimiter character as a
  229. parameter. e.g.: `SET;`, `SET,`, or `SET "`. Batch argument variables and
  230. built in variables can not be show whatsoever.
  231.  
  232. - %=C:%, %=D:%, etc. are undocumented internal variables which contain the
  233. current working directory of each drive. Each variable will only exist after
  234. the corresponding drive has been accessed using either the CD or PUSHD
  235. command. These variables are available since CMD v3.1.
  236.  
  237. - DPATH is an undocumented command which is same as DOS APPEND command, where
  238. its help text also refers to the DOS APPEND command. If used, it sets the
  239. %DPATH% variable. DPATH is available since CMD v3.1.
  240.  
  241. - Help text for the non existent MKLNK command of CMD v5.0
  242. (resource message ID 0x00002725 of CMD.EXE):
  243. ----------------------------------------------------------------------
  244. Create a symbolic or hard link.
  245.  
  246. MKLNK [/D | /H] path target-path
  247.  
  248. path Specifies the name of the link
  249. target-path Specifies the name of the file or directory that the
  250. link points to.
  251. /D Makes the link name a directory. Only needed if the
  252. target-path does not exists. Otherwise the type of
  253. link created matches the type of the target-path.
  254.  
  255. /H Makes the link a hard link instead of a symbolic link.
  256. ----------------------------------------------------------------------
  257.  
  258. - Help text for the non existent RMLNK command of CMD v5.0
  259. (resource message ID 0x00002726 of CMD.EXE):
  260. -----------------------------------------------------------------
  261. Deletes a symbolic link.
  262.  
  263. RMLNK path
  264.  
  265. path Specifies the name of the symbolic link to remove
  266. -----------------------------------------------------------------
  267.  
  268. - Help text for the non existent TRANSACTION command of CMD v6.0+
  269. (resource message ID 0x40002732 of CMD.EXE.MUI):
  270. -----------------------------------------------------------------------
  271. Allows control of file operations via transactions to commit or abort
  272. changes.
  273.  
  274. TRANSACTION [/START | /COMMIT | /ROLLBACK | /SUSPEND | /RESUME]
  275.  
  276. /START - Start a new transaction. Only one can be pending
  277. at a time.
  278.  
  279. /COMMIT - Commit all changes for the current transaction.
  280.  
  281. /ROLLBACK - Rolls back all changes for the current transaction.
  282.  
  283. /SUSPEND - Disables the running transaction, leaving it pending,
  284. and continue in non-transacted mode.
  285.  
  286. /RESUME - Enable the transaction disabled with suspend.
  287.  
  288. For both commit and rollback, the transaction is then closed after
  289. the command executes.
  290.  
  291. If no argument is given, this command displays the current state of the
  292. transaction for CMD.EXE.
  293. -----------------------------------------------------------------------
  294.  
  295. - As of this point of Windows version & build, the TRANSACTION command is
  296. still non existent.
  297.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement