Mapping Windows drives

The Microsoft Windows® operating system manages mapped drives differently. The agent attempts to remap remembered connections for user accounts, but may not be able to successfully complete the mapping at runtime. You can use a special environment variable to assist with drive mapping on Windows: the _MAP variable. When you set this variable, the Windows Agent maps drives before executing your steps.

A typical practice when using the _MAP variable is to assign it in the project environment, so that the same drive mapping is passed to all the step environments through environment variable inheritance. Note that if you also define a _MAP variable in a step environment, the step environment's value overrides the project environment, because only one _MAP value can be defined for a particular step.

Although it is intended for Windows environments, use forward slashes to separate directory path names in the _MAP variable. When the paths are used, the agent automatically corrects them as needed.

For example, setting _MAP to
X:=//server/share
defines a runtime mapping that connects the X: drive to the Windows UNC path name \\server\\share.
Multiple drives can be mapped by providing additional mapping specifications in the _MAP variable, with semicolons to separate them:
X:=//server/share;Y:=//server/share2
By default, drive mappings on Windows are performed using the same user name and password as defined for the logical server. You can map a drive for a different user name by adding the user name and password in parentheses after the mapping, as in the following example:
X:=//server/share(alternateusername,password)
Note: If your password contains a $ character, escape it with another $ character. Example: enter the password pas$word as pas$$word. Avoid using the following special characters in passwords: %, [, ], {, }, ", or '.

Drives mapped via the _MAP variable are unmapped on command completion.

Even if the drives map successfully, drive mappings on Windows might still be inaccessible if a user logged onto the system's console is using the drive or share in question.


Feedback