I have a project with a manifest file with the following node:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
...meaning I want it to only run "as administrator" by default.
from searching around, to make this work I have two options:
I've tried option 2, and when I run my app it doesn't ask for admin rights?
So, how do I do option 1 in VS2010? I've heard of mt.exe, but this is no good to me as it's done post build. I need the option to part of the solution and the project file itself.
So, how do I make this work? I'll be happy to do 2, but it doesn't seem to work?
In Visual Studio 2010 (until 2019 and possibly future versions) you can add the manifest file to your project. Right click your project file on the Solution Explorer, select Add , then New item (or CTRL+SHIFT+A). There you can find Application Manifest File . The file name is app.
The file is located at WorkspaceName>/temp/<AppName>/build/luaandroid/dist. The manifest file provides essential information about your app to the Android operating system, and Google Play store. The Android manifest file helps to declare the permissions that an app must have to access data from other apps.
In Visual Studio 2010 the default setting for a new project is to embed the manifest in the application (option #1). By default though a default manifest is included. What you need to do is add a custom manifest.
This will add a file named app.manifest to the project. Open that file and modify the line to be the following
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
This should also work in Visual Studio 2008.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With