TVs. Consoles. Projectors and accessories. Technologies. Digital TV

All programs run as administrator. We make it easier to run applications in Windows as an administrator without disabling UAC. Granting rights to the program folder

If all programs were run as administrator by default, it would be much easier for viruses to penetrate the system. Administrator rights give the program full privileges. Without them, it is impossible to make changes to the system. Many applications only run as administrator, because... they need full access to the system.

Most programs usually request permissions automatically. For this purpose, Windows has User Account Control. Some programs do not do this and must be launched manually as an administrator. In this article, you will learn about the main ways to run any program as an administrator in Windows 10, Windows 7. By and large, the instructions are universal and suitable for any version of the OS.

Windows 10

First of all, this instruction is written for Windows 10, since firstly it is more relevant than previous versions, and secondly, it is installed on my computer. Theoretically, your actions will not be different for other versions of the OS. Here are the most simple ways Run the program as administrator in Windows 10:

  • Select an application or shortcut and press Ctrl + Enter;
  • Right-click on the program shortcut/executable file and select “Run as administrator”;
  • Right-click on the shortcut or program file, select Properties. Go to the "compatibility" tab and select "Run this program as an administrator."

This is what the window for setting up running the program as an administrator on an ongoing basis looks like. Once you have checked this item, you will not need to constantly right-click on the program. The program will run as administrator by default.

Constantly running the program as administrator

Windows 7 and others

By and large, the process of launching the program as an administrator is completely identical to that described above. Be careful - you are giving the program full access to the system. If you are not sure of its origin, think a few times before launching it. Otherwise you can enter operating system viruses or unwanted programs.

It is best to download programs from official sites, especially since they are quite easy to find. By the way, the site has separate instructions for.

How to run a program as a non-administrator

Sometimes you need to run a program not as an administrator, that is, with normal privileges. There are reasons for this - for example, you are not sure of the origin of the program and it may contain a virus. The simplest option is with disabilities, that is, without administrator rights. You can also use the runas command. Command syntax:

RUNAS [ ] /user: username program

Usage example:

Runas /user:pc_name\justuser cmd.exe

Run cmd.exe as user pc_name from the computer named pc_name. These commands must be entered at the command line. That's all - now you know at least two options for running the program as a NON-administrator: by logging into an account without administrator rights and using the runas command.

I hope that this instruction helped you solve the problem. If you have any questions, write them in the comments. We will definitely figure it out together.

You can find many articles on the Internet that answer the question HOW to run a program as an administrator, but at the same time, few people talk about WHAT running as an administrator IS. In this article, we will look at what the “Run as administrator” feature, which first appeared in Windows Vista, means.

What is "run as administrator"

Many users mistakenly believe that the “” function supposedly runs the executable file under the built-in account Administrator. This is a complete misconception. You can disable or even delete your account Administrator and make sure that "" does not stop working. Microsoft is to blame for this confusion because it has made a lot of mistakes with the terms in Windows.

In Windows 2000, Windows XP and Windows 2003, any account included in the Administrators group already had the highest privileges in the system and there was nowhere to increase them. But, starting with Windows Vista, a new level of access was introduced - access with “elevation” of rights (in English terminology - “elevation”). Now, to perform some operations in Windows, it is NOT enough that you run the program while working under an administrative account. In addition, you need to include “increase”.

Remember: “Run as administrator” does NOT mean running under any specific account. "Run as administrator" is launching the program with elevated rights, those. with permission to read and write to system areas.

So, if you are working under an account that is part of a group Administrators, then when you request an elevation, you will have to confirm the elevation in the UAC window:

If you are using a restricted user account, you will be required to enter the password for the account that is part of the group Administrators:

What is the difference between the Administrator account?

The local account, which is named "Administrator", differs from others only in that it is granted elevation of rights WITHOUT a UAC prompt.

Why do you need to run as administrator?

