Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Discrepancy in versions with Windows 11

Jul
304
0
Running Winver gives me Windows version 23H2 Build 22635.3286.

Running ver under TCC gives me WIndows version 10.0.22635.3286.

Curious, eh?
 
Other methods to get the Windows Version;
Code:
E:\Utils>wmic os get caption, buildnumber, version, csdversion, OSArchitecture
BuildNumber  Caption                   CSDVersion  OSArchitecture  Version
19045        Microsoft Windows 10 Pro              64-bit          10.0.19045

Code:
E:\Utils>echo %@regquery["HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\DisplayVersion"]
22H2

Joe
 
I use this.

Code:
echo TCC %_4ver.%[_build] %@if[%_x64==1,x64,x86]

set osname=%@word["|",0,%@wmi[.,"Select Name from Win32_OperatingSystem"]]
set ubr=%@regquery["HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR"]
set releaseid=%@regquery["HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId"]
set displayversion=%@regquery["HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DisplayVersion"]
set winver=%@wmi[.,"Select Version from Win32_OperatingSystem"]

echo %osname
echo %winver.%ubr (%releaseid, %displayversion)

to get this.

Code:
TCC 32.00.10 x64
Microsoft Windows 10 Pro for Workstations
10.0.19045.4046 (2009, 22H2)
 
Running Winver gives me Windows version 23H2 Build 22635.3286.

Running ver under TCC gives me WIndows version 10.0.22635.3286.
Yes, this is correct. For reasons known only to Microsoft, the internal version number of Windows 11 begins with 10.0 not 11.0. I discovered this when trying to write a batch file that would detect whether it was running under Windows 10 or 11.

Also, if you go to the old Control Panel (in Windows 11) there is a Windows 10 logo in the upper right.

Here is a chart I found: List of Windows Version Numbers

This is consistent with all of Microsoft's other inconsistencies:
Windows 7 = version 6.1
Windows 8 = version 6.2
Windows 8.1 = version 6.3
The first release of Windows 10 was version 6.4 and then later releases were changed to 10.0
 

Attachments

  • version.jpg
    version.jpg
    448.7 KB · Views: 5
The FileUtils plugin has the _K32Ver variable;
_K32VER — Returns the version number of Kernel32.dll.

Syntax:
%_K32VER

This convenience function is equivalent to @FILEVER[%_winsysdir\Kernel32.dll].
You can use it as an alternate way to get the Windows version.
The value will be returned as four decimal values, separated by periods,
without spaces or leading zeroes.

Ref: https://charlesdye.net/dl/fileutils.zip

Joe
 
The FileUtils plugin has the _K32Ver variable;


Ref: https://charlesdye.net/dl/fileutils.zip

Joe

Joe, I just tried loading the plugin, and I experimented with the DIRCMP command using directory aliases for the arguments. I got an error message when either directory argument was an alias, as in dircmp dir1: dir2:. The help says, "the first directory; directory aliases are supported". It doesn't say that for the second argument, so I would at least have expected the command dircmp dir1: c:\...dirname to work. If I wrap the arguments inside the @full function, the command works fine (dircmd %@full[dir1:] %@full[dir2:]).

-- Jay
 
@Charles Dye is the programmer of that plugin.

He should be able to provide some insight into the issue you are having.

Joe
 
Joe, two more questions/comments about the plugin:
  1. The variable _fhver$ is not described in the help file. What is it?
  2. How can one invoke the help file? The TextUtils plugin has the command TextUtilsHelp, but there does not seem to be a similar command in the FileUtils plugin.
 
I have my U: drive as;
Code:
R:\>subst
U:\: => E:\utils

I have an alias as;
Code:
R:\>alias utils:
E:\utils\

On my system;
Code:
R:\>dircmp u: utils:\ 
FileUtils plugin: Dir1 and Dir2 are the same!

R:\>dircmp utils:\ u: 
FileUtils plugin: Dir1 and Dir2 are the same!

I am using 0.39 Build 2 of FileUtils plugin.

Joe
 
If you want help for a command from the FileUtils plugin,
type the command at the TCC prompt, then press F1.

Example;
Code:
dircmp
then press F1

Typing FileUtilsHelp also launches the help for the plugin.

Joe
 
Sorry for the confusion, Joe. I guess I'm working too fast here. I hope that Charles is reading this thread and will answer, perhaps in a new thread.

-- Jay
 
