title: How to run application with Admin privileges using Manifest file in Visual Studio 2005?
body: <p>I need to create an application which needs to create files/folders in "C:\Program Files","Users[username]" and Sys32. Also the application needs to make some registry entry.</p>
  
  <p>This application needs to work on Vista and higher. Also, on Windows Server 2003 and higher.</p>
  
  <p>The above Operating Systems have the concept of User Account Control (UAC), where to access Program Files and writing in registry requires admin privileges.</p>
  
  <p>I looked into many forums and found that using Microsoft SDK we can check whether the current user have admin privileges or not . But the function "CheckTokenMembership" fails for Vista and higher version of OS.</p>
  
  <p>I also found a solution where manifest file can be used to tell OS in advance that the current application requires admin privileges. This is done using "requestedExecutionLevel" tag.</p>
  
  <p>I am using Visual Studio 2005 to create the application. When we create an application in Visual Studio a default manifest file is created. Can I change this manifest file to include "requestedExecutionLevel" tag, so that my application always runs with admin privileges?</p>
  
  <p>Is there any other method through which my application runs with admin privileges without asking user (admin or standard) to run my application as "run as admin"??</p>
  
  <p>Thanks!</p>