assume you have an executable that is run on a machine and you would like it to display a message box
containing the user name of the user that executed it.

...?
Posted on 2003-01-07 09:10:04 by Azrim


include Advapi32.inc
includelib Advapi32.lib

.data?
buffer db 255 dup (?)
.code
invoke GetUserName,addr buffer,sizeof buffer-1
invoke MessageBox,0,addr buffer,0,0


Untested.
Posted on 2003-01-07 09:13:38 by Qweerdy