Detect OS X version from inside Windows

Discussion in 'Parallels Client for Windows' started by KennethH2, Mar 30, 2016.

  1. KennethH2

    KennethH2 Bit poster

    Messages:
    2
    I am a developer on a team that does Windows application development. We can detect that we are running in a Parallels environment by using the System.Management class inside our C# .net Windows application and looking at the hardware manufacturer and hardware model. Is there a way to also determine the version of Parallels, and the ultimate goal of determining the version of the MAC OS that parallels is running on?

    Thanks in advance.
     
  2. justin6

    justin6 Bit poster

    Messages:
    4
    you need the code for find version of parallels...if yes you can also take the Idea from Mac coding.....you are work with C#then you can also get Idea from official C# site
    System.Environment.OSVersion basically we used find the current version of OS
     
  3. KennethH2

    KennethH2 Bit poster

    Messages:
    2
    Hi justin6,
    Thanks for your posting but the System.Environment.OSVersion would tell us the version of Windows we are running on inside of Parallels. It would not tell us anything about the version of Parallels because System.Environment is unaware that it's running on Parallels. We have to drop to the System.Management classes to query the hardware to discover we are on a Parallels virtual machine and not on real hardware.
     
  4. Elric

    Elric Parallels Team

    Messages:
    1,718
    I don't know a way to obtain version of Mac OS, but version of Parallels is present in the SMBios (table 0):

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colBIOS = objWMIService.ExecQuery _
    ("Select * from Win32_BIOS")

    For each objBIOS in colBIOS
    Wscript.Echo "SMBIOS Version: " & objBIOS.SMBIOSBIOSVersion
    Next
     
  5. justin6

    justin6 Bit poster

    Messages:
    4
    thanks sir Mr. Elric
     

Share This Page