1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

_winver shows 6.1 on windows 7

Discussion in 'Support' started by hlhelman, May 4, 2017.

  1. hlhelman

    Joined:
    Mar 20, 2009
    Messages:
    32
    Likes Received:
    0
    I thought _winver was fixed in TC21 build 22. But on my W7 machine it reports 6.1
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,869
    Likes Received:
    83
    The APIs to return the real Windows version only work in Windows 8 & 10.

    In Windows 7, you're stuck with what Windows tells you. And that is 6.x.
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    According to Microsoft Windows 7 **IS** version 6.1 (and Windows 8 is version 6.3).
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    There are at least two ways to get more friendly descriptions of the Windows version.
    Code:
    v:\> echo %@WMI[. "SELECT Caption,CSDVersion from Win32_OperatingSystem"]
    Microsoft Windows 7 Professional
    Service Pack 1
    
    v:\> echo %@regquery["HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProductName"]
    Windows 7 Professional
    
    v:\> echo %@regquery["HKLM\Software\Microsoft\Windows NT\CurrentVersion\CSDVersion"]
    Service Pack 1
     
  5. hlhelman

    Joined:
    Mar 20, 2009
    Messages:
    32
    Likes Received:
    0
    Takecommand21.pdf says in at least two places that _winver works for WIndows 7. Interestingly the ver command says windows 7 and windows version 6.1
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,970
    Likes Received:
    30
    It seems to be working.
     
  7. TEA-Time

    Joined:
    Jun 2, 2008
    Messages:
    282
    Likes Received:
    1
    As Vince mentioned above:
    To back that up, if you click Start, then type winver into the search field and hit Enter, that Windows utility (winver.exe) reports the same thing. 6.1 is the true underlying version of Windows 7. Even CMD reports 6.1 for its "ver" command.

    Everything is working as it should.
     
  8. hlhelman

    Joined:
    Mar 20, 2009
    Messages:
    32
    Likes Received:
    0
    You know I didn't care about what it reported before but this is from the v21 documentation on both _WINVER, and the VER command:

    Updated Internal Variables:
    _WINVER - Now returns the actual Windows version for Windows 7 / 8 / 10 instead of the Windows default API results (i.e., "10.0" instead of "6.3").

    VER
    Now returns the actual Windows version for Windows 7 / 8 / 10 instead of the Windows default API results (i.e., "10.0" instead of "6.3").



    This is what _winver 21 reports on Windows7. It seems correct for Windows 10. I haven't tried it on Widows 8 as I am not a tester for Take Command. The ver command seems to use the results in _winver on both systems again not per the What's New in Version 21 documentation.

    C:\howard\working>echo %_winver
    6.1

    I had hoped to believe JPSOFT documentation and not have to rely on Microsoft.
     
    #8 hlhelman, May 8, 2017
    Last edited by a moderator: May 20, 2017

Share This Page