Jump to content

Map Network Drive


jfcby
 Share

Recommended Posts

Hello,

Operating System: WinXP SP2

AutoIT3 Version: 3.2.12.1

I'm trying to map my network drive so that when I restart my computer it will reconnect at login. From the help file I've used the flag 0, 1, and 8 then I tried combining them 0 & 1 and 0+1, did not work. But, unsuccessful with these attempts:

1. tried re-mapping the drive and restarting pc:

; Map drive
DriveMapAdd("Z:", "\\server\share", 1, "username", "password")

; Get details of the mapping
MsgBox(0, "Drive Z: is mapped to", DriveMapGet("Z:"))

2. tried deleting then re-mapping drive and restarting pc:

; Disconnect
DriveMapDel("Z:")

; Map drive 
DriveMapAdd("Z:", "\\server\share", 1, "username", "password")

; Get details of the mapping
MsgBox(0, "Drive Z: is mapped to", DriveMapGet("Z:"))

Thank you for your help,

jfcby

Edited by jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

Link to comment
Share on other sites

Hello,

Operating System: WinXP SP2

AutoIT3 Version: 3.2.12.1

I'm trying to map my network drive so that when I restart my computer it will reconnect at login. From the help file I've used the flag 0, 1, and 8 then I tried combining them 0 & 1 and 0+1, did not work. But, unsuccessful with these attempts:

1. tried re-mapping the drive and restarting pc:

; Map drive
DriveMapAdd("Z:", "\\server\share", 1, "username", "password")

; Get details of the mapping
MsgBox(0, "Drive Z: is mapped to", DriveMapGet("Z:"))

2. tried deleting then re-mapping drive and restarting pc:

; Disconnect
DriveMapDel("Z:")

; Map drive 
DriveMapAdd("Z:", "\\server\share", 1, "username", "password")

; Get details of the mapping
MsgBox(0, "Drive Z: is mapped to", DriveMapGet("Z:"))

Thank you for your help,

jfcby

I want the same results as if you used Windows Explorer Tools > Map Net Work Drive > and check the Reconnect at login. I understand that there are several examples in the Forum but I have not found any that work. In the help file the 1 = Persistent mapping and suppose to be the same as checking the Reconnect at login but was wondering why my above script is not working?

Thank you for your help,

jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

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...