Login
Top Members
Silverlight User
Ask Questions
Articles
Forums
FAQs
Groups
About Us
Microsoft
Articles
Forums
FAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services
Web Programming
Articles
Forums
FAQs
JavaScript
ASP
ASP.NET
Web Services
Non-Microsoft
Articles
Forums
FAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source
Databases
Articles
Forums
FAQs
SQL Server
Access
Oracle
MySQL
Other Databases
Office
Articles
Forums
FAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money
Operating Systems
Articles
Forums
FAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX
Server Platforms
Articles
Forums
FAQs
BizTalk
Site Server
Exhange Server
IIS
Graphic Design
Articles
Forums
FAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web
Other
Articles
Forums
FAQs
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes
Getting PC information
By J S
Printer Friendly Version
View My Articles
15 Views
This project(PCinfo) is about getting PC or System information from the system such as operating system ,Domain name ,logical Drives, IP address and Environment Variables.
I have used System class and Environment class.
List of name space used in the project
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using Microsoft.Win32;
using System.Collections;
private void Form1_Load(object sender, EventArgs e)
{
// I am displaing the information in a label so that it is esay to read .
// just place 5 labels in the form and call this code.
// This line is for getting the system directory
label1.Text = Environment.SystemDirectory;
// This line is for getting the Machine name
label2.Text = Environment.MachineName;
// This line is for getting the system directory (where this project is located)
label3.Text = Environment.CurrentDirectory;
// // This line is for getting the OS version
label4.Text = Environment.OSVersion.ToString();
IDictionary environmentVariables = Environment.GetEnvironmentVariables();
string str2 = "";
string str3 = "";
foreach (DictionaryEntry de in environmentVariables)
{
str2 = de.Key.ToString();
str3 = str3 + str2 + " , ";
}
label5.Text = str3;
}
Hope this helps,
Cheers,
Jay
EBCDIC Encoding with .NET
Standard Deviation in .NET ( STDEVPA )
In - Memory Data Compression with .NET PART II
Power of Reflection: Creating an Object Factory
Dr. Dotnetsky's Cool .NET Tips and Tricks # 5
Article: Getting PC information
J S
posted at Monday, September 11, 2006 5:55 AM
Feel free comment or ask a question.