Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Windows 11 not reported in tcl_platform(osVersion)

Closed / Fixed0f19edcb7822984c583e70d07ddc169b0b19dcb7Created 4 years agoUpdated 4 years ago
Descriptionwiki2023-01-01 16:43:33
Windows 11 is not reported in tcl_platform(osVersion). The following, run on a Win 11 box, still spits 10.0 as with Windows 10:
% set tcl_platform(osVersion)
10.0
Referenced by2
fvogelwiki2023-01-02 21:43:57

Running 'ver' on the command line in my Win 11 box says:

Microsoft Windows [version 10.0.22621.963]

Apparently one is supposed to use the build number in the OSVERSIONINFOW struct to make the difference between Win 10 and Win 11. If the build number is >=22000 then it is a Win 11 box. See this StackOverflow thread.

The TclpSetVariables() code in tclWinInit.c should probably be updated to take this into account.

jan.nijtmanswiki2023-01-04 23:26:53

Proposed fix [here]

fvogelplain2023-01-06 21:21:02
Works for me thanks.
Log in (anonymous is fine) to add a comment.