An example of using WindowsIdentity to get the username:

using System.Security.Principal;
...
WindowsIdentity id = WindowsIdentity.GetCurrent();
Console.WriteLine(id.Name);


I've tested that this works properly on Mono.


--  
sandy

On 8 May 2007, at 17:14, Mirek Binas wrote:

> hello
>
> i am trying to find a way, how to get the name/login of user, that  
> run/started application. still not very successfuly. have you any  
> idea, how to do it?
>
> thanks for help
>
> mirek
> -- 
> e-mail: [EMAIL PROTECTED]
> jabber: [EMAIL PROTECTED]
> homepage: http://www.intrak.sk/~binas
>
> english:
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.fsf.org/philosophy/no-word-attachments.html
>
> slovak:
> prosim, neposielajte mi prilohy vo formatoch .doc a .ppt (power point)
> precitajte si http://www.fsf.org/philosophy/no-word- 
> attachments.cs.html
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to