473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

System information via vb.net???????????????????????????????

How can I get the System Information via vb.net? At a minimum, I need
that data supplied in Start|All Programs|Accessories|System
Tools|System Information and, preferably the Office Applications
subheader.

Thanks in advance,

John
Nov 20 '05 #1
13 1650
Alot of the system information can be collected by using WMI, make a search for the system.management namespace or WM

GW
Nov 20 '05 #2
Can you explain that in simpler term, perhaps a code snippet? I'm
pretty much of a newbie.

Thanks,
John
Nov 20 '05 #3
Hi John,

Below code will give you so much system information that it will knock your
socks off:
Dim s As String = _

Registry.LocalMachine.OpenSubKey( _

"SOFTWARE" _

).OpenSubKey( _

"Microsoft" _

).OpenSubKey( _

"Shared Tools" _

).OpenSubKey( _

"MSINFO" _

).GetValue( _

"Path", _

"" _

)

If File.Exists(s) Then

Process.Start(s)

End If

HTH,

Bernie Yaeger

"John T. Howard" <jo*************@comcast.net> wrote in message
news:1t********************************@4ax.com...
How can I get the System Information via vb.net? At a minimum, I need
that data supplied in Start|All Programs|Accessories|System
Tools|System Information and, preferably the Office Applications
subheader.

Thanks in advance,

John

Nov 20 '05 #4
Here are some information on collecting drive information through WM

---------------------------------------------------------------------------------
GetDriveSerialNumber - Retrieving the serial number of the specified driv
' Retrieve the serial number of the specified driv
' Note: requires a reference to the System.Management assembl
' Example: MessageBox.Show(GetDriveSerialNumber("D"c)

Function GetDriveSerialNumber(ByVal driveLetter As Char) As Strin
Dim driveFilter As String = "Win32_LogicalDisk=""" & driveLetter.ToString &
":""
Dim drive As New System.Management.ManagementObject(driveFilter
Return drive("VolumeSerialNumber"
End Functio
-----------------------------------------------------------------------------------
GetDriveLabel - Retrieving the label of the specified driv
' Retrieve the drive name (label) of the specified driv
' Note: requires a reference to the System.Management assembl
' Example: MessageBox.Show(GetDriveLabel("D"c)

Function GetDriveLabel(ByVal driveLetter As Char) As Strin
Dim driveFilter As String = "Win32_LogicalDisk=""" & driveLetter.ToString &
":""
Dim drive As New System.Management.ManagementObject(driveFilter
Return drive("VolumeName"
End Function
Nov 20 '05 #5
Hi Bernie,

Have once a look to that information path Glen gives, that will knock really
your socks of

:-)

Cor
Nov 20 '05 #6
Hi Cor,

I don't find the system.management namespace - am I missing something?

Bernie

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uj**************@TK2MSFTNGP12.phx.gbl...
Hi Bernie,

Have once a look to that information path Glen gives, that will knock really your socks of

:-)

Cor

Nov 20 '05 #7
Hi Bernie,

It is a great namespace, you can get almost everything about a computer and
the OS you never know before.

With this sample you get a disk serial number I think this sample is from
Ken (his style). However the possibilties are endless (do not forget to look
at the link I pasted bellow).

\\\
Imports System.Management
..
Dim disk As New ManagementObject("Win32_LogicalDisk.DeviceID=""C:" "")
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine("{0} = {1}", diskProperty.Name, diskProperty.Value)
Next diskProperty
///

And see this link, than you see it even more I think.

http://msdn.microsoft.com/library/de...classtopic.asp

Success

Cor
Nov 20 '05 #8
All of this is great stuff, but I don't see how to get CPU type and
speed, amount of physical memory, number and size of hard drives, etc.

Am I missing something?

Please keep it simple.

Thanks,

John

Nov 20 '05 #9
Hi John,

Look at the thread from Bernie, there I have put this in, however it is not
simple to get.

(When you know how it is of course simple)

Cor
Nov 20 '05 #10
Hi Cor,

I believe you that it's a great namespace, but I don't have it! When I try
imports system. management is not a class in the namespace!

Bernie

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OR**************@TK2MSFTNGP12.phx.gbl...
Hi Bernie,

It is a great namespace, you can get almost everything about a computer and the OS you never know before.

With this sample you get a disk serial number I think this sample is from
Ken (his style). However the possibilties are endless (do not forget to look at the link I pasted bellow).

\\\
Imports System.Management
.
Dim disk As New ManagementObject("Win32_LogicalDisk.DeviceID=""C:" "")
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLine("{0} = {1}", diskProperty.Name, diskProperty.Value)
Next diskProperty
///

And see this link, than you see it even more I think.

http://msdn.microsoft.com/library/de...classtopic.asp
Success

Cor

Nov 20 '05 #11
Glenn:

When you say "Note: requires a reference to the System.Management
assembly" , what exactly does that mean?

Thanks,

John

Nov 20 '05 #12
Go to the referances section of you project and sellect add referance, then add the system.management.dll, this will allow you to use WMI
Nov 20 '05 #13
Hi Oops,

Sorry Bernie, I thought you know this or is there something else wrong.

You have to set a reference to System.Management for it.

Cor
Nov 20 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Phil Stanton | last post by:
When designing a new form or report, the Default ForeColor is often something like -2147483640 which is the colour of Windows text (possibly black) and the default backColor is -2147483643...
6
by: Markus Wildgruber | last post by:
Hi! How can I get information about the system my application is running on? I found the System.Environment class that provides me with some of the desired information but some of them not in...
3
by: Karl Hungus | last post by:
A cs file I compiled into an assembly dll is in my bin directory. In the cs file I have a using statement for System.Xml I compiled it using this command: csc /out:XmlContent.dll /t:library...
1
by: Olav Tollefsen | last post by:
I get the included error message when trying to run my ASP.NET application under Windows Server 2003 (with all updates installed). How can I troubleshoot this? Olav File or assembly name...
1
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
0
by: Gursharan | last post by:
Hi, I get this error after I did a load test on my website (500 constant user load in team system for 35 minutes). This error is logged after about 1 minute of load testing and is logged every...
8
by: Henrik | last post by:
Hi Is there any way to see what the System process is doing? We have developed an application running at a production site to measure and optimize the production. The application needs to be...
0
by: howardr101 | last post by:
Hi, Have hunted around on the groups and can't find anything, hence. I've tried this against 2 mail servers (mailtraq and hmailserver) and it occus with both. The problems seems to be that...
1
by: keke3905 | last post by:
I really would appreciate some help on this assignment. I need to make GUI boxes to display the system info such as on Microsoft Office. I have some code but not sure where to go with the rest of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.