Results 1 to 6 of 6

Thread: [RESOLVED] Checking if network connection exists

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2007
    Posts
    24

    Resolved [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?

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jun 2007
    Posts
    24

    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?

  3. #3
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 2007
    Posts
    24

    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).

  5. #5
    Lively Member
    Join Date
    Jul 2007
    Posts
    98

    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

  6. #6
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Checking if network connection exists

    May I just slip in one quick question..Is this for .Net or VB6?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width