Solved

Find Folders on Computer (VB.NET)

Posted on 2004-04-15
17
1,393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…

734 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