Internet and Network Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Internet and Network >

Internet and Network Commands

GNS. - Get Network Share

Previous Top Next


MiniRobotLanguage (MRL)

 

GNS. Command

Get Network Share

 

 

Intention

 

Can be used to retrieve the connection behind a drive-letter or specification.

 

' With a drive-letter it will retrieve the share

$$DRV=F:

GNS.$$DRV|$$ERG

' May return \\pcname\folder

DBP.$$ERG

 

' Without drive-letter will return all available shares

GNS.|$$ERG

DBP.$$ERG

 

In case of error, the timeout-flag is set and the error-number is on the TOS.

Otherwise the result is returned whether on TOS or in P5.

 

Hint: Use the RDM. - Remove Drive Mapping command to remove a mapped drive.

 

 

Syntax

 

 

GNS.[P1][|P2]

 

 

Parameter Explanation

 

P1  -  (optional) Drive-Letter includes the ":" Example: K:

    If no parameter is given, the result is a List of all shares, separated with "*".

         Example:

        X:=\share1\folder*Y:=\share2\folder*Z:=\share3\folder

 

P2 - (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

 

'-----------------------------------------------------------

' GNS. - No Parameters

'

GNS.

ITO.

 PRT.error happend

EIF.

DMP.6

MBX.!

ENR.

 

' GNS. - with Parameters

'

$$PAT=X:

GNS.$$PAT|$$ERG

ITO.

 PRT.error happend

EIF.

PRT.$$ERG

MBX.!

ENR.

 

 

 

 

Remarks

 

If the command fails, the Timeout-Flag is set, otherwise it will be cleared.

 

 

 

Limitations:

 

-

 

 

See also:

 

    MND. - Map Network Drive

    CNS. - Connect Net Share

    RDM. - Remove Drive Mapping

    GIP. - Get IP Adress

    GUN. - Get User Name

    GVL. - Get Volume List