Jump to content

Recommended Posts

Posted (edited)

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

Posted

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

Posted

You do realize it's not really DOS, right?

Yeah.. that was dumb on my part. Anyways what I put should work. Perhaps the function should have been _RunCmd(). Oh well.

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
×
×
  • Create New...