Home > Security, Windows > How to set Run this program as Administrator via registry

How to set Run this program as Administrator via registry

At one of my customer I was implementing SAP GUI into Terminal Services farm. When you run SAP GUI as Administrator, SAP GUI works perfectly.

One solution is to force SAP GUI (or other applications) to “run as Administrator” priviledge by GPO or other central managed way. Solution is following:

For current user you can set following registry key:

<strong>HKEY_CURRENT_USER\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers</strong>


For all users:

<strong>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers</strong>


Under specific registry key:

  • Create REG_SZ value with name as full path to executable (if path contains spaces, do not surround it with quotes)
  • Data for this value must contain string RUNASADMIN

As showed on picture:


Disable UAC for application

Disable UAC for application


And now we have SAP GUI functional normally.



  1. Allen
    February 25th, 2014 at 12:36 | #1


    Tried it. it works! thanks man.

  2. February 25th, 2014 at 13:00 | #2

    You are welcome.

  3. Will S.
    August 14th, 2014 at 14:36 | #3

    I have a VDI infrastructure that we had several applications that would need to be run as admin. This trick of yours saved me from having to educate all my users on how to right-mouse-click and run as admin!

    Good on you sir!

  4. poynter admin
    June 17th, 2015 at 10:48 | #4

    A year on and this article is still solving problems. thanks a million for this you just saved me rebuilding 3 laptops.

  5. June 17th, 2015 at 18:27 | #5

    Have to help you out 🙂

  6. July 9th, 2016 at 10:36 | #6

    Hi Ondrej, thanks for sharing this. But is there a way to run a specific application always as admin via GPO without making user a local admin or domain admin?

  7. July 18th, 2016 at 13:57 | #7

    Do you mean to run application when someone non-admin logs in?

  8. August 17th, 2016 at 03:37 | #8

    @Ondrej Žilinec
    Yupp. A way via GPO to run specific apps as admin even when non-admin is logged in.

  9. Sagar
    August 17th, 2016 at 14:01 | #9

    @Ondreh Zillinec Great Article!!! A knowledgeable one !!! I am working in an IT firm. In my office .. i don’t have admin access and admin password. I have figured out a way to download softwares exe on my machine. But is there any way by which i can install these softwares. I tried it with UNIEXTRACT.exe but it is not working for all softwares. Let me know if there any way or any article to follow for this.

    Thanks in advance

  10. riyad ali
    November 9th, 2018 at 11:40 | #10

    What regkey and what folder would I use to say run Notepad or Notepad++ as admin and without the UAC?

  11. Casey H
    January 15th, 2020 at 21:24 | #11

    What is the impact on domain admins? Are users required to be a member of the local Administrator group or is it sufficient to be a member of the domain Administrator group?

  12. Arnaldo Maggiora Vergano
    September 24th, 2020 at 11:00 | #12

    Rahul :
    @Ondrej Žilinec
    Yupp. A way via GPO to run specific apps as admin even when non-admin is logged in.

    Any answer?

  13. Rubbertfg
    January 28th, 2021 at 19:09 | #13

    manuscripts underwent in the Middle

  14. Flashpaqnud
    February 6th, 2021 at 14:10 | #14

    written on the parchment was scratched out

  15. Artisanwzx
    July 7th, 2021 at 03:39 | #15

    among them acquired “Moral

  16. Ascentokd
    July 16th, 2021 at 11:29 | #16

    new texts were rewritten

  17. Furrioncvy
    August 6th, 2021 at 07:18 | #17

    among them acquired “Moral

  18. Businessdtz
    August 30th, 2021 at 23:19 | #18

    book about the chess of love “, created by

  1. No trackbacks yet.