[SOLVED] Problem detecting kernel version

Discussion in 'Mixed Languages' started by Muerto, May 30, 2015.

  1. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,817
    1,992
    60
    #1 Muerto, May 30, 2015
    Last edited: Jan 12, 2021
    ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Michaela Joy

    Michaela Joy MDL Crazy Lady

    Jul 26, 2012
    4,081
    4,654
    150
    @Dev:
    Maybe assign "Environment.OSVersion.VersionString" to a string variable and then write the string to the console?

    Just a guess :eek::

    :MJ
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,814
    45,768
    150
    #3 CODYQX4, May 30, 2015
    Last edited: Apr 12, 2019
    .
     
  4. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,768
    16,185
    340
    @CODYQX4

    Exactly! I've seen (& reported) no of applications detecting 8.1 as 6.2.

    o_O
     
  5. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,817
    1,992
    60
    #5 Muerto, May 30, 2015
    Last edited: Jan 12, 2021
    (OP)
    ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,814
    45,768
    150
    #6 CODYQX4, May 30, 2015
    Last edited: Apr 12, 2019
    .
     
  7. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,817
    1,992
    60
    #7 Muerto, May 31, 2015
    Last edited: Jan 12, 2021
    (OP)
    ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,181
    21,956
    210
    #8 Alphawaves, May 31, 2015
    Last edited by a moderator: Apr 20, 2017
    How about something like:
    Code:
     FileVersionInfo fv = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + @"\kernel32.dll");
                string version = fv.ProductMajorPart + "." + fv.ProductMinorPart;
    :eek:

    EDIT:
    oops forgot your VB guy:
    Code:
    Dim fv As FileVersionInfo = FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\kernel32.dll")
            Dim version As String = fv.ProductMajorPart & "." & fv.ProductMinorPart
     
  9. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,817
    1,992
    60
    #9 Muerto, May 31, 2015
    Last edited: Jan 12, 2021
    (OP)
    ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...