Bypass Windows UAC prompt

Quang Nguyen 20 Reputation points

Hello, I have two application A and B will run on Windows. Application A run with normal permission and application B will run with administrator permission.

When I launch application B from application A, Windows always shows a prompt to get accept run B from user.
I got understand that this is security feature of Windows (UAC).

Do we have any C++ API for accept (yes) to UAC consent prompt and API for input user credential for UAC credential prompt?

I try found but not see any document talking about this.

Thank you.

Screenshot showing the UAC consent prompt.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,946 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 32,156 Reputation points Microsoft Vendor

    Hi Quang Nguyen,

    It's not allowed to bypass the User Account Control for security reasons. However, you can give a try to runas if you want the application to run as administrator.

    Best Regards,

    Ian Xue

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments