Thread: Pull system information and compare.

  1. #1
    Registered User
    Join Date
    Feb 2014
    Posts
    6

    Pull system information and compare.

    Hello, this is my first post on this forum- So it will be somewhat of a greetings thread aswell i guess. Hello cboard!

    Anyway, I'm fairly new to programming and I've been looking around for guidelines on how to pull system information and compare it's results with a predefined list.

    I know the second part, I just need some guidelines on how to pull system information. Like what CPU/GPU/Motherboard the system that the program is run on has.

    Note: I'm not asking anyone to write this for me, just to point me in the right direction on how to do this.

    *Edit: If there is already a post on this feel free to redirect me there, because i can't find any.
    Last edited by pixalen; 02-09-2014 at 07:18 PM.

  2. #2
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    What operating system are you using?

  3. #3
    Registered User
    Join Date
    Feb 2014
    Posts
    6
    Quote Originally Posted by DeadPlanet View Post
    What operating system are you using?
    Windows 7 & 8.
    From looking further into this I'm not even sure if it is possible.

  4. #4
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    When you open up the device manager you can see a list of your hardware. Therefore it's possible.

    It's just a matter of how easy/accessible it is.

  5. #5
    Registered User
    Join Date
    Feb 2014
    Posts
    6
    Quote Originally Posted by DeadPlanet View Post
    When you open up the device manager you can see a list of your hardware. Therefore it's possible.

    It's just a matter of how easy/accessible it is.
    Hmm. Well, I'm still trying to figure this out..

  6. #6
    Registered User
    Join Date
    Feb 2014
    Posts
    6
    Figured out a way haha, sorry for useless thread.

    Was able to use sys/utsname.h and uname_pointer


    *edit: apparently that is *nix only.
    More information if you are interested can be found here:
    http://www.c-program-example.com/201...formation.html
    Last edited by pixalen; 02-09-2014 at 08:37 PM.

  7. #7
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,907
    Quote Originally Posted by pixalen View Post
    Figured out a way haha, sorry for useless thread.

    Was able to use sys/utsname.h and uname_pointer
    Not useless! Actually, posting a wee bit more info, like where you found that info, the documentation for said function, a small example code, etc, would be immensely helpful for the next person who comes looking through our forum for answers to the same question.

  8. #8
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    HKLM\SYSTEM\CurrentControlSet\Enum Registry Tree (Windows Drivers)

    This should help. Use regedit and have a look under there to see if it has the information you're looking for. There are many functions for accessing the registry once you find where the information is.

  9. #9
    Registered User
    Join Date
    Feb 2014
    Posts
    6
    Quote Originally Posted by anduril462 View Post
    Not useless! Actually, posting a wee bit more info, like where you found that info, the documentation for said function, a small example code, etc, would be immensely helpful for the next person who comes looking through our forum for answers to the same question.
    Added link to where i found the information, they also offer explanations on different ways to use it. Albeit it's for *nix.

    Quote Originally Posted by DeadPlanet View Post
    HKLM\SYSTEM\CurrentControlSet\Enum Registry Tree (Windows Drivers)

    This should help. Use regedit and have a look under there to see if it has the information you're looking for. There are many functions for accessing the registry once you find where the information is.
    Okay, will look into accessing the registry. Kind of new to C as you might notice

    Thanks for the kind responses, everywhere else I've asked they have literally told me to "gtfo skid".


    *edit: Is there like a website where i can read more in depth information about different libraries and functions?
    Or do i need to get books for that?
    Last edited by pixalen; 02-09-2014 at 08:43 PM.

  10. #10
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    For all the popular and well-known libraries there tends to be freely available documentation available online or otherwise. There are sometimes books which provide a sort of walkthrough introduction to the topic. For example all of the Windows API is documented at MSDN but that's not an easy way to step into it. A good introductory book (although it might be slightly old now, it's good for basics) for the Windows API is Petzold's Programming Windows.

    For this particular application unless you really want to use a GUI you don't really need to know THAT much about the Windows API. Just the registry access functions are required (Registry Functions (Windows)) and they are fairly simple so long as you have a decent grasp of C.

  11. #11
    Registered User
    Join Date
    Feb 2014
    Posts
    6
    Quote Originally Posted by DeadPlanet View Post
    For all the popular and well-known libraries there tends to be freely available documentation available online or otherwise. There are sometimes books which provide a sort of walkthrough introduction to the topic. For example all of the Windows API is documented at MSDN but that's not an easy way to step into it. A good introductory book (although it might be slightly old now, it's good for basics) for the Windows API is Petzold's Programming Windows.

    For this particular application unless you really want to use a GUI you don't really need to know THAT much about the Windows API. Just the registry access functions are required (Registry Functions (Windows)) and they are fairly simple so long as you have a decent grasp of C.
    Will probably go check out that book, since I'm in the process of learning C and have no literature to fall back on. (hence posting here )

    I'm not going to have any GUI. The plan is to be able to pull hardware information and operating system information and then compare it to a list of hardware/OS
    and if returned true execute another program. Basically a way to check if the computer is capable of running a certain game with it's current hardware/os.

  12. #12
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    Quote Originally Posted by pixalen View Post
    Will probably go check out that book, since I'm in the process of learning C and have no literature to fall back on. (hence posting here )
    It's been a long time since I've read that book but I'd imagine it assumes at least intermediate knowledge of C.

    If you don't have a decent grasp of at least pointers you should probably hold off on that book until you do.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting system information
    By DimensionX in forum C Programming
    Replies: 3
    Last Post: 10-09-2009, 12:12 PM
  2. System Information in C++
    By 333 in forum C++ Programming
    Replies: 1
    Last Post: 06-08-2008, 03:04 AM
  3. System information.
    By X3no in forum C++ Programming
    Replies: 10
    Last Post: 09-19-2007, 04:49 PM
  4. Getting information on system
    By sean in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2003, 03:36 PM
  5. how to pull system time, date, etc from <ctime>
    By Matt in forum C++ Programming
    Replies: 1
    Last Post: 09-25-2001, 09:08 AM