Get "Name" of the person "Logged On" to the
Get "Name" of the person "Logged On" to the
Can anybody tell me how I can get the current "User Name" of the person logged onto the computer?
Get "Name" of the person "Logged On" to the
`get username
Declare GetUserName as "GetUserNameA" of advapi32.dll
lpBuffer As string byaddress
nSize As Long
result as long
end declare
dim b as integer
b=250
getusername.nsize=varptr(b)
getusername.execute
if getusername.result=true then
showmessage getusername.lpbuffer
else
showmessage "Error,Username not found"
end if
best regards
Declare GetUserName as "GetUserNameA" of advapi32.dll
lpBuffer As string byaddress
nSize As Long
result as long
end declare
dim b as integer
b=250
getusername.nsize=varptr(b)
getusername.execute
if getusername.result=true then
showmessage getusername.lpbuffer
else
showmessage "Error,Username not found"
end if
best regards