BuildForge Help

Windows Mapped Drives

Windows® 2000 and XP operating systems manage mapped drives differently. Windows 2000 uses a common namespace for drive mappings while Windows XP uses separate namespaces for each user session. 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 down 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, as 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 login/password as defined for the logical server. You can map a drive for a different user by adding the username and password in parentheses after the mapping, as in the following example:
X:=//server/share(alternateusername,password)
Note: If you must use special characters for passwords, (%, $, [, ], {, }, ", or ') escape them with a \ character. Example: \$

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

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

Related concepts
Special Case Variables
Setting the Adaptor Log Level