Network - Map Network Drive

Declaration

lt;AMNETWORK ACTIVITY="connect_specific_user" 
DRIVELETTER="text" NETPATH="text" USERNAME="text" PASSWORD="text (options)" />

Description: Connects a drive letter to a network path or disconnects a currently connected drive from a network path.

IMPORTANT: This activity cannot be executed when the machine is in a logged off state because mapped drives are only available when a user is logged on.

Practical Usage

Used to map a network share to a drive letter. Some networks may require a network username and/or password with which to connect.

General Parameters

Property

Type

Required

Default

Markup

Description

Drive letter

Text

Yes

Z:

DRIVELETTER="X:"

The letter to represent the mapped drive. The drive letter should always be followed by a colon symbol (e.g., X:).

Network path

Text

Yes

(Empty)

NETPATH=

"\\Server1\Sharename"

The Universal Naming Convention (UNC) path to the network share that should be mapped (UNC path example: \\server-name\shared-resource-path-name).

Reconnect at logon

Yes/No

No

No

RECONNECT="YES"

If set to YES, specifies that drive mapping will be re-established at logon. Set to NO by default.

Connect using different user

 

 

 

 

If enabled, specifies that drive mapping should be established using the credentials of a user other than the one currently logged on (disabled by default). This is a visual mode parameter used only during design-time, therefore, contains no markup.

Username

Text

No

(Empty)

USERNAME="MyUserName"

A valid network username that has access to map the selected share. This parameter is available only if the Connect using different user parameter is set enabled.

Password

Text

No

(Empty)

PASSWORD="encrypted"

A valid password for the user account specified in the Username parameter. This parameter is available only if the Connect using different user parameter is set enabled.

Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Example

Description: Connect "\\serverName\sharedResourceName\folderName" to "M:".

<AMNETWORK ACTIVITY="connect_specific_user" DRIVELETTER="M:" 
NETPATH="\\serverName\sharedResourceName\folderName" RECONNECT="YES" />