• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

A bit of everything - netware nt vb

I've been pushed into this so help!!!

We've got a file on one NT4 Netware machine that has to be copied to another NT4 Netware machine each night at 5.30 as a batch job.

I wanted to write an NT Net Use script to do this. However I'm having trouble connecting to each machine. The first NT machine I can map a drive to providing I manually use the NT explorer map  drive screen and select 'Bindery connection' and login with a user id and password.
The second machine I have to logon to with a user id and password and the 'context' box of the netware logon set to something like 'ou=fred.ou=lan_1.o=company.c=gb'.

I didn't want to have to go through the 'Windows Nt Explorer' map drive process every night to achieve this for a number of reasons - I don't work at weekends, the login is only allowed after 5pm etc etc.

How can I 'NET USE D: //machine1/path' and
'NET USE E: //machine2/path' ?

I tried a visual basic program using the WNetAddConnection API call but I couldn't specify the a) bindery connection
b) context specific connection.

Can anybody help me - skeleton sample GUI-less API call list or a simple NT login script required.

200points because I'm really desperate. But I'm sure it's not that difficult. By the way, telling me to buy such and such a package is not a valid reply!!!

1 Solution
This should help: -

1) Make sure the NT box has services pack 3 installed

2) Use AT command so you can schedule the date/time that your script will execute. You can tell AT the batch/cmd file to execute, which will contain your NET USE statements.  You need to start the schedule service in Control Panel | Services.  Type AT /? for help on syntax.

3) You may get away with using the Microsoft client for NetWare, however, it is preferable to use the Novell client for NT v4.30 as comes with the ZEN Works Starter Pack.  You can download this from www.novell.com/download.

4) Use this syntax in your NET USE statements.  
NET USE \\<Server_Name>\Volume\Path\ User:<UserID> <Password>

For the bindery connection, UserID is straight forward.

For the NDS connection, there are two possibilites.
If a 'bindery context' exists for the NDS container within which your UserID resides, you may use your UserID's common name eg FRED.  If using the NetWare client for NT v4.30, it will automatically establish a NDS connection for you in the required context.

If no bindery context, you will have to supply the fully distinguished UserID starting with a leading period eg. .FRED.LAN_1.COMPANY.  DO NOT canonicalize the name ie. do not enter CN=FRED.OU=LAN_1.O=COMPANY.

Type NET USE /? for help on syntax.

Remember this batch file contains a password so treat it with care !

5) Enter your batch commands

6) Go and hit a quick 9 holes after work knowing that your script is presently running.
datavalueAuthor Commented:
Thanks for the reply unfortunately it didn't work, however I did login to the novell netware area and download their activex developers library. I now have managed to hack the NwSess example supplied by Novell into a simple process that given a user id and password will login/authenticate with a server either using a context, a bindery connection or nothing.
I still have to use a net map command to map the drive (could write a VB function, but haven't got time). And finally I use the NwSess Logout example to logout of the connected server. We're using a Unix/VMS/NT product called Maestro for the scheduling.
For the Novell Server
map drive:=Servername/volumename:directory/subdirectory should still work

Do you know replica Services from Novell.
It is a tool, for automatic data replicating thru Servers in NDS. It works very fine, we use it to transfer Data from our Web Server to other WebServers in other Aereas and for Fault tolerance.
With NDS for NT it will be no problem to distribute or copy data.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now