Jump to content
Sign in to follow this  

DriveMapAdd with 2 variables

Recommended Posts


I'm trying to convert my old, clunky utilities to .au3 files. Many of these first require mapping into a remote PC. Remote PCs are grouped by numbers which share an base IP and then seperated by letters varying only the last octet of the base IP. I use an IPLIST.INI file which I don't believe I have to alter for this task.

I've tried both NET USE and DriveMapAdd and neither are working for me. I think the problem is in the way I've tried to get and use the 2 necessary variables.






Dim $A = "1.\c$"

Dim $B = ".2\c$"

$mac = InputBox("Tools","Please select PC number")

$list= IniRead("C:\data\wan\iplist.ini", "list", "$mac", "NotFound")

DriveMapAdd( "M:", "\\"$list, $B"")

OR - RunWait("net use M: \\"$list, $B"")

either way returns an error in expression, so I removed the variables one at a time to see which one was causing me the problem, but they work alone, just not together. I'm out of troubleshooting ideas.

Two wrongs don't make a right, but three lefts do

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