by
455 17
0
5
3,274
1
Top 1% !
Famous
Easy-to-find
Specified
OpenSource
Popularity: 4277th place
Languagevb
LicenseMIT_X11
OSWindows

Retrieve System Characteristics

Windows System Information Function
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1523351/Retrieve-System-Characteristics?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
Public Function RetrievePCInfo() As DataTable Dim DT As New DataTable DT.Columns.Add("Class") DT.Columns.Add("Name") DT.Columns.Add("Value") Dim search3 As New ManagementObjectSearcher("SELECT * FROM meta_class") Dim info3 As New ManagementObject For Each info3 In search3.Get Dim search4 As New ManagementObjectSearcher("SELECT * FROM " & info3("__CLASS").ToString) Dim Squerysearch4 As String = search4.Query.QueryString.ToString Dim info4 As New ManagementObject For Each info4 In search4.Get For Each Prop As PropertyData In info4.Properties DT.Rows.Add(info3("__CLASS").ToString, Prop.Name, Prop.Value) Next Next Next Return DT End Function ' Beware this of code requires a large amount of RAM. ' Recommended to Extract all classes first and then for each class retieve the values. ' info class from motherboard is Win32_Bios ' info class from CPU is Win32_Prosessor
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus