Sign in to follow this  
Followers 0
LurchMan

DriveMapAdd Help

3 posts in this topic

I have the following 2 lines that im using in one of my scripts, and they are the lines that I've isolated the issue with.

$ret = DriveMapAdd("", "\\172.20.20.3\", 1, $user, $pwd) 
ConsoleWrite("Return: " & $ret & " Error: " & " Extended: " & @extended & @CRLF)

The Problem is that its not mapping it or at least it doesn't appear to be. And yes I know i won't be seeing an actual connection in my computer or anything like that but in the console i get the following output:

Return: 0 Error: Extended: 53

+>13:04:40 AutoIT3.exe ended.rc:0

I've tried using a drive letter, using the * wildcard (like the help files says), completely removing username / password, changing the 1 to an 8 so it asks for validation.

This has me bashing my head against the wall...All help will be appreciated!

Thanks

Lurch


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

the sharename is missing:

$ret = DriveMapAdd("", "\\172.20.20.3\myshare", 1, $user, $pwd) instead of

$ret = DriveMapAdd("", "\\172.20.20.3\", 1, $user, $pwd)

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi,

the sharename is missing:

$ret = DriveMapAdd("", "\\172.20.20.3\myshare", 1, $user, $pwd) instead of $ret = DriveMapAdd("", "\\172.20.20.3\", 1, $user, $pwd)

;-))

Stefan

thank you but that was another one of my failed frustrations that i tried before posting...same return when i have sharename...

Edit: When you mentioned share name i figured out how to fix it...using DriveMapAdd("", "\\172.20.20.3\admin$", 1, $user, $pwd) works like i wanted it too...thanks for restarting my brain lol

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

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