Internet Windows Android

Run as administrator any program. Installing programs without administrator rights on Windows Programs to run as administrator

On the Windows operating system, under 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 (not admins) do not need it. In this article, I will talk about running any application on a computer as an administrator.

When launching 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 suffers. 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 write wasted.

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

Run as administrator using the context menu

The context menu is called with the right mouse button. We click on any program with the mouse and from the context menu click on the option " Run as administrator". This opens the command prompt and other programs that require elevated privileges.

Using Ctrl+Shift+Enter when searching

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

Additional label properties

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

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

Additional options will open. There, check the "Run as administrator" option. Now, when you start 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 item.

Programs to run as administrator

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

Run As Tool

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

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


Let's create a desktop shortcut. Right-click on an empty area and select "Shortcut". As a location, we prescribe the same command:

runas /user:PCName\UserName msconfig.exe

Give the label a name and save.

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 start.

In this scenario, you or people with access to the PC will enter the password every time. This moment is 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 is better to enter the password every time and not worry that some impudent person will use Windows tools without a password to please himself and to your detriment.

Using the ExecAS tool

Running as administrator is possible with 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, press " burn».


Our guinea pig appeared in the ExecAS window. Close the program and open it again. The program that we specified in ExecAS will immediately open. To add an additional application, you need to register 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 start 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

The numbers 1 and 2 correspond to the program number in ExecAS.

Running the shortcuts, we see that they opened on behalf of the administrator.

Using the AdmiLink utility

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

We launch the tool and see a quite 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 options in the second field are optional;
  • The third line will be filled in on its own, if it is not, enter C:\windows\system32
  • Window display mode. Line 4 has 2 parameters:
    • SHOW - standard launch of the software with a visible window;
    • HIDE - software running in the background;

Adjusting the settings on the tab account:

  • As a domain name, we write the name of our 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 performance of the information we specified. Press any key in CMD.

After a successful test, click the " Generate AdmiRun startup key". If this is not done, then nothing will work.

  • Go to the "Link" tab and do the following:
  • Label name- call by any name;
  • Catalog- indicate where the label will be located;
  • Picture- select an image for the label;
  • Click the "Generate command line" button.
  • Now we press the big button "Create Shortcut Now!".

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

Let's try to launch the shortcut. If everything is successful and the program started on behalf of the administrator, then congratulations. Otherwise, the 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 one, then it simply will not start. It's a little malware protection.

Task Scheduler

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

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

Name it with an appropriate name, let's say you run a command line, then you can call it CMD. Also check the "Run with highest privileges" checkbox.

Label creation step

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

schtasks /run /tn scheduler_task_name

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

Hooray, we made a label, but that's not all. Go to its properties.

On the Shortcut tab, change the icon. Of course, you are not required to do this.

Addition to the method with the task scheduler

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 can not be particularly afraid of losing some data. Virus programs will also not be able to launch Windows tools in this way.

Many programs require elevation at startup (the shield icon next to the icon), but in fact, they do not require administrator rights for their normal operation (for example, you manually granted the necessary rights to users on the program directory in ProgramFiles and the registry branches that are used by the program). Accordingly, when you run such a program from under 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 get around this mechanism, many simply disable UAC or give the user administrative rights on the computer by adding him to the local Administrators group. Naturally, both of these methods are unsafe.

Why would a normal app need admin rights

Administrator rights may be required for the program 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, respectively, for the normal operation of such a program, administrator rights are required. To solve this problem, under the administrator at the NTFS level, you need to manually assign the change / write right for the user (or the Users group) to the folder with the program.

Note. In fact, the practice of storing changing application data in its own directory in C:\Program Files is not correct. It is more correct to store application data in the user profile. But this is a question about the 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 /SAVECRED with saving the admin password (also insecure). Let's consider a simpler way to force the launch of any program without administrator rights (and without entering the admin password) with UAC enabled (level 4,3 or 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 if you do not confirm the privilege elevation, the registry editor does not start.

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, just drag the desired exe file onto this bat file on the desktop.

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

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

Similarly, you can run 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 that adds the ability for all applications to run 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 that, to launch any application without admin rights, just select the "" item in the 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 the properties of the .exe file). With this variable, you can specify the compatibility settings with which you want to run the program. For example, to run an application in Windows 7 compatibility mode and a resolution of 640x480, set:

set __COMPAT_LAYER=Win7RTM 640x480

Of the options of the __COMPAT_LAYER variable that are interesting to us, we select the following parameters:

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

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

Some software requires administrator rights to install. 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 a few simple methods described below.

There is a lot of different software on the Internet that allows you to bypass protection and install the program under the guise of a regular 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 look at them in more detail.

Method 1: Granting rights to the folder with the program

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


Now, during the installation of the program, you will need to specify the folder to which you have granted 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 solution built into Windows. With the help of the utility, all actions are carried out through the command line. You only need to follow the instructions:


Method 3: Using the portable version of the program

Some software has a portable version that does not require installation. It will be enough for you to download it from the official website of the developer and run it. You can do this 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 some simple ways to install and use various programs without administrator rights. All of them are not difficult, but require certain actions. We recommend that you simply log in with an administrator account to install the software, if available. Read more about this in our article at the link below.