Sign in to follow this  
Followers 0
Mrinaldi

deleting a mapped drive

4 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

 

Share this post


Link to post
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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0