Using SYS(0) Function to Get User Name from NetworkLast reviewed: January 8, 1998Article ID: Q96346 |
2.5x 2.6x 3.00 | 2.00 2.5x 2.6x
WINDOWS | MS-DOSkbprg The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5x, 2.6x
SUMMARYThe SYS(0) function is used to return a character string of the machine number and machine name when you are using FoxPro/LAN version 2.0 for MS-DOS or FoxPro version 2.5. NOTE: In order for this function to work, a machine number and name must first be assigned by the network software.
MORE INFORMATIONBy setting an MS-DOS environment variable called USER, a machine name can be returned on most networks. For example, place the following line in the AUTOEXEC.BAT file:
SET USER=JOHNDOESYS(0) will then return the name JOHNDOE. On a Novell network, place the following line in the login script:
MACHINE="%LOGIN_NAME"SYS(0) will return the user's Novell login name. In this example, it is important that LOGIN_NAME be placed in all caps. To return both the user's login name and the station number on a Novell network, add the following line to the login script:
MACHINE="%LOGIN_NAME %STATION" |
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.00 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |