Levi Perry

Levi Perry

  • NA
  • 13
  • 3.4k

How do I show updated versions of OS version, name, etc?

Mar 21 2016 12:15 PM
I have this piece of code that returns values for OS information displayed here:
 
Code 
 
//Computer Name
String q1 = System.Environment.MachineName;
metroTextBox1.Text = q1;
//User Name
String q2 = Environment.UserName;
metroTextBox2.Text = Convert.ToString(q2);
//Number of Processors
int q3 = Environment.ProcessorCount;
metroTextBox3.Text = Convert.ToString(q3);
//Operating System
String q4 = System.Environment.OSVersion.Version.ToString();
metroTextBox4.Text = q4;
//OS Platform
String q5 = System.Environment.OSVersion.Platform.ToString();
metroTextBox5.Text = q5;
 
Why does my output display for the last two values:
 
Operating System: 6.2.9200.0
OS Platform = Win32NT 
 
I would like to display a name such as "Windows 8.1" instead of the build number. 
 

Answers (3)