This function will return the name of the current logged in user. Call like this...
currentUser = returnCurrentUser()
on returnCurrentUser me
if baVersion( "windows" ) >= 4 then
return baReadRegString("SoftwareMicrosoftWindows NTCurrentVersionWinlogon", "DefaultUserName", "RSI", "HKEY_LOCAL_MACHINE")
else if baVersion("windows") >= 4 then
return baReadRegString("NetworkLogon", "UserName", "", "HKEY_LOCAL_MACHINE")
end if
end
on getBehaviorDescription me
describe = "This function will return the name of the current logged in user. Call like this..." & return & "currentUser = returnCurrentUser()"
return describe
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA