How does a program ask for administrator privileges?

前端 未结 4 718
忘了有多久
忘了有多久 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:10

    There are several articles on the Internet about developing elevated processes in Vista, but essentially elevation requests involve decorating .NET assemblies and WIN32 executables with elevation status in the application manifest file (may be embedded or side-by-side).

    There is an excellent blog post about your question which provides the code you'll probably need:

    .NET Wrapper for COM Elevation

提交回复
热议问题