TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
keenweng2001
NA
27
0
DirectoryServices
Jun 15 2004 7:47 AM
i have some problem with the code below, i able to get the workgroup name and computers connected under the workgroup but what i do not understand is , Is the WinNT is a directory?where can i find it in my system? i am using WINXP pro. Dim childEntry As DirectoryEntry Dim ParentEntry As New DirectoryEntry Try ParentEntry.Path = "WinNT:" For Each childEntry In ParentEntry.Children Dim newNode As New TreeNode(childEntry.Name) Select Case childEntry.SchemaClassName Case "Domain" Dim ParentDomain As New TreeNode(childEntry.Name) TreeView1.Nodes.AddRange(New TreeNode() {ParentDomain}) Dim SubChildEntry As DirectoryEntry Dim SubParentEntry As New DirectoryEntry SubParentEntry.Path = "WinNT://" & childEntry.Name For Each SubChildEntry In SubParentEntry.Children Dim newNode1 As New TreeNode(SubChildEntry.Name) Select Case SubChildEntry.SchemaClassName Case "Computer" ParentDomain.Nodes.Add(newNode1) End Select Next End Select Next Catch Excep As Exception MsgBox("Error While Reading Directories") Finally ParentEntry = Nothing End Try
Reply
Answers (
0
)
AddMetafileComment method ?
Screen resolution