Running an app on Windows with administrative privilages without the confirmation prompt

Posted on 2012-08-31
Last Modified: 2013-02-06

I use NSIS tool to install my C++ application on Windows. My app is not using Microsoft .NET framework or Visual C++ I want to install it so that it will always run as administrator on Windows and it will not require the UAC promt. But I don't want to turn off the whole UAC. So every time a user launches my app on Windows 7, XP or Vista, there will be no confirmation prompt for administrative privilages, but my app will run with administrator privilages automatically.  

Thank you for help in advance
Question by:tomasCZ1
    LVL 11

    Expert Comment

    As far as I know this is unfortunately not possible when UAC is turned on (Windows Vista and 7,  Windows XP does not have UAC). It's possible to modify the privilege level of the exe, and select "Run this program as an administrator" for all users
    or change the shortcut to the application and select the option "Run as administrator" (Advanced button).
    In this way the application will run as an Administrator, however, the user will still get a confirmation prompt.

    (if Windows would somehow give this possibility the essence of UAC is probably gone)

    Author Comment

    How does so many programs on Windows can run with administrative privileges without a confirmation prompt?

    I appreciate your assistance.
    LVL 11

    Accepted Solution

    Most of these applications run as a service (services.msc) under the local SYSTEM, Network Service or Local Service accounts. If you can rewrite your application to run as a service and have a sort of frontend for the user which talks to this service this might be an option.

    The following links do also contain more info about your question:

    These articles describes certain workarounds with e.g. the Task Scheduler or with an external runas program to start programs with Administrative permissions without the UAC prompt.
    The Task Scheduler method works because programs can also be executed via the Task Scheduler and started with "Run with highest privileges" without getting an UAC prompt. But when creating such a Task the user account has to be defined so it only works for 1 user.
    The runas method, which uses a 3rd party program, needs a user account/passwords and writes this info in an encrypted password file so it's not very secure.
    For a normal application this is something you don't prefer to do or might not be possible.

    An alternative, for running your application as a service without having to rewrite it, might be
    This is commercial software which you can also integrate in your application installation and lets your application run as a service.
    LVL 40

    Expert Comment

    by:Vadim Rapp
    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
    The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
    The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
    The viewer will learn how to download, install and use CrashPlan from on Windows 7. Open your browser and go to Click get started, it’s free then Click the Download CrashPlan button: Click save in Internet Explorer, the…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now