CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010

    Get CPU model, RAM, Storage space.


    I want to build a simple windows application form and I want to put some hardware information there.
    Can you please tell me how could I get the cpu model and fq, the amount of ram memory and the storage space?

    Thank you

  2. #2
    Join Date
    May 2009
    Bengaluru, India

    Re: Get CPU model, RAM, Storage space.

    To get hardware information, you need to create an object of ManagementObjectSearcher class.
    Collapse :

    ManagementObjectSearcher searcher = new ManagementObjectSearcher(
        "select * from " + Key);
    the Key on the code above, is a variable that is replaced with appropriate data. For example, to get the information of the CPU, you have to replace the Key with Win32_Processor.

    for more info refer this article : http://www.codeproject.com/KB/system...formation.aspx

  3. #3
    Join Date
    Apr 2010

    Re: Get CPU model, RAM, Storage space.

    Wow. Thank you very much vcdebugger. I think I'll get the hand of it, even if I'm a starter in c# programming.

    I also need to send some information to a server. Can you please tell me what's the best way to achieve this? The information are: username, password, and a string that represents the uptime in seconds. I want to make a database with my users and their uptime, make ranks etc.
    I thought of using mysql but it sounds like a security issue.
    Is it possible to work with php for example? http://www.example.com/?login=user&password=pass if ok then http://www.example.com/?uptime=1231232432

    Many thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.