map drive(s) from array

Recommended Posts

surreal 1

surreal 1

i have a working array that collects the current mapped drives on a remote system on the network. at this time i have the array exporting to a txt file:

driveletter,servername\sharename

driveletter,servername\sharename

driveletter,servername\sharename

i now need to install the gathered drives onto the system the script is ran from.

DriveMapAdd ("driveletter:", "\\servername\sharename")

i tried:

$installdrive = $b[$j][1]

$installpath = $path[1][1]

DriveMapAdd($installdrive, $path)

with no success

can drivemapadd read the array or does it have to pull it from the txt file or an ini? if i need to create an ini instead of the txt file i can do that. if it can read from the array that would be even better. to be honest the most stable is what im hoping for.

but beyond that on how to get this accomplished i have know clue and any help would be greatly appreciated.

Share this post

Link to post

Share on other sites

surreal 1

surreal 1

alright, so i still cannot figure this out yet. but i do have a new idea. was wondering if the below would be possible?

im thinking of having a separate click maybe in the toolbar. once clicked it will run the mapped drives function. but do the following:

bring up a _GUICtrlListView of the remote users mapped drives. then have a checkbox that you can select what drive you want to map on the new system. a button that once clicked would map the drives from the gathered array that have been checked.

im not sure if this is something possible, if so wow this would be great. any and all help would be so greatly appreciated, thank you so much.