I think I may have figured out the issue. I have many nested directory aliases. One that I was using in my test, for example, was "mp0:". It's definition is

mp:2024-08\

It is based on the alias "mp:", which has the following definition:

jgsgb:Mass-Pocha\

And this goes on for several more levels of nesting. The TCC function @full[] has no trouble expanding all the levels and producing:

C:\users\jay\dropbox\genealogy\jgsgb\Mass-Pocha\2024-08\

Pending a response from Charles, I suspect that he is not using the @full function to do the expansion. The help file also needs to indicate that either or both directories can be aliases.

-- Jay
 
I think I may have figured out the issue. I have many nested directory aliases. One that I was using in my test, for example, was "mp0:". It's definition is

mp:2024-08\

It is based on the alias "mp:", which has the following definition:

jgsgb:Mass-Pocha\

And this goes on for several more levels of nesting. The TCC function @full[] has no trouble expanding all the levels and producing:

C:\users\jay\dropbox\genealogy\jgsgb\Mass-Pocha\2024-08\

Pending a response from Charles, I suspect that he is not using the @full function to do the expansion. The help file also needs to indicate that either or both directories can be aliases.

Both arguments are handled the same, and both call an internal function which resolves a directory alias at the start of the filename. But nested directory aliases never occurred to me. I'll take a look at it next week, see whether I can add that functionality.

As for the plugin help command, those only exist because Steve Fabian requested them. If nobody requests it for a given plugin, I probably won't do it.
 
Both arguments are handled the same, and both call an internal function which resolves a directory alias at the start of the filename. But nested directory aliases never occurred to me. I'll take a look at it next week, see whether I can add that functionality.

As for the plugin help command, those only exist because Steve Fabian requested them. If nobody requests it for a given plugin, I probably won't do it.

I would suggest modifying the DIRCMP help to indicate that both directories can be aliases. The current help is confusing.

Can you resolve directory aliases by calling the @full[] built-in function from the plugin? That would take care of it (unless it would do more than you want).

Now that I was reminded that the F1 key can be used to get help for the commands, there probably is no need for a help file.
 
I would suggest modifying the DIRCMP help to indicate that both directories can be aliases. The current help is confusing.

Can you resolve directory aliases by calling the @full[] built-in function from the plugin? That would take care of it (unless it would do more than you want).

Now that I was reminded that the F1 key can be used to get help for the commands, there probably is no need for a help file.

I've put up a new build that should address the issue: FileUtils Plugin

I find that the plugin does have a FILEUTILSHELP command. You may have an older version.
 
Thank you, Charles. It took me a couple of tries to get the new files extracted from the ZIP archive and loaded, but I can now confirm that the help command is there and that the documentation has been updated. However, nested directory aliases seem still not to work fully. It seems that if there are two different directory aliases that resolve to the same final directory, the plugin reports that the directories are the same. But if they point to different directories, a bogus error message is presented, such as

FileUtils plugin: Not a directory: "C:\Users\Jay\Dropbox\mp-1:"

The command was issued in the Dropbox folder but referenced the nested directory alias "mp-1:".

If I replace the alias with %@full[mp-1:], the command works. It may be that your code does not like the alias with a minus sign in it. Yes, if I define alias mp1: to be the actual value of mp-1:, then the command works.

-- Jay
 
If I replace the alias with %@full[mp-1:], the command works. It may be that your code does not like the alias with a minus sign in it. Yes, if I define alias mp1: to be the actual value of mp-1:, then the command works.

Yes, because directory aliases are supposed to be alphanumeric....

I've put up a new build which uses QueryTrueName() to resolve directory aliases (and a bunch of other stuff). That ought to resolve your issue.
 
Yes, because directory aliases are supposed to be alphanumeric....

I was not aware of such a requirement, and minus signs are certainly accepted, for both command aliases and directory aliases. Other special characters are also acceptable. In fact, I just tried the ones above the number keys, and almost all of them are acceptable and work.

The set of directory aliases I have with MP are for issues of a journal that I edit. The directory for the current issue is MP0:. The next issue is MP1:, and the previous issue is MP-1:. I would have defined MP+1:, but the plus sign is one of the characters that is not accepted.

I've put up a new build which uses QueryTrueName() to resolve directory aliases (and a bunch of other stuff). That ought to resolve your issue.

Thanks. The new version, indeed, solved the problem.
 

Similar threads

Back
Top