• Latest
  • Trending
  • All
  • News
Run the program without administrator rights and suppressing the UAC request

Run the program without administrator rights and suppressing the UAC request

May 27, 2021
All you need to know about network infrastructure security

All you need to know about network infrastructure security

March 23, 2022
3 things for better asset management

3 things for better asset management

March 23, 2022
What are the advantages & disadvantages of using ASP.NET?

What are the advantages & disadvantages of using ASP.NET?

April 6, 2022
PlayStation 5 Pro will be released in 2023 and will be twice faster PlayStation 5

PlayStation 5 Pro will be released in 2023 and will be twice faster PlayStation 5

March 22, 2022
Mobile processors Intel Arrow Lake-P will receive a graphics core for 320 EU blocks.

Mobile processors Intel Arrow Lake-P will receive a graphics core for 320 EU blocks.

March 7, 2022
Intel has introduced the Bonanza Mine system for Bitcoin mining

Intel has introduced the Bonanza Mine system for Bitcoin mining

March 4, 2022
Valve announced the release date of the portable game console Steam Deck

Valve announced the release date of the portable game console Steam Deck

January 27, 2022
Nvidia has created computers inspired by the movie “The Matrix: Resurrection”

Nvidia has created computers inspired by the movie “The Matrix: Resurrection”

January 25, 2022
How to hyperlink in word? How To Create A Hyperlink in word document?

How to hyperlink in word? How To Create A Hyperlink in word document?

December 22, 2021
AMD became the leader in revenue growth in 2021

AMD became the leader in revenue growth in 2021

December 22, 2021
UBS experts prefer not to bet on Intel in the coming year.

UBS experts prefer not to bet on Intel in the coming year.

December 22, 2021
how to edit margins in google docs?

how to edit margins in google docs?

December 22, 2021
  • Home
  • News
    • CPU
      • Amd
      • Intel
    • VGA
      • Nvidia
      • Radeon
    • HDD
    • SSD
    • RAM
  • All Lessons
    • Windows
    • Windows 10
    • Windows 8
    • Windows 7
    • Server
    • Windows Server 2008
    • Windows Server 2012
  • Browsers
  • Software
  • Virtualization
  • Contact us
Thursday, May 19, 2022
  • Login
Compspice
  • Home
  • News
    • CPU
      • Amd
      • Intel
    • VGA
      • Nvidia
      • Radeon
    • HDD
    • SSD
    • RAM
  • All Lessons
    • Windows
    • Windows 10
    • Windows 8
    • Windows 7
    • Server
    • Windows Server 2008
    • Windows Server 2012
  • Browsers
  • Software
  • Virtualization
  • Contact us
No Result
View All Result
Compspice
No Result
View All Result
Home All Lessons

Run the program without administrator rights and suppressing the UAC request

by Compspice
May 27, 2021
in All Lessons, Windows, Windows 10, Windows 7, Windows 8
2
Run the program without administrator rights and suppressing the UAC request
1.3k
SHARES
3.8k
VIEWS
Share on FacebookShare on Twitter

Many programs require elevation of rights at startup (the shield icon from the icon), but in fact for their normal operation, no administrator rights are required (for example, you manually give the necessary rights to users to the program directory in ProgramFiles and the registry branches that are used by the program). Accordingly, when launching such a program from a simple user, if UAC is enabled on the computer, a UAC prompt will appear and the user will be required to enter an administrator password. To get around this mechanism, many simply disable UAC or grant the user administrator rights on the computer, adding it to the local administrators group. Naturally, both of these methods are unsafe.

Why would a regular application need admin rights in Windows


Administrator rights may be required for the program to modify certain files (logs, configurations, etc.) in its own folder in C: \ Program Files (x86) \ MyApp). By default, users do not have rights to edit this directory, respectively, for the normal operation of such a program, administrator rights are required. To solve this problem, you need to manually assign an edit / write permission for a user (or the Users group) to the program folder under the NTFS level administrator.

 

Note. In fact, the practice of storing changing application data in its own directory in C: \ Program Files is incorrect. It is more correct to store application data in the user profile. But this question is about the laziness and incompetence of the developers.
Run a program that requires administrative rights from a regular user
We have previously described how you can disable the UAC request for a specific program using the RunAsInvoker parameter. However, this method is not flexible enough. You can also use RunAs with saving admin / SAVECRED password (also unsafe). Consider a simpler way to force any program to run without administrator rights (and without entering the admin password) with UAC enabled (4.3 or 2 UAC slider level).

For example, let’s take the registry editing utility regedit.exe (it is located in the C: \ windows \ system32 directory). When you start regedit.exe, the UAC window appears and, if you do not confirm the privilege elevation, the registry editor does not start.

 

Create a run-as-non-admin.bat file on your desktop with the following text:

cmd / min / C “set __COMPAT_LAYER = RUNASINVOKER && start” “% 1”

Now, to force the application to run without administrator rights and suppress the UAC request, simply drag the required exe file onto this bat file on the desktop.

See also : The security database on the server does not have a computer account for this workstation trust relationship

Similarly, you can run through the bat file and a specific application, it is enough to specify the path to the executable file.

run-app-as-non-admin.bat

Set ApplicationPath = “C: \ Program Files \ MyApp \ testapp.exe”
cmd / min / C “set __COMPAT_LAYER = RUNASINVOKER && start” “% ApplicationPath%”

You can also add a context menu that adds the ability to run without elevation for all applications. To do this, create the following reg file and import it into the registry.

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT \ * \ shell \ forcerunasinvoker]
@ = “Run as user without UAC elevation”
[HKEY_CLASSES_ROOT \ * \ shell \ forcerunasinvoker \ command]
@ = “cmd / min / C \” set __COMPAT_LAYER = RUNASINVOKER && start \ “\” \ “% 1 \” \ “”

After that, to launch any application without admin rights, just select the “Run as user without UAC elevation” item in the context menu.

The environment variable __COMPAT_LAYER and the RunAsInvoker parameter
The environment variable __COMPAT_LAYER allows you to set different compatibility levels for applications (the Compatibility tab in the properties of the exe file). Using this variable, you can specify the compatibility settings with which you want to run the program. For example, to run an application in compatibility mode with Windows 7 and a resolution of 640 × 480, set:

set __COMPAT_LAYER = Win7RTM 640×480

Most Of the interesting options for the variable __COMPAT_LAYER, we select the following parameters:

RunAsInvoker – launch application with the privileges of the parent process without asking UAC.
RunAsHighest – launch the application with the maximum rights available to the user (the UAC request appears if the user has administrator rights).
RunAsAdmin – start the application with administrator rights (AUC request always appears).
Those. the RunAsInvoker parameter does not provide administrator rights, but only blocks the appearance of the UAC window.

Share536Tweet335Share134
Compspice

Compspice

  • Trending
  • Comments
  • Latest
What is SysMain service and how to enable it in Windows 10 easily

What is SysMain service and how to enable it in Windows 10 easily

May 27, 2021
Touchpad not working  on a laptop? 5 ways to solve the TouchPad problem

Touchpad not working on a laptop? 5 ways to solve the TouchPad problem

February 25, 2019
How to Fix No Sound on Laptop or Computer

How to Fix No Sound on Laptop or Computer

February 25, 2019
Run the program without administrator rights and suppressing the UAC request

Run the program without administrator rights and suppressing the UAC request

2
ntdll.dll crash error in Windows 10

ntdll.dll crash error in Windows 10

1
What is SysMain service and how to enable it in Windows 10 easily

What is SysMain service and how to enable it in Windows 10 easily

1
All you need to know about network infrastructure security

All you need to know about network infrastructure security

March 23, 2022
3 things for better asset management

3 things for better asset management

March 23, 2022
What are the advantages & disadvantages of using ASP.NET?

What are the advantages & disadvantages of using ASP.NET?

April 6, 2022
Compspice

Copyright © 2017 -2022 Compspice. Website developed by Zair Abdiyev . SEO and SMM by Digitallab marketing agency

Navigate Site

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Follow Us

No Result
View All Result
  • Home
  • News
    • CPU
      • Amd
      • Intel
    • VGA
      • Nvidia
      • Radeon
    • HDD
    • SSD
    • RAM
  • All Lessons
    • Windows
    • Windows 10
    • Windows 8
    • Windows 7
    • Server
    • Windows Server 2008
    • Windows Server 2012
  • Browsers
  • Software
  • Virtualization
  • Contact us

Copyright © 2017 -2022 Compspice. Website developed by Zair Abdiyev . SEO and SMM by Digitallab marketing agency

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In