Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8279813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:27:03+00:00 2026-06-08T09:27:03+00:00

I have a VS2010 solution with 2 projects in it – a .NET 4

  • 0

I have a VS2010 solution with 2 projects in it – a .NET 4 program, and an installer for it. The Installer is just a simple Setup Project with a prerequisite – .NET Framework 4.

The problem is that I need the installer setup.exe to always run as Administrator otherwise the setup will fail under the UAC. (It does not prompt me for privilege elevation by default.)

I tried putting a setup.exe.manifest (shown below) alongside the setup.exe to force it to run as administrator, but unfortunately Windows ignores it, most likely because there is already another manifest file embedded within the setup.exe itself and it’s set to asInvoker rather than requireAdministrator.

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
</asmv1:assembly>

I also tried adding a launch condition with the following properties:-

(name): Elevated
Condition: Privileged
Message: This installation requires elevated permissions to continue.

That doesn’t do a thing either.

So can anyone please shed a light on how to solve this issue?

P.S. I know you can workaround this issue by changing the compatibility settings of the setup.exe, but this is a manual process and cannot be done via an automated build process (TFS). Also, providing a shortcut with compatibility setting is also weird, since no one provide a shortcut to a setup.exe in the same folder, not to mention that the shortcut needs to know the exact path of the setup.exe beforehand. (The setup package will be moved around.)


Edit: By the way, my problem is exactly the same as the one described here. But unfortunately, no solutions were found for that guy and the asker just resort to ask his clients to use Run As Administrator manually, which is what I’m trying to avoid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:27:04+00:00Added an answer on June 8, 2026 at 9:27 am

    As pointed out by Frank, the Visual Studio setup project’s behavior is documented at Microsoft’s web site:

    Visual Studio Installer Deployment

    In other words, the setup.exe produced by VS008 and VS2010 will always be run without prompting for privilege elevation (unless you explicitly run it using the ‘Run As Administrator‘ context menu option). It in turns will run each prerequisite component as well as the main MSI installer as separate processes and prompts for privilege elevation for any of them that needs it. This means that there may be multiple prompts for elevations.

    However, for some reasons this does not always work. In my case, the elevation prompt for the .NET Framework prerequisite does not come up at all when I run setup.exe. But if I run the prerequisite installer directly, the prompt will come up. This means that the problem lies not with the prerequisite component, but with either setup.exe or with Windows itself.

    The solution (or workaround)? According to Microsoft in the link above, we can force setup.exe to launch each prerequisite component and the main MSI to run with elevation prompts. To do this, we need to manually edit the setup project file (.vdproj) and change the following RequiresElevation value to TRUE, as shown below:

    "MsiBootstrapper"
    {
        "LangId" = "3:1033"
        "RequiresElevation" = "11:TRUE"
    }
    

    This is not the ideal solution, but it is close enough to my original requirement, so I’m satisfied with this solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a solution in VS2010 with 3 projects: WCFServiceLib - a project created
I have a VS2010 solution that has two projects. The first project [DevLib] is
I have a solution in VS2010 with several projects, each making up a layer
If I have a setup project in a VS 2010 solution and I add/remove
I have VS2010 and solution with many projects, I want to add MSBuild script
I have a VS2010 solution with 5 projects. Two of these projects are called:
I have a VS2010 (RTM) solution which contains: WCF Service project Console WCF client
I have one solution in VS2010 containing two MVC 3 projects. These are two
I am developing a solution in VS2010 which involves 2 projects. The first project
Using: MVC3, Vs2010, and a DbProject In a Solution I have an MVC3 project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.