---
title: "What is requestedExecutionLevel in a Windows application manifest?"
description: "requestedExecutionLevel tells Windows whether an app needs administrator rights. Learn asInvoker, highestAvailable, requireAdministrator and the manifest."
url: "https://bugsee.com/answers/dotnet/understanding-requestedexecutionlevel-in-windows/"
---

# What is requestedExecutionLevel in a Windows application manifest?

It is a setting in the app manifest that tells Windows which privileges the program needs: `asInvoker` (normal rights), `highestAvailable` or `requireAdministrator` (triggers the UAC prompt).

```xml
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>
```

- asInvoker: runs with the same rights as the user who started it. This is the right default.
- highestAvailable: uses administrator rights if the user has them, otherwise runs normally.
- requireAdministrator: always asks for elevation and will not start without it.
- In Visual Studio, add the file with Add > New Item > Application Manifest File; it is then used when you build the project.
- Request administrator rights only for what really needs them, such as installers. Elevated programs cannot be dragged onto from normal ones and users see a prompt on every launch.

## Related questions

- [How do you get a file extension in C#?](https://bugsee.com/answers/dotnet/how-to-get-file-extension-in-c/)
