jfcby Posted October 2, 2008 Share Posted October 2, 2008 (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 October 2, 2008 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 More sharing options...
jfcby Posted October 2, 2008 Author Share Posted October 2, 2008 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 More sharing options...
raj2734 Posted October 2, 2008 Share Posted October 2, 2008 When in doubt go back to dos CODE#include <Process.au3> _RunDOS('NET USE Z: \\server\share password /Persistent:Yes /User:user') Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 2, 2008 Share Posted October 2, 2008 You do realize it's not really DOS, right? Link to comment Share on other sites More sharing options...
raj2734 Posted October 2, 2008 Share Posted October 2, 2008 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 2, 2008 Share Posted October 2, 2008 Yeah. I dunno who decided to name it that way. Link to comment Share on other sites More sharing options...
trancexx Posted October 2, 2008 Share Posted October 2, 2008 The name of the function is _RunDos() because it's primarily use is to execute DOS commands. That is kind of obvious... unlike your question. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 3, 2008 Share Posted October 3, 2008 They aren't DOS commands though. They are passed to the system's command interpreter. Since the dev team dropped 9x (and only the 9x systems had DOS), then none of the commands are DOS. They only look like DOS. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now