4

In Windows 7 and Windows Server 2008, is there a way to quickly detect if the target of a symbolic link is available?

For example, a symbolic link is created to a remote share UNC using the following command,

mklink /D c:\test \\remote-server\share

Now, if the remote share can no longer be reached (for example, the remote server is shutdown), attempting to access c:\test can take a number of seconds to timeout and fail. Eventually, Windows will display an error saying that the target is not available. Specifically, dir c:\test will output "File Not Found", cd /D c:\test will output "The network path was not found.", and Windows explorer will show an error stating "The specified network name is no longer available".

Is there a way to check the availability of c:\test without incurring that long timeout, or can the timeout value be adjusted?

  • 1
    The timeout can probably be adjusted, but not removed entirely. I don't know how to adjust it, but I would be careful not to set it too low or it will kill legitimate connections – Darth Android Jun 15 '11 at 20:06
  • Good question +1, did you find out how to adjust it (the timeout)? Exactly the same issue for me. – Horst Walter Sep 10 '12 at 8:33
  • 1
    @HorstWalter Sorry, I haven't found an answer yet. I would appreciate it if you post any additional information you find. Thanks! – John McCarthy Sep 10 '12 at 17:26
  • 1
    Will do, but this seems obviously a tricky one. Also questions with UNC path / timeout do not have answers: serverfault.com/questions/253690/… – Horst Walter Sep 10 '12 at 22:53
  • @HorstWalter good link that sparked a thought. I've posted an answer there: serverfault.com/a/426522/96889. Give that a try. If it works, I can post a referral answer here. – John McCarthy Sep 11 '12 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.