Results 1 to 6 of 6

Thread: mapping a network drive?

  1. #1

    Thread Starter
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869

    Lightbulb mapping a network drive?

    anybody know how to map a netwokr drive in vb.net? i've looked around in teh system.net.authenticationmanager and related things, but i can't figure it out

    TIA

    -C
    Unite, proletariat!

  2. #2

    Thread Starter
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    *bump*

    C'mon..somebody has to know
    Unite, proletariat!

  3. #3
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    You might want to check out WMI:-

    http://msdn.microsoft.com/library/de...ng06112002.asp

    Windows Scripting has a command to map a network drive but you also need to know what letter to map it to (i.e. what letter is available?). In any case I don't know enough about wmi to tell you about it so I recommend you read up on it.

    There may well be an easy way of doing this in .net but I 'aint heard about it yet.

    Finally if you want to go back in time and use APIs then you should be able to find some old vb6 code to do this and convert it.

  4. #4

    Thread Starter
    Fanatic Member siyan's Avatar
    Join Date
    Jul 2001
    Location
    GOOOAAAAALLLLL!!!!!
    Posts
    869
    thanks..i'll read up on that when i get the chance

    I have VB6 API calls to do the mapping somewhere..and to check for the first aviable drive letter (not that hard...), but i'm doing this program more or less as an exercise. first goaround in .net, and i'd prefer to keep it free of any hack'n'slash methods around problems.

    anybody know the .net framwork method to do it? i'm sure there's gotta be a way..

    -C
    Unite, proletariat!

  5. #5
    Hyperactive Member wolfrose's Avatar
    Join Date
    Aug 2002
    Location
    Indiana
    Posts
    309
    how do you find the next available drive letter to map a network drive to?

  6. #6
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    ms-help://MS.VSCC/MS.MSDNVS/vbcn7/html/vaconDriveFolderAccess.htm

    Use GetLogicalDrives to see which drives are taken, pick one that isn't - or prompt the user.

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