Bypass Windows UAC prompt

Quang Nguyen 20 Reputation points
2023-11-06T10:15:51.8766667+00:00

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
    2023-12-22T06:38:29.7433333+00:00

    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.

    https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc771525(v=ws.11)

    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