Saturday, May 05, 2012 9:32 AM
Saturday, May 05, 2012 9:55 AM
Sure. There are basically to approaches:
- Use a separate process, a Windows Service, which has the necessary privileges. Use any IPC method to communicate with it.
- Use impersonation in your application.
The first approach makes only sense when you have more than one process which requires elevation. The second could be used to wrap any method in an elevated context.
- Marked As Answer by Lisa ZhuMicrosoft Contingent Staff, Moderator Monday, May 07, 2012 4:33 AM
Saturday, May 05, 2012 10:06 AMThank you very much!
Saturday, May 12, 2012 6:47 AM
Excuse me, but what if I don't want the users to provide the user name and password?
Saturday, May 12, 2012 11:46 AMThen you should consider the Windows Service approach. The service gets the credentials setup when it is installed once. So the users do not need to provide any information.
- Marked As Answer by Lisa ZhuMicrosoft Contingent Staff, Moderator Tuesday, May 15, 2012 9:59 AM