Jump to content

deleting a mapped drive


Mrinaldi
 Share

Recommended Posts

I'm a bit lost on how to do this but here goes. I need to disconnect a mapped drive but I have no idea what the drive letter is but I do know the share.

so on the pc's we have some unknown drive letter mapped to \\server\share

i have tried DriveMapDel('\\sever\share') but it wont disconnect

any suggestions will be helpful

Link to comment
Share on other sites

I'm a bit lost on how to do this but here goes. I need to disconnect a mapped drive but I have no idea what the drive letter is but I do know the share.

so on the pc's we have some unknown drive letter mapped to \\server\share

i have tried DriveMapDel('\\sever\share') but it wont disconnect

any suggestions will be helpful

you need the name (device) of map drive DriveMapDel("X:")

not his remote share

Edit: see the proporties and with autoit info copy the drive leter if you dont know difrent way

>>>> Visible Text <<<<

General

Type:

Network Drive

File system:

FAT

z

Used space:

20.579.729.408 bytes

19,1 GB

Free space:

10.866.556.928 bytes

10,1 GB

Capacity:

31.446.286.336 bytes

29,2 GB

Drive Z

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

  • Developers

something like this ? (Untested)

Func DriveMadDeleteUNC($UNC)
    $var = DriveGetDrive("NETWORK")
    If Not @error Then
        For $i = 1 To $var[0]
            If $UNC = DriveMapGet($var[$i]) Then DriveMapDel($var[$i])
        Next
    EndIf
EndFunc  ;==>DriveMadDeleteUNC

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

something like this ? (Untested)

Func DriveMadDeleteUNC($UNC)
    $var = DriveGetDrive("NETWORK")
    If Not @error Then
        For $i = 1 To $var[0]
            If $UNC = DriveMapGet($var[$i]) Then DriveMapDel($var[$i])
        Next
    EndIf
EndFunc ;==>DriveMadDeleteUNC

worked like a charm thank you

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...