Oh, that's easy if you're talking about Windows NT. For example, the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Netlogon\DefaultUsername might help you out. Or take a look at LoggedinUsers(), that might work for you, too.
_________________________
There are two types of vessels, submarines and targets.