Groups | Blog | Home
all groups > dotnet myservices > april 2007 >

dotnet myservices : How to get the Logged in User name from windows service ?



SenthilVel
4/27/2007 3:02:26 AM
hi

My windows service is running under the LocalSystem account.
how do i get the Logged in User Name of the machine from a windows Service?

Thanks
Senthil
http://dotnetcrunch.blogspot.com/

Lee Gillie
5/7/2007 2:19:21 PM
Which logged in user? You say "THE" like there could be only one!
Consider remoted users, and terminal servers, etc.

[quoted text, click to view]
Rahul
7/24/2007 6:10:00 AM
for example,

Yes, this there could be - remoted users, and terminal servers(WTS) logged
in uers.

the scenario is like this:

if the user has logged in to the server: "MyServerDom" with loginid
"Administrator" then I want to display it as: "MyServerDom\Administrator"
using the windows service.

[quoted text, click to view]
AddThis Social Bookmark Button