Getting basic settings from PC

  • Thread starter Thread starter Paul Bromley
  • Start date Start date
P

Paul Bromley

I thought that it would be very easy to get basic settings from a PC such as
OS version, amount of free disk space, computer name, memory, processor etc,
but this sodes not seem as easy as I thought. I can get quite a bit using
System. Environment, but I am unsure how to obtain the amount of system
memory and the processor. I am also surprised that I cannot get XP
directly - merely NT5x.


Best wishes

Paul Bromley
 
I thought that it would be very easy to get basic settings from a PC
such as OS version, amount of free disk space, computer name, memory,
processor etc, but this sodes not seem as easy as I thought. I can get
quite a bit using System. Environment, but I am unsure how to obtain
the amount of system memory and the processor. I am also surprised
that I cannot get XP directly - merely NT5x.


Use Windows Management Interface.
http://www.freevbcode.com/ShowCode.asp?ID=4571
 
Hi paul
You can use the garbage collector object to get info about memory the GC
is a global object that handle managed garbage collection and it exposes
many useful static functions, For total memory use the garbage collection
method GC.GetTotalMemory(true).
As for the processor , you need to call the GetSystemInfo API.
Hope that helps and best wishs to you :-)
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Back
Top