<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > Internet and Network Commands |
MiniRobotLanguage (MRL)
MND. Command
Map Network Drive
Intention
Can be used to assign a drive-letter to a network resource.
This can be done temporary, or you can specify that this is going to be
connected on each reboot.
Just use the command and specify which Mapping you want:
' Add Mapping using automatic driveletter temporary
MND.\\MyComputer\Folder$
Will leave the automatically assigned driveletter on the TOS (Y:).
' Assign Mapping for Drive F: permanent
RDM.F|1
' Remove Mapping for Drive F: permanent
' and verify it was removed
RDM.F|1|$$ERG
IVV.$$ERG=0
MBX.Success
EIF.
Hint: Use the RDM. - Remove Drive Mapping command to remove a mapped drive.
Syntax
MND.P1[|P2][|P3][|P4][|P5][|P6]
Parameter Explanation
P1 - Share to connect, example: \\computer\folder
P2 - (optional) Driveletter, for example: Y:
P3 - (optional) Username
P4 - (optional) Password
P5 - (optional). 1/0 -If 1 is specified, the Mapping is permanent.
It will be restored at the next reboot.
If 0 or nothing is specified, the drive mapping is temporary
and not saved in the user profile.
P6 - (optional). Variable that will return the result of the operation. In case of
success the result will be zero. In case of error an error number is returned.
If omitted TOS is used.
5 - ERROR_ACCESS_DENIED
The caller does not have access to the network resource.
This could also be a access-rights problem.
85 - ERROR_ALREADY_ASSIGNED
The local device specified is already connected to a network resource.
1200 - ERROR_BAD_DEVICE
The value specified is invalid.
67 - ERROR_BAD_NET_NAME
The value specified is not acceptable to any network resource provider because the resource name is invalid, or because the named resource cannot be located.
1204 - ERROR_BAD_PROVIDER
The value specified does not match any provider.
1223 - ERROR_CANCELLED
The attempt to make the connection was canceled by the user through a dialog box from one of the network resource providers, or by a called resource.
1208 - ERROR_EXTENDED_ERROR
A network-specific error occurred.
487 - ERROR_INVALID_ADDRESS
The caller passed a pointer to a buffer that could not be accessed.
This error should not appear, as it is an internal error.
87 - ERROR_INVALID_PARAMETER
This error is a result of providing wrong parameters, or the connection is to a
network that requires the redirecting of a local device. Please check the variables.
86 - ERROR_INVALID_PASSWORD
The specified password is invalid.
234 - ERROR_MORE_DATA
Internal Error. If this error is returned, then no connection has been made.
259 - ERROR_NO_MORE_ITEMS
The operating system cannot automatically choose a local redirection because all the valid local devices are in use.
1202 - ERROR_DEVICE_ALREADY_REMEMBERED
The local device name has a remembered connection to another network resource.
1203 - ERROR_NO_NET_OR_BAD_PATH
The network path was either typed incorrectly, does not exist, or the network provider is not currently available. Please try retyping the path or contact your network administrator.
1222 - ERROR_NO_NETWORK
The network is unavailable.
1219 - ERROR_SESSION_CREDENTIAL_CONFLICT
An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
1326 - ERROR_LOGON_FAILURE
Logon failure: user account restriction. Possible reasons are blank passwords not allowed, logon hour restrictions, or a policy restriction has been enforced.
Example
'-----------------------------------------------------------
' MND. - No Pasword
'
$$PAT=\\XDRIVE\Daten$
MND.$$PAT
ITO.
PRT.error happend
EIF.
DMP.6
MBX.!
ENR.
' MND. - with Pasword
'
$$PAT=\\XDRIVE\Daten$
MND.$$PAT||Admin|Asjfds_55
ITO.
PRT.error happend
EIF.
DMP.6
MBX.!
ENR.
Remarks
If the command fails, the Timeout-Flag is set, otherwise it will be cleared.
Limitations:
-
See also: