Hi and welcome to the board.

You do a $drive = Left($localdrive_H, 1). This will put \ in the $drive variable. When this is added to the $localdrive_ variable (which is empty) it will result in incorrect values.

If I look at your script all you want to do is map the H drive so why can’t you just do: use H: $localdrive_H?
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.