>Can anyone tell me what SYS(0) returns on a NetWare LAN (using VFP 5.0). On an NT network it returns:
>
>MACHINENAME # UserName
>
>If it doesn't return the NetWare user name, any ideas on an easy way to get it?
>
>Thanks,
>
>Josh Weiss
Hi John,
I want to make a few additions.
You cannot rely on SYS(0) especialy if logging from Win95, WinNT etc to Novell. SYS(0) will return Win info while your username on Novell could be something else (ie: Win cetin Novell supervisor SYS(0) will return cetin).
For getting Novell username you have options :
- Use a third party product such as GPlib,Netlib etc., They are nice, easy to use if you can pay.
- Use FP with ASM routines (I can mail my own routines in working form),
- Use tricks that work via Novell's own executables. ie: ! userlist > temp.txt than parse temp.txt to find the line that begins with an asteriks. This one will give you the USERNAMEs on a Novell system (add /A for addresses as well).
I would directly send my Novell routines but I use the bundle for copy protection on Novell. If you can tell me what exactly you want I can send you that part.
I'm not sure that you just need USERNAME. On Novell (and Win of course) you can log in from several stations with the same username (many SUPERVISOR, ADMINISTRATOR,CETIN etc. logins are acceptable for every network I know). The simpliest and unique one is to get current station physical address (it's unique in Novell, Win, WinNT on a given network and although could be changed it's rare and still unique). This one only requires a call to DOS function 21h with AH=EE.
If you can mail me details on purpose I can help you better.
Cetin