Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I get hardware and software that computers on network have? 1

Status
Not open for further replies.

rresendez

Programmer
Mar 14, 2005
40
US
Is there any way that I can program Visual FoxPro to gather all hardware and software from each computer on a network for inventory purposes? I would want to put the infor into a database file and then use the database for a check in and check out of the inventory.

Thanks,
Ramon
 
Ramon

1. Yes, WMI (Windows Management instrumentation) would help you do that, but there isn't anything written to "do it all" for you, you would have to build it yourself.
2. You would also need to install WMI on your server.
3.And WMI needs to run locally mostly, in otherwords it would give you the information it is running on currently.
For example here is a snippet that retrieves the prceesor type of a computer.
Code:
lcComputer = "."
Clear
loWMIService = Getobject("winmgmts:\\" + lcComputer + "\root\cimv2")
loProcessor = loWMIService.Get("win32_Processor='CPU0'")
Do Case
Case loProcessor.Architecture = 0
	?"This is an x86 computer."
Case  loProcessor.Architecture = 1
	?"This is a MIPS computer."
Case  loProcessor.Architecture = 2
	?"This is an Alpha computer."
Case loProcessor.Architecture = 3
	?"This is a PowerPC computer."
Case loProcessor.Architecture = 6
	?"This is an ia64 computer."
Otherwise
	? "The computer type could not be determined."
Endcase




Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike Gagnon,

You are always so helpful. I will look more into WMI. A star for your help.

Thanks again,
Ramon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top