1

I'm writing a program to maintain computers at my workplace. I want to use msinfo32 to automatically collect system information about computers in network remotely and use this data in my program.

The only way I found is to manually connect using interface of msinfo32, export all data and then parse it with my program. But I want to improve this process and do it automatically, update all info automatically etc.

Is there any way I could collect all pc info remotely using msinfo32 from inside of my program?

Please, send me link to how-to with code examples, or explain why I can not do this or how I could.

Sorry for my english, thank you for your attention.

UPD: possibly, I can run msinfo32.exe from inside, but I rather use library than running external program in cmd.

3 Answers3

2

Depends on what exactly do you need to gather. You have some WinApi functions and classes that can give you the system info. GetSystemInfo() or Computer System Hardware Classes But I think it's not that bad to use msinfo32.exe directly if it works.

Hitokage
  • 733
  • 8
  • 19
  • 1
    I thought a little bit and came to a solution. Possibly, it will make my program more cross-platform. What if I will not include this part of work inside of my program, but just include parser of some json doc, for example. And on the other hand I will provide platform-specific utilities or scripts to get hardware info and make correct json-file. What do you think about this approach? – Nikolay Zhulikov Jul 20 '15 at 09:05
  • Yes it's possible of course. But you need to think about how large your network or computer's group is, what OS do you use and basically is it worth it? :D – Hitokage Jul 20 '15 at 09:20
  • Yep, I think it is worth it. Number of computers is up to ~300 approximately. And all of them are distributed on the territory with large area (~1km^2). Huh, so I prefer to collect all info remotely and automatically rather than running around like a crazy :) – Nikolay Zhulikov Jul 20 '15 at 09:27
  • I see :D Yea so I think the scripts would work just fine. – Hitokage Jul 20 '15 at 09:54
0

You can't. You should use WINAPI functions, because msinfo32 does not provide console output interface, which could be best solution.

Related: How do I get hardware info such as CPU name, total RAM, etc. with VB6?

You can also use registry keys to check any system settings, all documentation is in the net. Getting system information using registry is not reliable, though.

Msinfo32 documentation

Community
  • 1
  • 1
Croll
  • 3,631
  • 6
  • 30
  • 63
0

I don't know if in 2015 there was already the "/nfo" option that allows you to have all the results exported to a file. So just execute:

msinfo32 /nfo "c:\delme\msinfo32.nfo"

and then, via XML, read the desired results.

Zio3D
  • 1
  • 1