|
-
Jun 24th, 2007, 12:49 PM
#1
Thread Starter
Junior Member
[RESOLVED] Checking if network connection exists
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?
-
Jun 24th, 2007, 01:21 PM
#2
Thread Starter
Junior Member
Re: Checking if network connection exists
Hmm, been trying to do some searching on this and best I've found is the WinHttpReq- I have this reference selected - can I check if an authenticated session already exists using this library?
-
Jun 24th, 2007, 09:18 PM
#3
Re: Checking if network connection exists
Why would you ever need this?
Most LANS have all computers in the same domain or workgroup. All workgroup computers are supposed to have every User defined on each machine.
No need to do "Net Use" to join a foreign domain/workgroup then unless you are supporting multiples on the same LAN infrastructure. Not very common.
-
Jun 25th, 2007, 10:56 AM
#4
Thread Starter
Junior Member
Re: Checking if network connection exists
This is for rather a large network. Each server we connect to we have to authenticate. I am trying to make a little solution whereby I can enter auth details once, the info stays in the relevant fields and then I keep changing the Path field according to the server I'd like to connect to.
Maybe I was a bit misleading with LAN.
I'd like to be able to create a session with each server and give a message if a session already exists (not necessarily mapped).
-
Jul 6th, 2007, 05:06 PM
#5
Lively Member
Re: Checking if network connection exists
code a server that does that, since you will use it only for registrarion
logging it will be rather simple and easy to write.
You will just have to make your client to query the server every time before
opening the specified path
-
Jul 6th, 2007, 08:07 PM
#6
Re: Checking if network connection exists
May I just slip in one quick question..Is this for .Net or VB6?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|