As you know, the very first rule in fighting malware is not to work under an account with administrative rights. Only, from time immemorial, few people use this rule. Everyone is accustomed to “sit as an admin” and enjoy full rights. However, later, when the computer becomes infected with a virus, rarely does anyone blame themselves. The fact that the user, sitting as an administrator with UAC disabled, downloaded a malicious executable file under the guise of a game, I launched it myself with the highest rights and disabled the system, the “bad antivirus” will most likely be to blame.

That is why Microsoft found a compromise solution:

1) Demoted administrators' rights. The administrator now uses the user token by default. After all, to launch a web browser or, say, Skype, you don’t need to have administrative privileges.

2) And for cases when the highest rights are really needed, they came up with a regime for increasing rights - the so-called run as administrator.

The administrator is now a user until he requests promotion to perform a specific task.

The User Account Control (UAC) snap-in is used as a bridge between user and administrator modes. Its essence is as follows: when the highest administrative rights are required to run an application, UAC issues a request to increase the rights. And the user must decide whether to run this program with the highest rights or not. It is understood that in case of running unknown and questionable files, the user must reject the request for elevation and thereby prevent the unknown file from running.

But most users try in every possible way to negate this advantage by disabling UAC. And when User Account Control (UAC) is disabled, the increase occurs without warning. In fact (with some exceptions) by disabling UAC, the user again has access to the highest rights, thereby putting his computer and data at risk.

Resume: run as administrator needed to temporarily increase rights in order to perform a certain clearly understood operation.

Who is to blame: the user or the antivirus

In this article, it would be appropriate to repeat again one thing that we often mention in other articles.

First, don't disable UAC. Perhaps this will one day help you keep your data safe.

You can enable User Account Control by going to Control Panel => User Accounts and Family Safety => User Accounts => Change User Account Control settings:

A more or less advanced user should think about it if the downloaded “picture” or “music” requests an increase in rights, and reject the request.

Secondly, never run files whose origin you do not know, and do not download files from unverified sites.

Nowadays there is a very high percentage of sites on the Internet that distribute fraudulent and malware. And the most insidious thing is that not all malicious programs are viruses.

A simple example. Uncle Vasya creates a batch file that contains a command to clean up the D: drive. This malicious file? No. It's just a set of commands to perform some tasks. Now imagine that Uncle Vasya renames this file “Recipe for Kharcho Soup” and posts it on his website. What happens next? A site visitor downloads a recipe and receives a disk formatting. There are no viruses. The antivirus is silent. What happened? Infection? No. A DECEPTION has occurred. What should the antivirus do now? Block any user action, what if it is thoughtless?

If the user had UAC enabled, there is at least a fraction of a chance that the user would think about it. Yes, undoubtedly, there would be those who would click “Yes” without reading, so that the annoying window would quickly disappear. But you are not going to be one of those eternal victims with “bad antiviruses”?

Many programs require elevation of rights at startup (a shield icon next to the icon), but in fact they do not require administrator rights for their normal operation (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 from under simple user, if User Account Control is enabled on the computer, a UAC prompt will appear and require the user 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 and drop 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 more high level 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 prohibited (for given user no rights to write to 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 context menu.

__COMPAT_LAYER environment variable and RunAsInvoker parameter

The __COMPAT_LAYER environment variable 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.

Some applications require elevated rights to run in Windows 7 or Windows Vista and must be run as an administrator. In this case, the request " User Account Control" (User Account Control or UAC), in which the system asks for your consent to launch the application.

Many users incorrectly believe that " User Account Control" only interferes, and they turn it off. In this case, the security of the computer is seriously affected, since the user’s consent to launch applications is no longer required, and any malware can start and operate smoothly. The presence of an antivirus also cannot guarantee 100% computer security.

In this article, I'll show you how to simplify the process of running your favorite applications as an administrator without disabling UAC (fully or partially) and without compromising security.

As an example, we will launch the command line ( cmd) on behalf of the administrator.

Method No. 1 (usual) - launch via the right mouse button (UAC prompt is displayed)

Right-click on the icon of the desired application and select "":

Method number 2 - launch using "Ctrl+Shift+Enter" (UAC prompt is displayed)

Start, type the desired command in the search bar and click Ctrl+Shift+Enter.

Method No. 3 - set to run as administrator in the shortcut properties (the UAC prompt is displayed)

Right-click on the desired shortcut and select " Properties".

Go to the " tab Label", click " Additionally", check the box " Run as administrator":


Check the "Run as administrator" checkbox

Or go to the " Compatibility" and check the box " Run this program as administrator":


Check the "Run as administrator" checkbox in the "Compatibility" tab

Method number 4 - simplify the launch of selected applications using the task scheduler (the UAC prompt is not displayed)

Let's get down to it in an interesting way. If there is an application that you run all the time, and it comes from a reliable software manufacturer, for example, this Windows application- you can simplify the launch. Create a shortcut for the desired program does not take more than 2 minutes and this will allow you to get rid of unnecessary actions in the future. Launch the task scheduler (Start ---> All Programs ---> Accessories ---> System Tools ---> Task Scheduler) and click " Create a task":

Specify a Name for the new task and check the " Run with highest rights":


Check the "Run with highest rights" checkbox

Go to the tab Actions, press " Create", in the next window click " Review":

Specify the path to the desired application and click " Open":

Click " OK"


Click "OK"

And once again" OK"


Click "OK"

Close the scheduler and proceed to creating a shortcut.

To create a shortcut on the desktop, right-click and select " Create" ---> "Label":

In the field Object location enter: schtasks /run /tn cmd_admin, Where cmd_admin- the name of the task we created. If the name contains spaces, it must be quoted.

Set the name of the shortcut:

The shortcut is created and ready to use. To change the icon, right-click on the shortcut and select " Properties":


Select "Properties"

Go to the " tab Label" and click "":

Review

Specify the path to the program:

Select the desired icon and close both windows with the " OK"

Now the desired application is launched as an administrator by double-clicking on the created shortcut, and the request UAC is not displayed and security remains intact

Additionally

By analogy with launching the command line using method No. 4, you can configure the launch of the dialog box " Execute", and the commands entered into it will also be launched as an administrator. The convenience of this approach is that the list of previously used commands is saved, and you can select the one you need from the list.

When creating a task in the scheduler, in the "" window, specify: in the " field Program or script" - rundll32, and in the field " Add arguments" - shell32.dll,#61

Often, users are faced with the fact that some utilities need to be run with administrator rights in Windows 7, 8 and 10. This may be required by various games, browsers, Steam or system utilities. If this is not done, they may not start at all or some of the functions may be unavailable. Eat several ways run the required applications with administrator rights, this will be discussed in this article.

How to set administrator rights for your account

To perform all these actions, the user must have the appropriate permissions. If this is not the case, then you will need to give them to him. To begin with, you can act through hidden account administrator, to do this, just launch the console and enter the operator there net user administrator /active:yes, then it will appear new account, which you will need to enter.

In it you should go to the control panel and go to the section user accounts. Here you should click on the item related to managing another account and click on the one whose type you want to change.

In the menu that appears, click on type changes account, and in the new menu click on administrator.

All that remains is to apply the settings and log into your account.

Using the context menu

The easiest way to open the utility with admin rights is to use the drop-down menu. To call it, you only need to right-click on the executable file or shortcut and click on launch with the required parameter.

It is possible to open programs not only as an administrator, but also as another user. All you need is hold the buttonshift, then press RMB. The desired item will be added to the context menu, you need to click on it, and then all you have to do is enter your username and password.

Shortcut properties

It is possible to set the necessary permissions through the properties of the shortcut. To begin with, you should right-click on it and select properties, then go to the compatibility section. Here you can check the required item.

At the bottom of the window there is a button " Change settings for all users", you can click on it and put exactly the same checkmark in the pop-up menu. With this approach, the program will be launched with admin rights for all accounts on the device.

Start screen in Windows 8

The user has the opportunity to carry out all the necessary manipulations directly from home screen, if the application is submitted to it. The actions in this case are not very different from the methods described. First you need to right-click on the utility icon, and then go to the section additionally and select the desired item there.

This method is well suited if you need to run the program one time.

When searching

If the user does not know where the executable file or shortcut is located, he can use the usual search. In this case, launching the utility with the necessary permissions is also not a problem. You just need to type the name of the program in the search bar and wait until the system finds it, then all you have to do is right-click on it and select the desired item menu.

Using the task scheduler

Those users whose accounts are members of the administrators group can also use task scheduler. To get into it, you need to right-click on the computer, select control, and in the window that appears, click on task scheduler, in the utility itself you should click on create a task.

In the window that opens, write the name and set execution with highest rights.

Next you should click on Action, where you will again need to click on create. In the menu that appears, you need to set the program to launch, click on overview and specify the path to it.

All that remains is to click on ok.

In the remaining window everything is also OK.

Now you can close the scheduler and go to the desktop. Here you will need create shortcut.

In the first window you should set schtasks /run /tn cmd_admin, however, instead of cmd_admin you will need to specify your name; if it contains spaces, then all of it should be placed in quotes.

To automate this procedure, you can use the program Elevated Shortcut, which should be downloaded from http://soft.oszone.net/program/9686. It will need to be downloaded and installed on your computer. All you need to do next is drag and drop the executable file of the application, which you need to give administrator rights, onto the application shortcut.

There is a small problem with this method; it is that after launching the utility, the focus does not shift to it and you have to additionally select it. For the system to do this itself, you can use command start, in the form /c start /d “path_to_program” file_name.exe, for example, for the command line it will look like this /c start /d “C:\Windows\System32\” cmd.exe.

For this you can use NirCmd utility. It should contain exec show “path_to_program\file_name.exe”, for example, exec show “C:\Windows\System32\cmd.exe”.

Run via command line

You can also launch the necessary utility via the command line. This will only work if command line launched with administrator rights. To do this, type cmd into the search bar in Start, right-click on the found element and select – Run as Administrator.

It only requires you to specify the path to the application.

For this you can use third party applications , such as Elevate by Johannes Passing or PowerToys by Michael Murgolo. In this case, you only need to write the path to the first utility, and then to the one that should be launched.

To avoid writing a lot all the time, you can use the function copy path, which is available when the user right-clicks on the utility while holding down Shift.

Run the window with administrator rights

You can also set administrative rights for the Run utility; this will have to be done through the same task scheduler, where you will need to specify in the “Program or script” field: rundll32, and in the “Add arguments” field: shell32.dll, #61.

All actions from this application will also be performed with elevated privileges.

RunAs

To give other users the ability to run a specific utility with elevated rights, you can use the built-in command. First, the user will have to create a shortcut; the program should be specified as runas /savecred /user:Andrey “C:\Program Files (x86)\VideoLAN\VLC\vlc.exe”.

IN fielduser you need to specify the account name, then full path to the utility. /savecred is used to ensure that the password is entered only once. After the first input, others will be able to use the shortcut freely and launch the specified program with the necessary rights.

ExecAS

The utility can be downloaded from the link https://pisoft.ru/. You can install the program; upon login, the user will see such a window.

At the top there are options to add, edit and delete. When adding you will need to provide a name and password scientific record and the program itself. This data is stored in encrypted form and will not be lost.

AdmiLink

Typically, when a user who does not have the necessary permissions tries to run a utility with administrator rights, he is asked for a password, however, giving it all in a row is not a good idea, and some programs must be run with administrator rights. If such a situation arises, this program can help. You can download it from the link http://crw-daq.ru/download/doc/admilink/admilink.htm.

To get started you will need indicate the path to the program to which permits will be issued.

Next is go to account and enter the administrator information there.



Related publications