I've made a very simple app for use on a LAN which very simply has 3 fields - username, password, path. The user fills in their login details and the network path they'd like to connect to (eg \\servername\foldername).

The code currently uses the shell command to run a dos command (using net use) which connects to the server using the username & password and then opens that path in explorer.exe.

Nothing fancy.

I'd like to add a VB check which somehow tests whether an authenticated connection to the entered path already exists. If it does a message box is shown, otherwise the connection goes ahead.

Can anyone point me in the right direction?