SIGN UP MEMBER LOGIN:    
ARTICLE

Getting System Information

Posted by azwardurrani Articles | Enterprise Development September 26, 2002
The attached source code returns the system information for your machine such as machine name, operating system, current user and logical drives.
Reader Level:
Download Files:
 

The attached source code returns the system information for your machine such as machine name, operating system, current user and logical drives.

//Gives the Directory which is using by ur system
lbl13.Text=Environment.CurrentDirectory;
//Shows u the system Directory
lbl12.Text=Environment.SystemDirectory;
//show the version of the system
lbl11.Text=Convert.ToString(Environment.Version);
lbl10.Text=Convert.ToString(Environment.OSVersion);
//Shows the Machine Name
lbl9.Text=Environment.MachineName;
lbl8.Text=Convert.ToString(Environment.WorkingSet);
//Command Line Arguments
string [] args=Environment.GetCommandLineArgs();
for (int x=0;x<args.Length;x++)
{
MessageBox.Show(args[x],"Command Line Arguments",MessageBoxButtons.OK,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,MessageBoxOptions
.ServiceNotification);
}
//Logical Drives
string []drives=Environment.GetLogicalDrives();
for(int x=0;x<drives.Length;x++)
{
MessageBox.Show(drives[x],"LogicalDrives",MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
// Display the Current User Name
MessageBox.Show(Environment.UserName,"Current User Name",MessageBoxButtons.OK,MessageBoxIcon.Information);
lbl16.Text=Environment.StackTrace;
//Shows the Domain name of the system
lbl18.Text=Environment.UserDomainName;

Login to add your contents and source code to this article
share this article :
post comment
 

Can u tell me hoe to get system information like machine name ,os size of hard disc, etc of client machine from server machine connected in LAN in c#.net ??? size of hard disc must be there...pls...tell me as fast as possible...

Posted by priyanka matani Jan 26, 2012

how can i get the selected item in the listview?

Posted by hussein alwajeeh Apr 25, 2009
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Team Foundation Server Hosting
Become a Sponsor