How does a program ask for administrator privileges?

前端 未结 4 716
忘了有多久
忘了有多久 2020-12-19 08:36

I am developing an application using vb.net. For performing some tasks the application needs administrator privileges in the machine. How to ask for the privileges during th

4条回答
  •  情歌与酒
    2020-12-19 09:13

    IN VS 2015: Go to: Project -> (name of project) Properties... -> Application -> View Windows Settings and find in app.manifest (line 19): And change asInvoker to:

    1. "asInvoker" (same access token as the parent process)
    2. "requireAdministrator (require full administrator)
    3. "highestAvailable" (highest privileges available to the current user)

提交回复
热议问题