Novell is now a part of Micro Focus

Mapping and Disconnecting NetWare Volumes using Commands - with and without Novell Client

Novell Cool Solutions: Feature
By Girish Mutt

Digg This - Slashdot This

Posted: 27 Jul 2005

1. Introduction

The basic objective of this cool solution is to show all Novell client and non-Novell client users easy ways of mapping NetWare volumes from the command-line interface (CLI) either using commands or batch files on Windows XP workstations. This cool solution is intended to enlighten all the NetWare users with different ways of mapping NetWare volumes and also gives an overview of how to use these commands in either batch files or in some other automation scripts to make it happen without any manual intervention. This will focus on all the command-line modes of mapping the local hard disk drives to that of the NetWare volumes. This cool solution will also explain the process of automating these operations as part of system startup.

2. Problem Statement

When we want to handle the mapping of NetWare volumes from the command line, we are faced with two possible situations:

  1. The Novell Client is already installed on the Client workstation.
  2. The Novell Client is not installed on the Client workstation.

In the first case Windows XP uses the Novell Client services provided by the Novell Client itself to map the NetWare volumes, whereas in the second case we have to use the Client service for NetWare component provided by Microsoft, which basically acts as a network client while mapping NetWare volumes.

3. Mapping NetWare volumes when Novell Client is installed on the Windows XP workstation.

Many users may want to use this command-line mode of mapping NetWare volumes instead of using the Map drive option provided by the NetWare Services as it can be done as part of the automated scripts. In most cases users are logged into some tree or NetWare server, but after that if they want to map one of the volumes in that server they usually use the NetWare services option to do that. But an alternative way is available where you can map to any NetWare volume by running a simple command. This is a useful means of mapping NetWare server volume as it can be added into any Batch file or automated script, and we can easily run it from the DOS prompt of the client workstation (for example Windows XP). Even disconnecting the mapped NetWare volumes is also supported by the command-line interface in the form of a simple command.

This approach of mapping NetWare volumes will be particularly useful when you want to map many NetWare volumes on different NetWare servers, as this can be automated. We can use two different ways of mapping to NetWare volumes. The two cases are:

  1. When you are already logged into the NetWare server but not mapped to any NetWare volumes. In this case you need not authenticate to the NetWare server as you are already logged on.

    From the DOS Command Prompt or by directly using the Run command , we can map any volume to the local drive.

    General Syntax:
    net use <Drive Letter> <NetWare Volume Path>
    Suppose you want to map your local G: drive to volume data3 in NetWare server blr-kurmi-test. You can do it using the net use command as follows:
    net use G: \\blr-kurmi-test\data3
    Note: The drive letter with a colon and the NetWare volume path on the server should be separated by a space.

    Sometimes you want all the mapped volumes to be available when you re-login to the client workstation next time around. In this case you need to authenticate to the server before accessing the NetWare volumes. This can be easily achieved by using one more option available with the net use command as:

    net use G: \\ blr-kurmi-test\data3 /persistent:yes
  2. When you are not logged into any NetWare server (In this case users have to authenticate to the NetWare server by providing User-ID and Password, but still this can be done in a single command.)

    From the DOS Command Prompt or by directly using the Run command, we can map any volume to local drive.

    General Syntax:
    net use [<Drive Letter>] [ <NetWare Volume Path>] [<password>][ /user:<user name>]

    Suppose you want to map your logical G: drive to volume data3 in NetWare server blr-kurmi-test. You can do it using net use command as:

    net use G: \\blr-kurmi-test\data3 gottilla /user:admin

    An additional option, /persistent:yes, is also been provided with the net use command to keep the volumes mapped persistently, so that you don't have to remap it again when you re-login to the workstation next time around. This option need not be used if you are mapping volumes using the system startup scripts which run automatically after users log on.

    Mapped NetWare volumes can be easily disconnected by using the following command:

    General Syntax:
    net use [<Drive Letter>] /delete

    Suppose you want to delete the mapping of the data3 volume of server blr-kurmi-test from your workstation. You can do it using net use command from Run as:

    net use G: /delete

4. Mapping NetWare volumes when Novell Client is not installed on the Windows XP workstation.

In some cases users may not have the Novell Client installed on their workstations, but they still they would like to map to various NetWare volumes without problems. This can be done by installing some additional services for the enabled Network Connections under the Control Panel.

When the Novell Client is not installed on the Windows XP workstation, we should have some client services running that will enable us to map to any NetWare volume.

This can be done easily by installing Client Service for NetWare using the following steps:

  1. From the Start Menu go to Settings and launch Network Connections as shown below:

Figure 1: Launching Network Connections.
  1. Under Network Connections select the LAN connection that is enabled and go to its Properties.

Figure 2: Accessing Local Area Connection Properties.
  1. Go to the Local Area Connection Properties and click Install, then the Select Network Component Type window will pop up. From here, double-click on the Client icon, which takes you to the Select Network Client window. Select Client Service for NetWare and click OK to install that component. You can then access most NetWare services from this network client component.

Figure3: Installing Client Service for NetWare supported by Windows XP.

After installing Client Service for NetWare, the procedure for mapping NetWare volumes is the same as that for a workstation with Novell Client. You can use all the commands in a similar way as explained for workstations with Novell Client to map to and to disconnect from the mapped volumes.

5. Tips and Tricks for Automating NetWare Volume mapping on System startup.

As soon as you logon to the workstation, you may want to access all the shared NetWare volumes directly. You can automate the volume mapping process as part of the system startup using a batch file.

The process of automating mapping has to be handled a bit differently as there will be lots of other programs that run on Windows startup. This can be achieved by following the steps below:

  1. First, create one batch file with commands to map to all the volumes we want to access immediately on system startup (as soon as the user logs into his Windows workstation).

Figure 4: Batch file containing commands that map to multiple volumes on different NetWare servers during system startup.
  1. The next step is to have this batch file run on system startup as soon as the user logs into the Windows workstation. Using the Schedule tasks services provided by Windows XP, Go to Run and launch the Tasks services as shown below:

Figure 5: Launching Tasks services using Run from startup menu.
  1. As soon as you launch tasks, you will get an Add Scheduled Task window as shown below:

Figure 6:-Adding a new task to the system schedule to run after user logs on.
  1. Now click Next to go to the window shown below and click Browse to the batch file that we want to run after the user logs on.

Figure 7: The list of the applications that are part of the system startup.
  1. Go to the path where the batch file exists and add it as part of the application list that Windows runs.

Figure 8: Adding the batch file as part of the Windows application list.
  1. Now you can provide a name to the task, choose when this application has to be run, and click Next. In this case we want this to be run after system startup when the user logs on.

Figure 9: Associating task name and choosing from available options when this application is to run.
  1. In the next window you need to provide the user's name and password:

Figure 10: Here we are providing the user name and password for the administrator of the workstation.

After the above steps, the task will get created with a .job extension in the C:\WINDOWS\Tasks\ folder, and it will run as scheduled after system startup immediately following the user login to the workstation.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates