Ok I'll bite. You can give this a try.
Code:
External_Function WNetGetUser "WNetGetUserA" MPR.DLL Pointer lpName Pointer lpUser_Name Pointer lpLength Returns DWord
//****************************************************************************
// $Module type: FUNCTION
// $Module name: Network_User_Name
// $Author : AK/VOO/KCR
// Created : 09-24-96 @ 19:17
//
// Description
// This function reads the current username Of windows and returns that
// name or an text unknown user
//
// $Rev History
// 02/22/2012 Ask Windows how long the size of the name should be
// 07/25/2003 Replaced obsolete code
// 09/24/1996 Module header created
//****************************************************************************
Function Network_User_Name for cDesktop Returns String
String sName
Integer iRetval iLength
Move 0 to iLength
Move (WNetGetUser (0, 0, AddressOf (iLength))) to iRetval
ZeroString iLength to sName
Move (WNetGetUser (0, AddressOf (sName), AddressOf (iLength))) to iRetval
If (iRetval = NO_ERROR) Begin
Function_Return (CString (sName))
End
Function_Return "User Unknown"
End_Function