How to stop "Do you want to allow this app from an unknown publisher to make changes to your device" prompt without disabling UAC?

Jeff Nygren 121 Reputation points
2021-12-08T17:02:15.143+00:00

I have various desktop apps that I or my company have written. They are for use only to people within my company, on our (Windows 10 Pro) work PCs. Yes, I trust these apps and this 'publisher'! EVERY time any of these apps is run, the user is prompted with "Do you want to allow this app from an unknown publisher to make changes to your device?" What is the proper way to eliminate this prompt for just these apps, without completely disabling User Account Control (UAC)?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} vote

Accepted answer
  1. EckiS 916 Reputation points
    2021-12-08T18:05:32.083+00:00

    the proper way is to sign your application.
    how you sign them depends on your build pipeline.

    3 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Kapil Arya 8,456 Reputation points MVP Volunteer Moderator
    2021-12-09T12:21:49.537+00:00

    Hello,

    If you don't want to disable User Account Control (UAC), then I'm afraid if there is any other way to bypass it. You've to simply bear with that UAC prompt by clicking Yes.

    Regards.

    1 person found this answer helpful.

  2. Limitless Technology 39,926 Reputation points
    2021-12-10T09:23:44.927+00:00

    Hi JeffNygren-2880,

    Thank you for your question and for getting in touch.

    Maybe I have found a "middle" solution. I found a cmd command that allows me to force an application to run as a normal user, thus without prompting for admin rights.

    The command I use is the following (I created a .bat file):

    cmd / c "set __COMPAT_LAYER = RUNASINVOKER && start" "" application path "

    with the actual application .exe file, I want to run instead of the "application path". With that, the app works without asking me anything. Of course it works WITHOUT the admin rights, so maybe it can give me some problems later on (but I think this would only happen if I needed to do something outside of the app).

    I also created a "send to" link (I just copied another .bat file into the SendTo folder) so I can run any application I want, without the administrator prompt, just right-clicking, selecting "send to" and choosing the file .bat I created, which is a little different:

    cmd / c "set __COMPAT_LAYER = RUNASINVOKER && start" "%1"

    In short, I think the problem was not that the app was from an unknown publisher, but just that the same app was created to run with admin rights.

    I can also change the .exe with an application called Resource Hacker (created by Angus Johnson), which despite its name, is not dangerous at all and allows you to modify the code of an .exe file and, for example, remove the "administrator account required "rule to run it.

    Another possible solution that I haven't tested is to create a .bat file that automatically runs the application as an administrator account (entering username and password) and then change that .bat file to an .exe file with IExpress (integrated into Windows on program) to hide the username and password (well, it's easier to see them in a .bat file than in an .exe file, isn't it?)


    If the answer is helpful, please vote positively and accept the answer.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.