By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!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
E:\Utils>echo %@regquery["HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\DisplayVersion"]
22H2
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)
TCC 32.00.10 x64
Microsoft Windows 10 Pro for Workstations
10.0.19045.4046 (2009, 22H2)
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.Running Winver gives me Windows version 23H2 Build 22635.3286.
Running ver under TCC gives me WIndows version 10.0.22635.3286.
_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.
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:]
).R:\>subst
U:\: => E:\utils
R:\>alias utils:
E:\utils\
R:\>dircmp u: utils:\
FileUtils plugin: Dir1 and Dir2 are the same!
R:\>dircmp utils:\ u:
FileUtils plugin: Dir1 and Dir2 are the same!
dircmp
mp:2024-08\
jgsgb:Mass-Pocha\
C:\users\jay\dropbox\genealogy\jgsgb\Mass-Pocha\2024-08\
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.
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.
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.