How can I view the system information ??

Recommended Answers

All 7 Replies

***Disregard this***

Use WMI

If you are using 2005 then use the My function.
My.Computer. will give you a list of things on or about your computer.

here is some vb 2003 code (net 1.1) to get inforamtion

Dim version As String
Dim build As String
Dim nt As Boolean
Dim ce As Boolean
Dim dos As Boolean
sysroot.Text = "System Root: " & Environment.GetFolderPath(Environment.SpecialFolder.System).ToString
domain.Text = "User: " & Environment.UserName.ToString & " on " & Environment.MachineName.ToString
Select Case Environment.OSVersion.Platform
Case PlatformID.Win32S
version = "Windows 3.x - Version "
Case PlatformID.Win32Windows
Select Case Environment.OSVersion.Version.Minor
Case 0
version = "Windows 95"
dos = True
Case 10
version = "Windows 98"
dos = True
Case 90
version = "Windows ME"
dos = True
Case Else
version = "Unknown Windows 9x Version "
dos = True
End Select
Case PlatformID.Win32NT
Select Case Environment.OSVersion.Version.Major
Case 3
version = "Windows NT 3.51"
nt = True
Case 4
version = "Windows NT 4"
nt = True
Case 5
Select Case Environment.OSVersion.Version.Minor
Case 0
version = "Windows 2k"
nt = True
Case 1
version = "Windows XP"
nt = True
Case 2
version = "Windows Server 2003"
nt = True
Case Else
version = "Unknown Windows NT Version"
nt = True
End Select
Case Else
version = "Unknown Windows NT Version"
nt = True
End Select
Case PlatformID.WinCE
version = "Windows CE / PocketPC"
ce = True
Case Else
version = "Unknown Windows CE Version"
ce = True
End Select
If nt = True Then
build = "NT " & Environment.OSVersion.Version.Major.ToString & "." & Environment.OSVersion.Version.Minor.ToString & " - Build " & Environment.OSVersion.Version.Build.ToString
ElseIf ce = True Then
build = "CE " & Environment.OSVersion.Version.Major.ToString & "." & Environment.OSVersion.Version.Minor.ToString & " - Build " & Environment.OSVersion.Version.Build.ToString
ElseIf dos = True Then
build = "Windows " & Environment.OSVersion.Version.Major.ToString & "." & Environment.OSVersion.Version.Minor.ToString & " - Build " & Environment.OSVersion.Version.Build.ToString
Else
version = version
End If
 
winver.Text = version
winbuild.Text = build

It will display the info lile in the picture

If you are using 2005 then use the My function.
My.Computer. will give you a list of things on or about your computer.

Is there an equivalent MY option in VB2003 .net?

no, you have to do what i did.

i want documentation fully about this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.