I have a C# program that I am trying to run as a scheduled task. It will run successfully if 开发者_运维百科the user is logged in as the computer administrator. However, if the log in is an admin user, a user with admin privileges, the task errors.
The "run only if user is logged in" checkbox is not selected.
Any ideas on how to give the admin user the same privileges as the computer administrator?
Thanks!
You could check out Developing Applications that Require Administrator Privilege. The first link is Elevated Task Model, which says An application running as a standard user performs operations that require administrator privilege by starting a scheduled task.
精彩评论