Disable Vista UAC per-application, or elevate privileges without prompt?

前端 未结 3 1525
予麋鹿
予麋鹿 2021-01-01 05:14

I have an app that normal users need to be able to run, but requires administrator privileges to actually function.

I tried to make the shortcut that my users run it

3条回答
  •  遥遥无期
    2021-01-01 05:59

    Actually, why don't you just create a Task Schedule which runs the app with elevated privileges? As long as you setup the Task under elevation, it will not prompts you for a UAC when it is auto-run during reboot or whatever your trigger is.

    Just make sure you set level=requireElevation in your manifest file, and task scheduler will run your app with admin rights without prompting your user for admin rights, as this had already been established when you setup the task with admin privileges.

提交回复
热议问题