How can I get the System Information via vb.net? At a minimum, I need
that data supplied in Start|All Programs|Access ories|System
Tools|System Information and, preferably the Office Applications
subheader.
Thanks in advance,
John 13 1676
Alot of the system information can be collected by using WMI, make a search for the system.manageme nt namespace or WM
GW
Can you explain that in simpler term, perhaps a code snippet? I'm
pretty much of a newbie.
Thanks,
John
Hi John,
Below code will give you so much system information that it will knock your
socks off:
Dim s As String = _
Registry.LocalM achine.OpenSubK ey( _
"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.c om... How can I get the System Information via vb.net? At a minimum, I need that data supplied in Start|All Programs|Access ories|System Tools|System Information and, preferably the Office Applications subheader.
Thanks in advance,
John
Here are some information on collecting drive information through WM
---------------------------------------------------------------------------------
GetDriveSerialN umber - Retrieving the serial number of the specified driv
' Retrieve the serial number of the specified driv
' Note: requires a reference to the System.Manageme nt assembl
' Example: MessageBox.Show (GetDriveSerial Number("D"c)
Function GetDriveSerialN umber(ByVal driveLetter As Char) As Strin
Dim driveFilter As String = "Win32_LogicalD isk=""" & driveLetter.ToS tring &
":""
Dim drive As New System.Manageme nt.ManagementOb ject(driveFilte r
Return drive("VolumeSe rialNumber"
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.Manageme nt assembl
' Example: MessageBox.Show (GetDriveLabel( "D"c)
Function GetDriveLabel(B yVal driveLetter As Char) As Strin
Dim driveFilter As String = "Win32_LogicalD isk=""" & driveLetter.ToS tring &
":""
Dim drive As New System.Manageme nt.ManagementOb ject(driveFilte r
Return drive("VolumeNa me"
End Function
Hi Bernie,
Have once a look to that information path Glen gives, that will knock really
your socks of
:-)
Cor
Hi Cor,
I don't find the system.manageme nt namespace - am I missing something?
Bernie
"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:uj******** ******@TK2MSFTN GP12.phx.gbl... Hi Bernie,
Have once a look to that information path Glen gives, that will knock
really your socks of
:-)
Cor
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.Manageme nt
..
Dim disk As New ManagementObjec t("Win32_Logica lDisk.DeviceID= ""C:""")
Dim diskProperty As PropertyData
For Each diskProperty In disk.Properties
Console.WriteLi ne("{0} = {1}", diskProperty.Na me, diskProperty.Va lue)
Next diskProperty
///
And see this link, than you see it even more I think. http://msdn.microsoft.com/library/de...classtopic.asp
Success
Cor
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 (possibly white)
Can anyone tell me how to convert these colours to either RGB colours or the
Long number used by Access. Black is 0 and White is 16777215
...
|
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 the form I want.
For example, you can get the OS-version but when using ToString() to do the
user output, it returns 'Microsoft Windows NT 5.1.2600.0' when running on
Windows XP Professional.
Is there a way to get a user-understandable string like...
|
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
XmlContent.cs
When I run my aspx page, which has a codebehind that instantiates the object
from in my assembly, I get the following error, anyone know why?
File or assembly name System.Xml, or one of its dependencies, was not found.
|
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 System.Xml, or one of its dependencies, was not found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
|
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 this??):
System.Diagnostics.Trace.WriteLine(System.DateTime.Now.ToLongTimeString()+
"--" + dirException.ToString());
System.Diagnostics.Trace.Flush();
((System.Diagnostics.TraceListener)
System.Diagnostics.Trace.Listeners).Close();
| |
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 this error?
Oracle error occurred, but error message could not be retrieved from Oracle.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the...
|
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 60 seconds. Any ideas?
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 30/07/2006 21:56:12
Event time (UTC): 30/07/2006 20:56:12
|
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 responsive at all times
during production.
I'm experiencing some problems with my application not responding or
responding slow. I suspeced the problem had to do with high CPU utilization
|
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 when the SMTPClient attaches to the
server and the server sends it greeting message, if anything other than
+OK is received by the client it throws an exception and falls over.
|
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 it. Help please. I will also include instructions that I was given.. I am working in JGrasp environment with Java.
In order to tuning programs to meet the hardware requirements and provide optimal performance, it is very important to retrieve...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |