Re: whoami?
From: Shel Blauman [MSFT] (sheldonb_at_online.microsoft.com)
Date: 08/11/03
- Next message: Alek Davis: "Re: How to encrypt and decript a string variable"
- Previous message: Shel Blauman [MSFT]: "Re: feature or bug?"
- In reply to: Ric: "whoami?"
- Next in thread: Ric: "Re: whoami?"
- Reply: Ric: "Re: whoami?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 11 Aug 2003 10:15:40 -0700
You should be able to get it by running that code on the server. I don't
know if there's a way to get that from the client, the Remote Desktop
Connection is passing your logon information to the server, and I don't know
how you would pick that info up.
Shel
-- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Ric" <Ricky@Rios.org> wrote in message news:031f01c35ee8$f7150780$a101280a@phx.gbl... > Using > > AppDomain.CurrentDomain.SetPrincipalPolicy > (PrincipalPolicy.WindowsPrincipal); > WindowsPrincipal principal = (WindowsPrincipal) > Thread.CurrentPrincipal; > WindowsIdentity identity = (WindowsIdentity) > principal.Identity; > MessageBox.Show("You Are "+ identity.Name); > > In this example, "identity.Name" holds my username as user > of my local PC. > > If at the same time I'm logged in to a W200x server with a > different username, how do I get this last one? >
- Next message: Alek Davis: "Re: How to encrypt and decript a string variable"
- Previous message: Shel Blauman [MSFT]: "Re: feature or bug?"
- In reply to: Ric: "whoami?"
- Next in thread: Ric: "Re: whoami?"
- Reply: Ric: "Re: whoami?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
Loading