>Im sure this must have been posted before but I couldn't find it.
>
>Would someone tell me the api that can be used to get the
>whoami type of info under NT and windows.
>
You can use WNetGetUser() to find out the currently logged-in user; the Windows Scripting Host has the Wscript.Network object which exposes considerably more information, the MS ADSI components may be of use, and the new WMI, all provide ways of getting the details.