Forum Discussion

Capricornus's avatar
Capricornus
Contributor
2 years ago

How to get Windows Version and dotnet version info (OSInfo)

Hello everyone, I want to log the current Windows version and the latest .NET runtime that is installed in every test in a "version.txt" file The OSInfo.Version only shows "10.0 Build 19045" and OS...
  • rraghvani's avatar
    2 years ago

    Windows naming convention has changed, see https://en.wikipedia.org/wiki/Windows_10_version_history. You will have to write a function to convert the build number i.e. 19044 to "21H2", which then refers to the cumulative update, November 2021 Update.

     

    You can get this information also, using PowerShell script, which you can then output to a file