I need to determine the current logged in user weather they logged in
through ctrl-alt-del, the red N, or through
c:\WINDOWS\system32\loginw32.exe.

I need to do this in a script so I can record it to a database. Does
anyone know what the best way to do this is?

Thnaks.