Esparta
Tue May 10 14:00:58 CDT 2005
Check SYS(0) function ;-)
? PC_USER(1)
? PC_USER(2)
*----------------------------
FUNCTION PC_USER(tn)
*----------------------------
* Returns the PC name or username
* Parameters: tn = 1 - Returns PC name
* tn = 2 - Return the username
* By: Luis MarÃa Guayán
*----------------------------
LOCAL lc, ln
lc = SYS(0)
ln = AT('#',lc)
tn = IIF(EMPTY(tn) or type('tn')#'N',1,tn)
IF tn = 1
lc = LEFT(lc,ln-1)
ELSE
lc = SUBS(lc,ln+2)
ENDIF
RETURN lc
ENDFUNC
*---------------------------
HTH
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma MartÃnez
SysOp
http://www.PortalFox.com
México D.F.
MoBlogs!
http://weblogs.golemproject.com/esparta/
http://www.espartha.com/blog/
Joe Kelly wrote:
> Can you give me some vis fox 6 code to read the Windows user-id?
>
> TIA.
>
> Joe Kelly