I've got an important resource folder (that can not be embeded in exe file) and I want to limit access of all Windows users except Admin Group ones. My program runs in normal (not Admin) user and I want give resource folder access only to this process. I can ask Adm开发者_如何学编程in user's password once, but I don't know is it possible or not?
You can start an elevated rights process from you application, do whatever is needed with admin rights and end it after.
Take a look here: http://victorhurdugaci.com/using-uac-with-c-part-1/
精彩评论