Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Programmatically Setting the Application's Privilege Level?

Programmatically Setting the Application's Privilege Level?

Scheduled Pinned Locked Moved C#
csharpvisual-studiowindows-adminquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    That Asian Guy
    wrote on last edited by
    #1

    In Windows Vista, the privilege of the application can limit many parts such as registry access etc. Is there a way to set the provilege level to "Run this program as an administrator" when you click build in Visual Studio? Thanks.

    R 1 Reply Last reply
    0
    • T That Asian Guy

      In Windows Vista, the privilege of the application can limit many parts such as registry access etc. Is there a way to set the provilege level to "Run this program as an administrator" when you click build in Visual Studio? Thanks.

      R Offline
      R Offline
      Ravadre
      wrote on last edited by
      #2

      I guess, you can do it through manifest when building application. More info fe. here: http://channel9.msdn.com/posts/jmazner/How-To-Tell-Vistas-UAC-What-Privelege-Level-Your-App-Requires/[^] If you need more tools to interact with UAC at runtime, try looking at this little unmanaged code (which you can use using PInvoke): http://www.softblog.com/2008-02/vista-tools/[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups