On Windows 8.1, tcl_platform(osVersion) is reported as 6.2 even though it is actually 6.3. This is due to a change in behaviour of the GetVersionEx Win32 API which reports 6.2 if the exe does not contain a manifest.

Jan has fixed this in the trunk by adding the appropriate manifest. However, this is not a permanent fix. When Windows 8.2 (or whatever) rolls around, the manifest will have to change AGAIN and existing tclsh would still be broken.

Moreover, the manifest fix only fixes tclsh and wish, not when the tcl dll is loaded from other executables.

Therefore, a better fix might be to use the undocumented RtlGetVersion function which returns the real OS version. It has the same interface as GetVersionEx (the returned struct is the same though typedef'ed differently), but has to be loaded dynamically from ntdll.dll. This will permanently solve the problem for future versions and all executables that load the tcl dll (unless Microsoft breaks that function in the future as well).

See and