I have an application, which normally runs without need for admin priviliges.
The program includes tool for automatic update (download files from web and replace local files). Depending on location of application in user's computer, some users do not have privileges to manipulate those updated files and therefore automatic update fails.
I would like to implement functionality, which prompts user to run this task as admin (User Access Control window). I already have code which checks, whether user has access to those files, I just do not know, how to invoke User Access Control window (for File.Move
and/or File.Copy
)
I do not want user to run the application as administrator. Admin rights are needed just for file manipulation and only in case when user does not have access to those files already. The application runs on Windows Vista and higher.
Any help is appreciated.
Thanks, Zbynek