How can I unmap all the network drives mapped to my system by vb coding
Printable View
How can I unmap all the network drives mapped to my system by vb coding
This thread may help you.
... and some other threads http://www.vbforums.com/search.php?q...0&saveprefs=1&. :)
VB Code:
Private Declare Function WNetCancelConnection Lib "mpr.dll" Alias "WNetCancelConnectionA" (ByVal _ lpszName As String, ByVal bForce As Long) As Long Private DisconnectIt As Long 'Where H: is the drive letter you wish to connect 'The second parameter of this API determines whether to disconnect the drive if 'there are files open on it. If it is passed FALSE, the disconnect will fail if there are open files 'If it is passed TRUE, the disconnect will occur no matter what is open on the drive DisconnectIt = WNetCancelConnection("H:", True)
Thanks Hack,
I have alreay found your thread
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.
What error message?
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.Quote:
Originally Posted by danasegarane
Please Explain me the method of unmapping with username and password
Help Please
Is it possible to map invisble in the explorer bar???
map invisible???Quote:
Originally Posted by danasegarane
What exactly you are trying to do? please give some more information.
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.
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:
FileCopy "\\MyServer\C$\ode_00380.txt", "C:\ode_00380.txt"
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.
There's no such thing as "invisible mapping". Either a share is mapped or it's not.
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.
Not sure, whether you are looking for this:Quote:
Originally Posted by danasegarane
Map a drive
Hide Contents Of Selected Drives
Dear CSS,
I couldnot able to find the registry "Value Name: NoViewOnDrive
", in my machine
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