https://bugs.winehq.org/show_bug.cgi?id=32680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|cmd.exe Add support for |cmd.exe: add support for |CMDEXTVERSION, CMDCMDLINE, |'CMDEXTVERSION' and |HIGHESTNUMANODENUMBER |'CMDCMDLINE' environment | |variables Severity|normal |enhancement
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello Jason,
I found some information here:
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en...
--- quote --- ...
%cmdcmdline% expands into the original command line passed to Cmd.exe prior to any processing by Cmd.exe, provided that there is not already an environment variable with the name cmdcmdline, in which case you get the cmdcmdline value instead.
%cmdextversion% expands into the a string representation of the current value of cmdextversion, provided that there is not already an environment variable with the name CMDEXTVERSION, in which case you get the CMDEXTVERSION value instead.
... --- quote ----
Also here: http://www.robvanderwoude.com/ntif.php
This forum has some example code/snippets: http://ss64.org/viewtopic.php?id=1834
An interesting remark here:
--- quote --- Distinguishing NT4 from 2k and later with command extensions enabled is simply a matter of doing if CmdExtVersion 2 ... check or checking whether CMDEXTVERSION environment variable is dynamic (like in the above example)... and there is no real difference with command extensions disabled. AFAIK, there have been no significant changes to cmd.exe since Win2k and, since MS has all but abandoned development of CMD shell in favor of PowerShell, it is unlikely that we'll ever see any new internal commands or major changes to existing ones. As for detecting availability of external commands, you just try to run the command and do if ErrorLevel 9009 ... check afterward. --- quote ---
Suggesting the extensions would be of limited value as MS pushes for PowerShell.
If you don't mind I'd remove '%HIGHESTNUMANODENUMBER%' from the list (since it applies to a very limited use-case) and we treat '%CMDEXTVERSION%' and '%CMDCMDLINE%' as enhancement, lowering severity.
Thanks.
Regards