[comp.sys.novell] Get username on LAN

jguo@CS.NYU.EDU (Jun Guo) (06/11/91)

Hi,

   I want to get the username currently logged on (and running my program) in
my program. I learned that this is not in the standard MS-DOS system calls.
The extended NOS system call in LANtastic is 5f83. Is this the same as in
Novell? Is there any libraries that provides these extended NOS calls that I
can link with my Clipper'87 program?

   Thanks a lot

Jun

maimer@kuhub.cc.ukans.edu (06/12/91)

In article <9106111142.AA26262@ucbvax.Berkeley.EDU>, jguo@CS.NYU.EDU (Jun Guo) writes:
> Hi,
> 
>    I want to get the username currently logged on (and running my program) in
> my program. I learned that this is not in the standard MS-DOS system calls.
> The extended NOS system call in LANtastic is 5f83. Is this the same as in
> Novell? Is there any libraries that provides these extended NOS calls that I
> can link with my Clipper'87 program?
> 
>    Thanks a lot
> 
> Jun

I am not a programmer per se so please excuse any ignorance...
Can you access DOS memory variables?  The shareware program config.exe
can be used to set several DOS variables which includes login name,
dos version, etc.  I believe this can also be done through the system login
script ("dos set name %login_name" or something like that).
-- 
           |\   \\\\__       Tony Maimer                __
           | \_/    o \                                /  |
            > _   (( <_                               /   |
           | / \__+___/  maimer@kuhub.cc.ukans.edu   /o   /_/|
           |/     |/                                <  ))  _ <
                                                    \     \ \|
                                                     \    |
       +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

cmp8118@sys.uea.ac.uk (Dave Cartwright) (06/14/91)

maimer@kuhub.cc.ukans.edu writes:

>> I want to get the username currently logged on (and running my program) in
>> my program. I learned that this is not in the standard MS-DOS system calls.

	You're right - DOS doesn't really have concepts unique to network use
like Login names, user ID's, etc, etc.

>Can you access DOS memory variables? 

	Yes.

>                                      The shareware program config.exe
>can be used to set several DOS variables which includes login name,
>dos version, etc.  I believe this can also be done through the system login
>script ("dos set name %login_name" or something like that).

	That's the way I do it. In the LOGIN script I set an environment
variable LOGIN to the user's login name. As well as doing this, I make sure
the user names are <=8 characters. That way I can set up personal network
directories as P:\DATA\USER\%LOGIN%, so I can define everyone's private drive
within the SYSTEM login script rather than having to bugger about with the 
individual users. This came in handy lately when I changed the layout of the
system - I had to change one script, not 87.

	Dave C

P.S. I'm speaking for me, not UEA.
-- 
 Dave Cartwright,               | cmp8118@sys.uea.ac.uk or uk.ac.uea.sys
 School of Information Systems, |   uucp : ...!ukc!uea-sys!cmp8118
 University of East Anglia,     | "Reality is an illusion brought on by
 Norwich, ENGLAND. NR4 7TJ.     |         lack of alcohol ..."

P.B.Challis@massey.ac.nz (P.B. Challis) (06/19/91)

There is a library for Clipper 87 put out by Communication horizons
called NetLib.  This provides access to the username, control over the
printer queues and all sorts of other network stuff.  Offhand I'm not sure
of their address but i found them advertised in magazines like DBMS and
Databased Advisor.