Solved

Find Folders on Computer (VB.NET)

Posted on 2004-04-15
17
1,389 Views
Last Modified: 2007-12-19
Hello,

I hava a function in VB.NET that returns all the computer names on a network. What I need to accomplish now is to find out if a selected computer has a folder called 'V2K' and they have a System32 folder in there admin folder(WINNT). I this is so, the function should return TRUE.
0
Comment
Question by:b_o_b
  • 7
  • 7
17 Comments
 
LVL 6

Expert Comment

by:DaniPro
ID: 10833230
This is the C# version of your function

private bool VerifyDir(string nomePc)
{
      if (System.IO.Directory.Exists(@"\\" + nomePc + "\v2k") && System.IO.Directory.Exists(@"\\" + nomePc + "\winnt\system32"))
            return true;
      else
            return false;
}
0
 

Author Comment

by:b_o_b
ID: 10833247
Looks good, but whats the VB version???
0
 
LVL 6

Expert Comment

by:DaniPro
ID: 10833272
... and this is the VB.NET version

Private Function VerifyDir(ByVal nomePc As String) As Boolean
    If (System.IO.Directory.Exists("\\" & nomePc & "\vc") And System.IO.Directory.Exists("\\" & nomePc & "\winnt\system32")) Then
        VerifyDir = True
    Else
        VerifyDir = False
    End If
End Function
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:b_o_b
ID: 10833650
This looks good BUT when i try it, it freezes the program?!? Im using computer names in the same workgroup as mine ex - "charles"
0
 
LVL 6

Expert Comment

by:DaniPro
ID: 10833794
The bottlecheck could be the net ....
I suggest you to verify for one or two computers and then increase the number of computers for testing the response of the net.
0
 

Author Comment

by:b_o_b
ID: 10833815
I am checking with just one computer.
0
 

Author Comment

by:b_o_b
ID: 10833816
I am checking with just one computer.
0
 
LVL 6

Expert Comment

by:DaniPro
ID: 10833850
If you browse that computer with Explorer, does it response quickly or slowky?
0
 

Author Comment

by:b_o_b
ID: 10833869
No, it seems to be find....
0
 
LVL 6

Expert Comment

by:DaniPro
ID: 10833930
Do you have tried with another pc? Try, before of all, with explorer (I suggest you to find it digiting the name)
0
 

Author Comment

by:b_o_b
ID: 10843132
Fucntion works, BUT, I dont think its applys to folders that are not shared......
How would I see non-shared folders?
0
 
LVL 6

Expert Comment

by:DaniPro
ID: 10843235
I'm sorry, but if a pc doesn't shred his folders, you have nothing hope to see them.
0
 

Author Comment

by:b_o_b
ID: 10859413
What if I go through the admin?
0
 
LVL 6

Accepted Solution

by:
DaniPro earned 63 total points
ID: 10859584
I'm sorry, if a pc doesn't share his folders, it is impossible for everyone (included the netword Administrator) see them.
If you are not sure that your client share them folders you must look for a different solution.
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 62 total points
ID: 11094487
If you have admin rights, the computer has a hidden share C$ that is available.

Bob
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now