home *** CD-ROM | disk | FTP | other *** search
- Lan Manager Utility USE.EXE
-
-
- Dan Shearer, Computer Centre, University of South Australia
- Comments and bug reports to: ccdps@lux.levels.unisa.edu.au
-
- Version 1.25 released to the public domain 9th March, 1992.
-
-
- Overview
- ---------
-
- USE saves our LAN a lot of traffic and speeds up operations for our
- users (400 or so.)
-
- It is a small program designed to be called from LAN batch files for
- making and breaking connections to Lan Manager network drives and printers,
- instead of the large and slow Microsoft program NET.EXE. It would
- probably be just as useful for many other brands of LAN, with one simple
- modification. It does only two things:
-
- 1. Lets you use very fast DOS redirect calls to make network connections,
- where possible, and,
-
- 2. Lets you connect a network resource on top of an existing connection,
- without first explicitly deleting it. (ie no more NET USE /DEL commands.)
-
- I don't have the Lan Manager Programmer's Toolkit, so I don't know how
- to get at the user's password in any fool-proof manner - but it wouldn't
- give all that much better performance overall if I did. Suggestions welcome
- though, as are bug-reports.
-
- Let me know if you want to use this with some other LAN, which uses XYZ.EXE
- instead of NET.EXE. I could include a /PATCH option to let you modify the
- program name to shell out to.
-
-
- Reasoning Behind USE
- --------------------
-
- All LM functions are accessed through one program, called NET.EXE. This
- includes making and breaking network connections, viewing users and
- resources, getting the server's time and so on. By far the most common
- use for NET is connecting to and disconnecting from network resources.
- Why run the huge (165k) NET.EXE for that? Microsoft already provide a
- program called USE.EXE, to meet just this question. However! The
- Microsoft USE does not use the Lan Manager network programming
- interface, so it can't determine the user's password to give a server
- when attempting to make a connection. A normal DOS network-redirect call
- is sufficient for connecting to a server which has already been
- connected to by NET, because Lan Manager only needs to verify the user
- once. A first-time connection cannot be made to a Lan Manager server
- without including the password.
-
- What this means is that you need to know which connections are
- first-time connections and which are not, to make intelligent use of the
- Microsoft USE. Since our LAN and presumably most others is designed with
- as generic a set of batch files as possible, this is clearly and
- inefficient thing to do. Hence, we need a program that will figure out
- for itself which is the appropriate kind of connection. On our LAN,
- first-time connections make up only a tiny fraction of all connections.
-
-
- How it Works
- ------------
-
- My USE.EXE is quite crude. You call it with the same parmeters you would
- have given NET.EXE (eg instead of NET USE \\SERVERA\PUBLIC you would go
- USE \\SERVERA\PUBLIC) and it tries to do a DOS redirect. If this fails
- for any reason at all it searches for NET.EXE in the current directory
- and in the path, and attempts to run it with the same parameters. This
- means that if there really is a problem you get the detailed error
- messages that NET provides. If the DOS calls failed because it is a
- first-time connection and there was no password, then NET should just
- work as usual. (The overhead of the DOS call is usually very small.)
-
- This has the effect of making nearly all network connections blisteringly
- fast. Furthermore, since each workstation typically does four or five
- USE commands in booting, the saving in network traffic is considerable
- even in the first few minutes.
-
- The /D parameter is always handled by USE since no password is needed
- so deletions are always quick.
-
-
- Syntax
- ------
-
-
- USE [/HELP | /?] | device: \\server\sharename [/Y] | device: /DEL
-
- where: "device" is a DOS drive or printer port id
- "\\server\sharename" is a resource name
- /Y to delete existing connection before attempting a new one
-
- errorlevels: 99 = problem with NET.EXE, others as for NET
-
-
- Examples:
-
- USE G: \\ASERVER\PUBLIC /Y
- USE LPT1: /D
- USE L \\ASERVER\RESTRICTED /Y (Bad drive, will call NET and give an error.)
- USE F: \\ASERVER\PUBLIC (no /Y, will call NET and give an error if in use.)
- USE (no paramters, so will call NET USE with no params, ie list connections)
-
-