Results 1 to 20 of 20

Thread: Unmaping drive

  1. #1

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Unmaping drive

    How can I unmap all the network drives mapped to my system by vb coding

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: Unmaping drive

    This thread may help you.
    ... and some other threads http://www.vbforums.com/search.php?q...0&saveprefs=1&.
    Last edited by iPrank; Jun 6th, 2006 at 02:57 AM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Unmaping drive

    VB Code:
    1. Private Declare Function WNetCancelConnection Lib "mpr.dll" Alias "WNetCancelConnectionA" (ByVal _
    2. lpszName As String, ByVal bForce As Long) As Long
    3.  
    4. Private DisconnectIt As Long
    5.  
    6. 'Where H: is the drive letter you wish to connect
    7. 'The second parameter of this API determines whether to disconnect the drive if
    8. 'there are files open on it.   If it is passed FALSE, the disconnect will fail if there are open files
    9. 'If it is passed TRUE, the disconnect will occur no matter what is open on the drive
    10. DisconnectIt = WNetCancelConnection("H:", True)

  4. #4

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Thanks Hack,
    I have alreay found your thread

  5. #5

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Hi,
    I am getting error msg in error mapping if any sever is opened by run mode like
    "\\server1\server"
    My aim to is disconect any remote drive in my machine either by \\server1\server or by by mapping.

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Unmaping drive

    What error message?

  7. #7

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    this server is mapped with alreay with the different username and password.Please disconnect the alreay mapped one

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Unmaping drive

    Quote Originally Posted by danasegarane
    this server is mapped with alreay with the different username and password.Please disconnect the alreay mapped one
    Then, unless you can supply the username and password, you will not be able to unmap it.

  9. #9

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Please Explain me the method of unmapping with username and password

  10. #10

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Help Please

  11. #11

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Is it possible to map invisble in the explorer bar???

  12. #12
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Unmaping drive

    Quote Originally Posted by danasegarane
    Is it possible to map invisble in the explorer bar???
    map invisible???

    What exactly you are trying to do? please give some more information.
    CS

  13. #13

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    I am trying to map drive in invible mode in my client machine.By that maping my program will copy some files from server.During the copying time the user can able to access the mapped server.So I want to map in invisible mode.

  14. #14
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Unmaping drive

    As per my knowledge, there is no need to map a network dirve you can directly access/copy the file by giveing its full path like:
    VB Code:
    1. FileCopy "\\MyServer\C$\ode_00380.txt", "C:\ode_00380.txt"
    CS

  15. #15

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Dear CSS,
    The problem is that the user doesnot have access to the server.So I am mapping the server with different username and password.So only i want that mapping to be invisible to the user, so that he is not allowed to use the mapped server.

  16. #16
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Unmaping drive

    There's no such thing as "invisible mapping". Either a share is mapped or it's not.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  17. #17

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Or is it posible to create virtual directory, where I can able to transfer files.
    Or is there any method to upload some files frequently with different username and password.

  18. #18
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Unmaping drive

    Quote Originally Posted by danasegarane
    Dear CSS,
    The problem is that the user doesnot have access to the server.So I am mapping the server with different username and password.So only i want that mapping to be invisible to the user, so that he is not allowed to use the mapped server.
    Not sure, whether you are looking for this:

    Map a drive
    Hide Contents Of Selected Drives
    CS

  19. #19

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Unmaping drive

    Dear CSS,
    I couldnot able to find the registry "Value Name: NoViewOnDrive
    ", in my machine

  20. #20
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Unmaping drive

    It exists for me. I use Windows XP OS. If it doesn't exists you need to create it.
    Quote Originally Posted by nazeem_khan
    Open your registry and find or create the key below.
    The "NoViewOnDrive" value uses . . .
    Attached Images Attached Images  
    CS

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