jcunews

cmd-changes.txt

Oct 28th, 2020 (edited)
161
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. === Windows CMD.EXE Changes Rev. 5 ===
  2.  
  3. Compiled by jcunews. March 2020 - March 2021.
  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: (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:
  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:
  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 [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 [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 / Windows Server 2003 [NT 5.2]:
  133. (No change)
  134.  
  135.  
  136. Windows Vista [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 [NT 6.1]:
  147. - Added START /NODE switch.
  148. - Command Extensions. If enabled:
  149. - Added %HIGHESTNUMANODENUMBER% built in variable.
  150.  
  151.  
  152. Windows 8 [NT 6.2]:
  153. (No change)
  154.  
  155.  
  156. Windows 8.1 [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; Octobar 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 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.  
  206. Notes:
  207.  
  208. - Internal variables can be shown by specifying a delimiter character as a
  209. parameter. e.g.: `SET;`, `SET,`, or `SET "`. Batch argument variables and
  210. built in variables can not be show whatsoever.
  211.  
  212. - %=C:%, %=D:%, etc. are undocumented internal variables which contain the
  213. current working directory of each drive. Each variable will only exist after
  214. the corresponding drive has been accessed using either the CD or PUSHD
  215. command. These variables are available since CMD v3.1.
  216.  
  217. - DPATH is an undocumented command which is same as DOS APPEND command, where
  218. its help text also refers to the DOS APPEND command. If used, it sets the
  219. %DPATH% variable. DPATH is available since CMD v3.1.
  220.  
  221. - Help text for the non existent MKLNK command of CMD v5.0
  222. (resource message ID 0x00002725 of CMD.EXE):
  223. ----------------------------------------------------------------------
  224. Create a symbolic or hard link.
  225.  
  226. MKLNK [/D | /H] path target-path
  227.  
  228. path Specifies the name of the link
  229. target-path Specifies the name of the file or directory that the
  230. link points to.
  231. /D Makes the link name a directory. Only needed if the
  232. target-path does not exists. Otherwise the type of
  233. link created matches the type of the target-path.
  234.  
  235. /H Makes the link a hard link instead of a symbolic link.
  236. ----------------------------------------------------------------------
  237.  
  238. - Help text for the non existent RMLNK command of CMD v5.0
  239. (resource message ID 0x00002726 of CMD.EXE):
  240. -----------------------------------------------------------------
  241. Deletes a symbolic link.
  242.  
  243. RMLNK path
  244.  
  245. path Specifies the name of the symbolic link to remove
  246. -----------------------------------------------------------------
  247.  
  248. - Help text for the non existent TRANSACTION command of CMD v6.0+
  249. (resource message ID 0x40002732 of CMD.EXE.MUI):
  250. -----------------------------------------------------------------------
  251. Allows control of file operations via transactions to commit or abort
  252. changes.
  253.  
  254. TRANSACTION [/START | /COMMIT | /ROLLBACK | /SUSPEND | /RESUME]
  255.  
  256. /START - Start a new transaction. Only one can be pending
  257. at a time.
  258.  
  259. /COMMIT - Commit all changes for the current transaction.
  260.  
  261. /ROLLBACK - Rolls back all changes for the current transaction.
  262.  
  263. /SUSPEND - Disables the running transaction, leaving it pending,
  264. and continue in non-transacted mode.
  265.  
  266. /RESUME - Enable the transaction disabled with suspend.
  267.  
  268. For both commit and rollback, the transaction is then closed after
  269. the command executes.
  270.  
  271. If no argument is given, this command displays the current state of the
  272. transaction for CMD.EXE.
  273. -----------------------------------------------------------------------
  274.  
  275. - As of this point of Windows version & build, the TRANSACTION command is
  276. still non existent.
  277.  
RAW Paste Data