getting windows login details

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

How do you get the Windows login and password of the person who is
logged in? Is it possible?
 
hi Mike,

Mike said:
How do you get the Windows login and password of the person who is
logged in? Is it possible?
No.

mfG
--> stefan <--
 
You can sure get the login name... Environment.Username, password no...

VJ
 
Stefan Hoffmann said:
hi Mike,


No.

Well, yes to username, but not password. The password is collected in a
window on a trusted secure desktop that no other program can access.
 
hi VJ,
You can sure get the login name... Environment.Username, password no...
And what will be the (Boolean) result of Yes And No?

scnr
--> stefan <--
 
Sorry Stefan I did not understand your question

Here is what I meant to say,

You can get the Windows Login Name using the statement
string currentUser = Environment.Username;
You cannot get the Windows Login Password, not available to any program.

VJ
 
hi VJ,
Sorry Stefan I did not understand your question
The original question:
He asks for login _and_ password.

btw, I can only imagine one situation for what you will use such an
information... call me paranoid.


mfG
--> stefan <--
 
sure... understand.

VJ

Stefan Hoffmann said:
hi VJ,

The original question:

He asks for login _and_ password.

btw, I can only imagine one situation for what you will use such an
information... call me paranoid.


mfG
--> stefan <--
 
I have managed to do what I was trying to do without the password, with
the following code :

oNS.Logon(strUserName, System.Reflection.Missing.Value, false, true);

Now I need to do something a bit more difficult, I need to create a new
folder called archive programmatically and move the emails in my inbox
to it in a for loop.

Outlook.MailItem oMsg;
int i;

//Loop through each message
for (i = 1; i < oItems.Count + 1; i++)
{
oMsg = (Outlook.MailItem)oItems.Item(i);

//move msg to archive folder
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top