silverspecv
Programmer
I have code that checks to make sure a certain share is on the network before doing some stuff, so I have a block that includes this:
It works in the IDE, and it sometimes works from the compiled and installed application, but sometimes it fails for seemingly no good reason. It will popup the failure message box saying "\\blah blah can't be reached" etc, but I click start->run and type in the UNC and it pops right up.. I even stored the server share name in a string and used that string in the exists() as well as the msgbox() to make sure I'm comparing apples to apples, and I just can't figure it out.. Any idea why it is so hit-or-miss??
Code:
Dim dir1 As System.IO.Directory
if dir1.Exists("\\server\share") then blahblah()
It works in the IDE, and it sometimes works from the compiled and installed application, but sometimes it fails for seemingly no good reason. It will popup the failure message box saying "\\blah blah can't be reached" etc, but I click start->run and type in the UNC and it pops right up.. I even stored the server share name in a string and used that string in the exists() as well as the msgbox() to make sure I'm comparing apples to apples, and I just can't figure it out.. Any idea why it is so hit-or-miss??