Not quite sure whether you mean user account or local service for a service(eg the log on as property in services).
If so, you could try using vbscript to query win32_service and the (I think this is it) StartName property.
If it is a user account you're trying to query, you can use psloggedon from sysinternals.