John

John

  • NA
  • 17
  • 0

prompting for Username and Password

Jan 20 2008 11:29 PM

Being new to C# I felt I should start by trying to re-write a windows shell script that I had been using. I used to get around the credentials issue by running it from a command prompt through a runas command.  Now I need to figure out how to get my program to use user provided credentials.  I would like for a prompt to come up for username/password and verify those credentials before it displays the main form of the application.

I've found references to using CredUIPromptForCredentials but I'll be buggered if I can figure out how to use it or even where to begin. I'm not even sure where to start inserting the code snippets I've found.

for reference, my application simply takes a list of computers and copies a file to each machine in the list. the computers are in a seperate domain and require administrative credentials to really do anything with them.  Can anyone help with this? Thanks in advance!


Answers (1)