Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Find Folders on Computer (VB.NET)

Posted on 2004-04-15
17
Medium Priority
?
1,405 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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 252 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 248 total points
ID: 11094487
If you have admin rights, the computer has a hidden share C$ that is available.

Bob
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

610 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