Listers, WOW! What a turn around time. A working solution in 2 hours, terrific. The solution is: '------------------------------- working code to get user name from system ' please forgive bad programming style declare sub main() declare function GetUserName lib "advapi32.dll" alias "GetUserNameA" (lpBuffer as string, nSize as integer) as integer declare function user_name_is() as string sub main print user_name_is() end sub 'main function user_name_is() as string ' determine the user name from the windows api dim x as integer dim user_str as string dim lpBuffer as string dim BuffSize as integer BuffSize = 1024 lpBuffer = string$(BuffSize, chr$(32)) onerror goto oopses x = GetUserName(lpBuffer, BuffSize) user_name_is = lpBuffer exit function oopses: user_name_is = "Unknown" end function 'user_name_is '-------------------------------------------- Thanks to Thomas/Trey [mailto:[EMAIL PROTECTED]] and Doug [mailto:[EMAIL PROTECTED]] Regards . . . ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ John van Uitregt (GIS Analyst) Logan City Council, PO Box 3226, Logan City DC, Q 4114, Australia Ph : +61-7-3826-5697 Fax : +61-7-3808-0014 E-mail: mailto:[EMAIL PROTECTED] Web Site: http://www.logan.qld.gov.au ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ---------------------------------------------------------------------- To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
