Solved

Find Folders on Computer (VB.NET)

Posted on 2004-04-15
17
1,385 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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:…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

12 Experts available now in Live!

Get 1:1 Help Now