|
-
Nov 25th, 2009, 07:05 AM
#1
Thread Starter
Member
Get Computer Name
Hi frnds tell me bow to get Computer name in VB.Net. Tell me one thing more that Computer Name & machine Name are same or different?
-
Nov 25th, 2009, 07:18 AM
#2
Re: Get Computer Name
Environment.MachineName:
 Originally Posted by MSDN
Gets the NetBIOS name of this local computer.
-
Nov 25th, 2009, 07:32 AM
#3
Hyperactive Member
Re: Get Computer Name
hey ritu
computer name and machine name are one and the same thing..
you can get your computer name by
Code:
Environment.MachineName.ToString()
regards
MCP, MCTS, Microsoft MVP [Asp.Net/IIS]
For more .NET development tips visit .NET Tips
If the post is useful then please  Rate it
-
Nov 25th, 2009, 08:49 AM
#4
Fanatic Member
ManagePC - the all-in-one PC management and inventory tool
-
Nov 25th, 2009, 09:10 AM
#5
Fanatic Member
Re: Get Computer Name
That is info of computer . refer it :
Code:
lblOsVersion.Text = Environment.OSVersion.ToString
lblUser.Text = Environment.UserName.ToString
lblRuntime.Text = Environment.Version.ToString
lblUptime.Text = Mid((Environment.TickCount / 3600000), 1, 5) & " :Hours"
lblSystemRoot.Text = Environment.SystemDirectory.ToString
lblCompName.Text = Environment.MachineName.ToString
lblCurrentDirectory.Text = Environment.CurrentDirectory.ToString
lblUserDomainName.Text = Environment.UserDomainName.ToString
lblWorkingSet.Text = Environment.WorkingSet.ToString
lblCommandLine.Text = Environment.CommandLine.ToString
For i As Integer = 0 To Environment.GetLogicalDrives.Length - 1
lblGetLogicalDrives.Text += Environment.GetLogicalDrives(i)
lblGetLogicalDrives.Text += " "
Next
'''''''''''''''''
Label1.Text = "User Name"
Label2.Text = "Operating System Version"
Label3.Text = "Computer Name"
Label4.Text = "System Root"
Label5.Text = ".Net Run Time"
Label6.Text = "Up Time"
Label7.Text = "Current Directory"
Label8.Text = "User Domain Name"
Label9.Text = "Working Set"
Label10.Text = "Get Command Line for this Project"
Label11.Text = "Get Logical Drives"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|