Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have been trying to open other application with admin rights and i m having issues with that. I m using process.start to start the application but what i want to know is how can i get the run as dialog box to show up and prompt for other credentials?
Posted

1 solution

You don't.

It's simply really. You just provide your own dialog asking for the credentials, then you supply those to a ProcessStartInfo instance and pass that to Process.Start.

ProcessStartInfo[^] class
 
Share this answer
 
Comments
Zachary.shupp 9-Apr-12 20:55pm    
I was just trying that but one part that i didnt think about is that some people at work have cac cards that they would use to provide credentisals and i think the run as would work the best because it looks at both. do you think the processstartinfo class could work with cac cards?
Dave Kreskowiak 9-Apr-12 22:02pm    
What's a "CAC Card"??
Zachary.shupp 10-Apr-12 5:59am    
common access card. it holds a certificate to authenticate.
Dave Kreskowiak 10-Apr-12 15:13pm    
http://msdn.microsoft.com/en-us/library/aa375178.aspx

It's not the RunAs dialog box. It's the credentials dialog. I have no idea if it'll work with your cards. The only way to tell is to try it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900