http://bugs.winehq.org/show_bug.cgi?id=32680
Bug #: 32680 Summary: cmd.exe Add support for CMDEXTVERSION, CMDCMDLINE, HIGHESTNUMANODENUMBER Product: Wine Version: 1.5.21 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs@winehq.org ReportedBy: us@edmeades.me.uk Classification: Unclassified
%CMDEXTVERSION% %CMDCMDLINE% %HIGHESTNUMANODENUMBER%
http://bugs.winehq.org/show_bug.cgi?id=32680
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=32680
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello Jason,
which application/game needs this and breaks because it's not present? Please provide download links. Thanks.
Regards
https://bugs.winehq.org/show_bug.cgi?id=32680
--- Comment #2 from Jason Edmeades us@edmeades.me.uk --- Hiya - None, sorry lost track of this. I raised it when I was doing all the cmd.exe work, trying to get things as complete as I could. This can be closed if necessary (although is also not too difficult to implement either)
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
https://bugs.winehq.org/show_bug.cgi?id=32680
--- Comment #4 from Jason Edmeades us@edmeades.me.uk ---
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.
Fine by me
https://bugs.winehq.org/show_bug.cgi?id=32680
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #5 from Bernhard Übelacker bernhardu@mailbox.org --- One user of cmdcmdline is ghidra's startup batch file, trying to distinguish if started via doubleclick or from command line:
https://github.com/NationalSecurityAgency/ghidra/blob/184180d54dbdf3db3c030e...
However, startup does not break because of this missing variable.