Musings of a Software Developer

by Krishna Vangapandu

Wednesday, March 11, 2009

Getting the login name for the current process

On Windows. a process always run using some credentials. The following method should work with Windows applications as well as the XBAP.

   1: var x = WindowsIdentity.GetCurrent();


   2: x.Name gives you the current user.


at 6:47 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Subscribers

SUBSCRIBE

Subscribe in a reader

Archives

  • ►  2014 (3)
    • June 2014 (1)
    • January 2014 (2)
  • ►  2013 (1)
    • December 2013 (1)
  • ►  2012 (3)
    • November 2012 (2)
    • October 2012 (1)
  • ►  2011 (5)
    • December 2011 (2)
    • January 2011 (3)
  • ►  2010 (12)
    • July 2010 (5)
    • May 2010 (1)
    • April 2010 (1)
    • March 2010 (1)
    • February 2010 (2)
    • January 2010 (2)
  • ▼  2009 (46)
    • November 2009 (4)
    • August 2009 (1)
    • July 2009 (2)
    • June 2009 (9)
    • May 2009 (5)
    • April 2009 (2)
    • March 2009 (9)
    • February 2009 (5)
    • January 2009 (9)
  • ►  2008 (64)
    • December 2008 (1)
    • November 2008 (12)
    • October 2008 (19)
    • September 2008 (1)
    • July 2008 (2)
    • May 2008 (1)
    • April 2008 (6)
    • February 2008 (14)
    • January 2008 (8)
  • ►  2007 (36)
    • December 2007 (4)
    • November 2007 (3)
    • October 2007 (6)
    • September 2007 (10)
    • August 2007 (1)
    • July 2007 (2)
    • June 2007 (4)
    • May 2007 (1)
    • April 2007 (1)
    • March 2007 (2)
    • February 2007 (2)
  • ►  2006 (24)
    • October 2006 (4)
    • September 2006 (1)
    • May 2006 (1)
    • April 2006 (1)
    • March 2006 (2)
    • February 2006 (15)
  • ►  2005 (1)
    • December 2005 (1)
Simple theme. Powered by Blogger.