Retrieve local registry using .NET Registry.class namespace

A how-to code example from ASPFree.

Contributed by
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
April 03, 2003
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement

Dim options As New ConnectionOptions()
options.Username "DomainUserId"
options.Password "password"

Dim scope As New ManagementScope("ServerName
ootcimv2"
options)
Dim strSVCquery As String ConfigurationSettings.AppSettings("NICquery")

Dim objNICQuery As New WqlObjectQuery(strSVCquery)
Dim objNICsearcher As New ManagementObjectSearcher(scopeobjNICQuery)

Dim envVar As New ManagementObject()

Dim objNICItem As PropertyData
Dim strNICColName 
As String

scope
.Connect()
For 
Each envVar In objNICsearcher.Get
        
For Each objNICItem In envVar.Properties
            strNICColName 
objNICItem.Name
            
If Not IsArray(objNICItem.ValueThen
                Console
.WriteLine("Item is NOT an array -- " strNICColName)
            Else
                
Console.WriteLine("Item is an array -- " strNICColName)
            
End If
        
Next
Next

blog comments powered by Disqus
CODE EXAMPLES ARTICLES

- Bipartite Graphs
- Connectivity in Graphs
- The Ford-Fulkerson Algorithm
- Critical Paths
- The Bellman-Ford and Roy-Floyd Algorithms
- Shortest Path Algorithms in Graphs
- Minimum Spanning Tree
- Articulation Edges and Vertexes
- Circles and Connectivity in Graphs
- Depth-First Search in Graphs
- Breadth-First Search in Graphs
- The Prufer Code and the Floyd-Warshall Algor...
- An Insight into Graphs
- Coding a Custom Object with WSC
- Creating a Custom Object with WSC

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials