Have the rights to launch the game. Running the program without administrator rights and suppressing the UAC request. __COMPAT_LAYER environment variable and RunAsInvoker parameter

To install some software Administrator rights are required. In addition, the administrator himself can set restrictions on the installation of various software. In the case when you need to perform an installation, but there is no permission for it, we suggest using several simple methods described below.

There is a lot of different software on the Internet that allows you to bypass security and install programs under the guise of an ordinary user. We do not recommend using them especially on work computers, as this can have serious consequences. We will present safe installation methods. Let's take a closer look at them.

Method 1: Granting rights to the program folder

Most often, the software requires administrator rights when actions will be carried out with files in its own folder, for example, on the system partition hard drive. The owner can grant full rights to other users to certain folders, which will allow further installation to be performed under the login of a regular user. This is done as follows:


Now, during installation of the program, you will need to specify the folder to which you provided full access, and the whole process should be successful.

Method 2: Run the program from a standard user account

In cases where it is not possible to ask the administrator to grant access rights, we recommend using the built-in Windows solution. Using the utility via command line all actions are carried out. You only need to follow the instructions:


Method 3: Using a portable version of the program

Some software has portable version, which does not require installation. All you need to do is download it from the developer’s official website and run it. This can be done very simply:


You can transfer the software file to any removable storage device and run it on different computers without administrator rights.

Today we looked at several simple ways how to install and use various programs without administrator rights. All of them are not complicated, but require certain actions. We recommend that to install the software, simply log in with account administrator, if available. Read more about this in our article at the link below.

IN operating system In Windows, in certain situations, tools must be used with elevated privileges. This is necessary because of actions that lead to changes at the system level and ordinary users(non-admins) don't need this. In this article I will talk about running any application on your computer as administrator.

When you launch programs with elevated rights, a window appears in which you need to confirm the launch -. Some users disable this feature altogether. Thus, the security of the computer is compromised. After all, if the UAC warning window does not appear, any malicious infection will be able to start from your computer as an administrator. “Bad” code and good luck.

To make it easier for users to run programs as an administrator, I have prepared a couple of methods.

Run as administrator using context menu

The context menu is called up with the right mouse button. Click on any program with the mouse and from the context menu click on the option “ Run as administrator" This opens the command line and other programs where elevated privileges are required.

Using the combination Ctrl+Shift+Enter when searching

When there is no tool on the desktop or in the Start menu, we turn to search. Any Windows version equipped with it, and in the tenth it is most convenient. Write some command, for example, cmd - command line. Having selected the result, simultaneously press the combination Ctrl+Shift+Enter. Simple way isn't it?

Additional Shortcut Properties

Let's say you are interested in the question... The icon is already located on the desktop as quick access, but you don't want to run it all the time context menu. This problem can be solved.

Go to the shortcut properties (right mouse button and Properties) and go to the section “ Additionally».

Will open Extra options. There, check the “Run as administrator” option. Now, when you run the program normally, it will always open with elevated rights.

Additionally! In the properties on the "Compatibility" tab there is an option "Run this program as an administrator." Also a useful thing.

Programs to run as administrator

There are the following programs: RunAs, AdmiLink, ExecAS.

RunAs Tool

It is part of Windows, so you can use it. To run it, just open the command line and enter the following command:

You will most likely be asked to enter a password. Be sure to enter it.


Let's create a shortcut on the desktop. Right-click on an empty area and select “Shortcut”. We write the same command as the location:

runas /user:PCName\UserName msconfig.exe

Give the shortcut a name and save it.

After launching the shortcut, a command line will open where you need to enter the password for the account. When you enter the correct data, msconfig or the utility you selected will immediately launch.

In this situation, you or people with access to the PC will have to enter a password every time. This point can be solved by adding the /savecred parameter to the command, then the command will be like this:

runas /savecred /user:PCName\UserName msconfig.exe

If you are thinking about security, then it is better not to use such shortcuts with this option. It’s better to enter your password every time and not worry that some impudent person will use it using Windows without a password to please yourself and to your detriment.

Using the ExecAS tool

Running as administrator is possible using the ExecAS program. After launch, a window appears asking you to enter account information (login and password), as well as the program name and path. After entering the data, click “ Write down».


Our guinea pig appeared in the ExecAS window. Close the program and open it again. The program we specified in ExecAS will immediately open. To add an additional application, you need to enter ExecAS.exe /S on the command line. (In this case, you need to be in the directory with the utility, for example, C:\ExecAS).


Having launched ExecAS, we add some other program. Close the tool and launch it again. The same window appears. But this is not convenient for us, so let’s move on to creating shortcuts:

We make two shortcuts with the following commands:

  • C:\ExecAS\ExecAS.exe 1
  • C:\ExecAS\ExecAS.exe 2

Numbers 1 and 2 correspond to the program number in ExecAS.

Having launched the shortcuts, we see that they were opened as administrator.

Using the AdmiLink utility

The utility specified in the title is a console utility, and after installation it will be located in the Windows directory.

We launch the tool and see a very convenient window with a Russian interface, so it will be easy to figure it out.

  • In the first field, enter the path to the file that we want to run;
  • The command line parameters in the second field are optional;
  • The third line will be filled in independently, if this is not the case, enter C:\windows\system32
  • Window display mode. Line 4 has 2 parameters:
    • SHOW – standard software launch with a visible window;
    • HIDE – software runs in the background;

Configuring parameters on the tab Account:

  • For the domain name, write the name of your PC, or NetBios and test.lan;
  • Username – can be selected by clicking on the button with three dots;
  • Account password and confirm.
  • After entering all the data, click the " Test».

The utility will check the functionality of the information we specified. Press any key in CMD.

After a successful test, click the " Generate AdmiRun launch key" If you don't do this, then nothing will work.

  • Go to the “Link” tab and do the following:
  • Shortcut name- call by any name;
  • Catalog– indicate where the shortcut will be located;
  • Picture– select an image for the shortcut;
  • Click the “Generate command line” button.
  • Now click the big “Create Shortcut Now!” button.

The icon will immediately appear on the desktop or directory you specified.

Let's try to launch the shortcut. If everything went well and the program was launched as administrator, then congratulations. Otherwise, actions at some step were performed incorrectly.

If you go to the properties of the shortcut and change the program in the “Object” field to another, it simply will not start. This is a little protection against malware.

Task Scheduler

Run the program as an administrator, just use the “ Task Scheduler" There is one nuance here - if you are not an administrator, you will not be able to use it.

Enter just two words in the search: “Task Scheduler” and open the result. In the window on the right, select the item “ Create a task».

Call it an appropriate name, let's say you are launching the command line, then you can call it CMD. We also check the “Run with highest rights” checkbox.

Shortcut creation stage

Create a shortcut on the desktop and enter the following command:

schtasks /run /tn task_name in scheduler

scheduler_task_name is the name you gave at the very beginning of the task creation process.

Hurray, we made the shortcut, but that's not all. Go to its properties.

On the Shortcut tab, change the icon. Of course, you don't have to do this.

Addition to the task scheduler method

conclusions

We looked at a bunch of ways to run programs as an administrator. There are options where you need to enter a password - this is one of the safest solutions, because every time we enter a password, we don’t have to worry too much about losing any data. Virus programs will also not be able to run Windows tools in this manner.

Many programs require elevation of rights upon startup (a shield icon appears next to the icon), but in fact, for them normal operation no administrator rights are required (for example, you manually provided necessary rights users to the program directory in ProgramFiles and registry branches that are used by the program). Accordingly, when running such a program as a simple user, if User Account Control is enabled on the computer, a UAC prompt will appear and the user will be required to enter the administrator password. To bypass this mechanism, many simply disable UAC or grant the user administrator rights on the computer by adding him to the local administrators group. Naturally, both of these methods are unsafe.

Why a regular application might need administrator rights

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

Note. In fact, the practice of storing changing application data in its own directory under C:\Program Files is incorrect. It is more correct to store application data in the user profile. But this is a question of laziness and incompetence of developers.

Running a program that requires administrator rights from a standard user

We have previously described how you can use the RunAsInvoker parameter. However, this method is not flexible enough. You can also use it with saving the admin password /SAVECRED (also unsafe). Let's consider a simpler way to force any program to launch without administrator rights (and without entering the admin password) with UAC enabled (4.3 or level 2).

For example, let's take the registry editing utility - regedit.exe(it is located in the C:\windows\system32 directory). When you run regedit.exe, a UAC window appears and, unless you confirm the privilege elevation, the Registry Editor does not start.

Let's create a file on the desktop run-as-non-admin.bat 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 prompt, simply drag the desired exe file onto this bat file on the desktop.

After this, the Registry Editor should start without the UAC prompt appearing. Open the process manager and add a column Elevated(With higher permissions), you will see that the system has a regedit.exe process with a non-elevated status (running with user rights).

Try editing any parameter in the HKLM branch. As you can see, access to edit the registry in this branch is denied (this user does not have rights to write to the system registry branches). But you can add and edit keys in the user's own registry branch - HKCU.

In the same way, you can launch a specific application through a bat file, just 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, which adds the ability for all applications to launch without elevation. To do this, create the following reg file and import it into the registry.

Windows Registry Editor Version 5.00


@="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""

After this, to launch any application without administrator rights, just select the “” item in the context menu.

__COMPAT_LAYER environment variable and RunAsInvoker parameter

Environment variable __COMPAT_LAYER allows you to set different compatibility levels for applications (tab Compatibility in properties exe file). Using this variable, you can specify the compatibility settings with which the program should run. For example, to run the application in Windows 7 compatibility mode and 640x480 resolution, set:

set __COMPAT_LAYER=Win7RTM 640x480

Among the options of the __COMPAT_LAYER variable that are interesting to us, we highlight the following parameters:

  • RunAsInvoker- launching an application with the privileges of the parent process without a UAC request.
  • RunAsHighest- launching the application with maximum rights available to the user (the UAC request appears if the user has administrator rights).
  • RunAsAdmin- launch the application with administrator rights (the AUC prompt always appears).

Those. The RunAsInvoker parameter does not provide administrator rights, but only blocks the appearance of the UAC window.




Top