---
title: "How to get information about  my computer(Name,OS Version, Path etc) in c#"  
description: "How to get information about  my computer(Name,OS Version, Path etc) in c#"  
author: "Anupam Mishra"  
published: 2016-01-27  
updated: 2016-01-27  
canonical: https://www.mindstick.com/forum/33933/how-to-get-information-about-my-computer-name-os-version-path-etc-in-c-sharp  
category: "c#"  
tags: ["c#", ".net"]  
reading_time: 1 minute  

---

# How to get information about  my computer(Name,OS Version, Path etc) in c#

Hi All,I want to [print](https://www.mindstick.com/blog/301752/types-of-3d-printing-technology) all information about my computer i.e. OSVersion, [UserName](https://www.mindstick.com/forum/12798/there-is-no-viewdata-item-of-type-ienumerable-selectlistitem-that-has-the-key-username),[Version](https://www.mindstick.com/articles/12845/things-to-remember-while-migrating-odoo-to-a-better-version),DomainName,[System](https://www.mindstick.com/articles/23411/the-most-effective-method-to-find-the-perfect-small-business-phone-system-for-your-business) [Directory](https://www.mindstick.com/forum/226/how-to-get-application-directory-using-c-sharp-csharp), Machine [Name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) and [Processor](https://www.mindstick.com/news/2830/qualcomm-s-snapdragon-8-gen-3-processor-might-arrive-earlier-than-expected) information using C#. Please give me a solution with example.\
\
thank you

## Replies

### Reply by Anupam Mishra

Here, we are retrieve all information(As specify above) of my computer using this code:

```
try            {                Console.WriteLine("OS Version : " + System.Environment.OSVersion.Platform.ToString());                Console.WriteLine("User Name :" + System.Environment.UserName.ToString());                Console.WriteLine("Version :" + System.Environment.Version.ToString());                Console.WriteLine("Domain Name: " + System.Environment.UserDomainName.ToString());                Console.WriteLine("System Directory : " + System.Environment.SystemDirectory.ToString());                Console.WriteLine("OS Version :" + System.Environment.OSVersion.ToString());                Console.WriteLine("Machine Name: " + System.Environment.MachineName.ToString());                Console.WriteLine("Processor
                                         Info: " + System.Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER")); using (ManagementObjectSearcher win32Proc = new ManagementObjectSearcher("select * from     Win32_Processor"))                {                    foreach (ManagementObject obj in win32Proc.Get())                    {                        Console.WriteLine("Processor: " + obj["Name"].ToString()
                                         +      obj["Manufacturer"].ToString() +                                                          obj["Version"].ToString());                    }                }                        Console.WriteLine();               }            catch (ManagementException e)            {                Console.WriteLine(e);            }
```


---

Original Source: https://www.mindstick.com/forum/33933/how-to-get-information-about-my-computer-name-os-version-path-etc-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
