-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ver command - please print Windows version build number #25
Comments
Yori includes osver.exe for this.
|
Oh, hmm. That is cool, however not "backward compatible" so to speak. I've been using "ver" for this purpose since DOS 2ish... almost 40 years ago. 😅 Maybe the two cmds can be combined? |
Note that with CMD, the version of CMD and the version of the OS refer to the same thing. Yori has to deal with the way these two are no longer the same. One of the goals I was trying to achieve is to put as little functionality into the shell as possible. The shell needs to reports its version (ie., that command is a builtin) but querying the OS version has nothing to do with the shell. Keeping that command external allows it to be used from any shell or for any purpose. (And it makes sense to use too, because it can output things in a specified format so the caller doesn't need tricky parsing to interpret.) One of the other goals though is I don't think it's my role to decide details like this for everyone else. Yori interprets builtins last (so if you create a ver.exe somewhere, that preempts the builtin), and aliases are interpreted first, so users can set up whatever environment they'd like. So if you'd like to move things around, it's straightforward:
|
Got it, understand the desire for a clean design. Although maybe that's not fully possible for something also aiming at compatibility back to the old days. Up to you of course. Btw, where is the last number, shown as |
Traditionally CMD didn't show the fourth number either. The first three (major, minor, build) are supposed to be shared across the entire OS install. The fourth is the servicing revision, but not all files are serviced at the same time. It looks like Windows 10 CMD is getting the servicing revision of the kernel, which isn't a bad choice because it's serviced often, but there's no guarantee that this number will change because the user installed an update etc. So I guess my question is, what would somebody do with the fourth number? |
I'm not sure as MS versioning is getting harder to understand over the years, not easier. Now they have two systems supposedly in order to make things easier, but like the control panel, having two of them just makes it harder in the end. For me it is simple though. When I type ver I expect to see the numbers printed by cmd's ver. The exact format itself is not that important, just so I can compare it to others given as requirements on websites etc. Not sure that last number is useful for that or not. |
Sorry to keep you busy.
I noticed the ver command doesn't give me the one reason I use it under cmd.exe, to find the Windows version/build numbers. i.e.:
The text was updated successfully, but these errors were encountered: