How to open the application with administrator rights. How to create a shortcut that allows normal users to run an application with administrator privileges

💖 Like it? Share the link with your friends

Often there is a situation when you need to run cmd with administrator rights. However, this is not so easy to do for an unprepared user. The whole problem is that, by default, cmd is launched as the current user, to run as administrator, you either need to log in as an administrator or do some trick.

There is a certain nuance that needs to be done before running the command line as an administrator. It is necessary to check whether the admin account is enabled, if it is enabled, assign a password to it. Now let's take a closer look.

First you need to check if you have an administrator account enabled. To do this, open Computer management

go to point " Local Users and Groups” — “Users“. As you can see, in my case the account “ Administrator” is disabled (an arrow hangs on the icon).


Double-click to open the account properties and uncheck the box “ Disable account


Click " OK“. The arrow from the admin account icon has disappeared, which means it is enabled. Now let's set a password. To do this, right-click on the account " Administrator” and select the menu item “ Set password...


On the password change warning, click “ Continue” and enter the password twice


Ready! Now you have an administrator account and you know the password for it. Let's move on to the next step.

Run CMD with admin rights

Open the command line, for this we press " Start” — “Run“, or keyboard shortcut “ Win+R” and enter the command cmd . In the window that opens, write the following:

runas /profile /user:mymachine\cmd admin

(Where mymachine is the name of your computer)

and press the Enter key. The command prompt will ask you for an administrator password, enter it and wait for the launch command line with administrator rights. Everything would be fine, but after entering I got an error:


This error can appear in two cases. First, you entered the wrong password. The second is that the system was never logged in under an administrator account (my version).

You need to log out and log in with an administrator account, so I did


Now you can log out and log back in with your account. Once you're logged in with your account, try running cmd as administrator again.


And voila! A second command line window opened under the administrator account. Now you can browse directories, and even run applications as an administrator.

Different kinds software for their correct operation or when installed in operating system Windows 10 is often required administrator rights. In order to help PC users run utilities with admin rights, we will analyze various ways their launch in the operating room Windows system 10.

How to log in to apps as an admin from the home screen

For example, we installed two utilities CCleaner And VLC media player and put them on the home screen. The first utility is used for system cleaning and the second one is quite popular video player. So let's get started. Let's go to the home screen and right-click on the application CCleaner. In the context menu that appears, go to " Advanced / Run as Administrator».

Launch looks like this VLC media player.


Using this method, you can launch any application pinned to the home screen.

How to enter the program on behalf of the administrator through the Start menu

If you go to the menu Start» to the tab « All applications", we can find our installed applications CCleaner and VLC media player. The principle of their launch is the same as in the first example. For utility CCleaner shown in the image below.


And for utility VLC media player in the next figure.


As you can see, the second and first examples are very similar. Therefore, use the option that is more convenient for you.

How to enter the application on behalf of the admin through a shortcut on the desktop

To launch an application CCleaner let's go to the context menu of its shortcut and select the appropriate item, as shown in the image below.


For the second program, the example looks similar.

If you want these programs to run with admin rights in automatic mode then follow the steps below. Go to the properties of the shortcut on the tab " Compatibility” and check the box next to the parameter responsible for run as administrator as shown in the image below.

Also in the properties of the shortcut on the tab " Label” you can go to a window in which you can also select automatic launch with special privileges by clicking the button Advanced.

Run apps as admin via search in Windows 10

Using the combination "Win" + "Q" or using the shortcut next to the " Start» run search box Windows 10 and enter the name of the application we installed as shown below.


Let's make a click on the found result and select the item we are looking for. The work with the second utility looks the same way.

How to enter the program on behalf of the administrator through the console

To run programs with elevated privileges, we need to run the console itself in admin mode. In Windows 10, you can start the command prompt in this mode in three ways.

First way through the menu Start».

Second by using Windows Search 10 for the phrase " cmd».


AND third by clicking on the start icon with the right mouse button or by typing the Win + X combination, selecting the appropriate item.

Let's choose one of the methods and run the program in administrator mode. Since the console runs in administrator mode, it will run utilities in the same mode. For example, to run CCleaner you need to go to the directory where the utility is installed. To do this, we will type the following command: cd c:\Program Files\CCleaner After that, we will type the command: Ccleaner.exe which will open the utility itself. Sequentially typed commands for the utility are shown in the image below.


For utility VLC media player you need to type commands: cd C:\Program Files\VideoLAN\VLC
vlc.exe

In the same way, as shown in the example, you can run any installed program.

Logging in with an "Administrator" account

Since the Windows 10 operating system has restrictions on master accounts for security reasons, we use additional options to run utilities in mode with special privileges. In order for all the possibilities of the account to be disclosed, we need to go to the console under the administrator and type the following command in it:


Now you need to restart your computer and go under the new entry that appears " Administrator". In this account, all applications will run with elevated privileges.

This is easy to check. For example, let's run the program Run"using the key combinations Win + R and type in it the command" cmd", which we will execute. After execution, the console will open in administrator mode, this can be seen at the top of the window.


If we opened the console from under the usual admin, then you can enter it only without extended rights.

After doing the above steps, you will be able to access all utilities with extended privileges.

We get access from under a normal user

Sometimes there are situations when you need to run some utility with admin rights. For example, your computer is used by an employee at work and access to some programs is restricted in his account. To do not give your password, you can solve this problem remotely by logging into your PC and running the necessary utility with admin rights using your password.

Consider working with the uTorrent utility, which has limited access from under a regular account. To do this, let's go to context menu uTorrent utility shortcut and in a convenient way for you, we will execute the item responsible for admin rights.


After that, a window will open that will ask for the password of the admin account.


After entering the password, you will open the utility on a regular account, and the user will be able to use the utility.

Summing up

This article discusses all types of starting programs in administrator mode. An example is also considered in which the accounting Windows entry 10 gains extended privileges for programs, allowing them to run in administrator mode without additional options.

I would also like to note that this material will be especially useful novice system administrators and experienced PC users. We hope that our readers will learn from our article useful information to help them solve their problem.

Related videos

Good day dear visitor. In today's article, I suggest that you consider not the usual installation and configuration of servers and client stations from the very beginning, but the usual everyday life of a system administrator. And we will consider the launch of a specific application under the administrator name, consider what solutions exist and how they differ. The reason why administrators face this problem is quite simple, in our IT outsourcing practice, we quite often encounter a situation where an application (especially domestic developers) is not UAC-oriented, and why so, ask the application developers. We will test in a virtual Hyper-V environment on virtual machine second generation with Windows 8.1.

Diversity is present

We will consider three utilities:

RunAs - Runs specific tools and programs with permissions other than those granted by the current account. This utility is not third-party, it is included in the delivery of Windows OS. Help for the runas utility /?

We will test on the built-in utility msconfig.exe, which is included in the Windows OS. This utility can only be run from an account with administrator rights.

ATTENTION! The utility will be launched under a domain administrator account. In reality, it is not recommended to do this, it is better to create a separate account for such moments.

So, let's try to use the arranged RunAs utility, for this we launch the command line and write the following


Please note that the entered password will not be displayed


After successfully entering the password and account name, the msconfig.exe window will open


Now let's create a shortcut to run msconfig.exe from an administrator account.



After a successful password entry, the already known msconfig.exe will start.

The question arises by itself, will the administrator allow the user to know the password for an account that has administrator rights, the name from which is easy to see in the properties of the shortcut?

And yet, when launching the shortcut, the password will need to be entered every time, which is not convenient for the user, if you go to make life easier for him by using the "/ savecred" parameter, then you will create a huge security hole.

Here is an example for creating a huge hole:

You want to make life easier for the user, add the parameter "/savecred"


We launch the shortcut and enter the password, the first time the utility prompts you to enter the password


Enter the password and say goodbye! When you run it again, the utility will not require a password, or rather, it will not require it at all now, you will think “So what!”. And let's try to change the launched utility in the properties of the shortcut, for example, to cmd.exe.

Trying to run and...


"Fuck! He just cleared the arp cache." I think if you use "/savecred", then you hardly know what an arp cache is and that you need administrator rights to clear it.

The ExecAs utility is designed to run any programs with rights other than those of the current user. Can be used to run the Locker program with administrator rights from a restricted account. This allows you to prevent operators from accessing the database files of the Locker program and, in general, from running any unwanted programs other than Locker.

Execas very simple utility with which even a schoolboy can work.

Its positive feature is its simplicity.

The negative feature is the lack of work with domain accounts.

So, after creating a local account with limited rights and an account with administrator rights, let's run ExecAs.


When you first start, the application immediately prompts you to enter an account name and password, as well as specify the path to the application that you want to run. We will run cmd.exe with the name of the local administrator. Please note that the account being entered is specified without the machine name. To add an application, click on the folder icon, which is located at the end of the "Program" line.


We press "Record". Our application will be at number 1.

Close ExecAs and run again.


As we can see, cmd.exe immediately launched when ExecAs was launched. The fact is that if you have one application in the list of startup applications in ExecAs, then this application will immediately start, which is pretty good, but if you have more than one application, for example?

Open cmd, go to the directory with the ExecAs application, and run it with the parameter below




Now we can add another application, for example a calculator

Now if we close and open ExecAs we will see the window above, this shouldn't happen. To do this, there is a parameter NN - the number of the program being launched.

Let's create two labels, one for run cmd, another for the calculator.


Run both shortcuts


Do not forget about the program number, which can be changed when adding a startup program, and which can be viewed in the list of startup programs.

AdmiLink

AdmiLink is a utility with which the Administrator can create a shortcut that allows restricted users to run a specific (without the possibility of substitution!) program with Administrator (or any other user) rights without (interactive) entering a password.

A typical application of the AdmiLink program is the administration of secure systems in which the user works mainly under his own limited account, and only certain functions strictly limited by the Administrator are launched under the Administrator, without knowing his password and not being able to run other, unauthorized programs.

Another typical example is the use of AdmiLink to launch potentially dangerous programs, such as web browser, with reduced rights without entering a password. For example, to avoid infecting a machine with a virus, you can run a Web browser under a restricted user account, which dramatically reduces the chance of damage to the system. In order not to enter the password of a limited user every time, you can make a shortcut on the Desktop to launch the Web browser under a limited user.

How Admilink works

The package includes two programs: AdmiRun and AdmiLink.

AdmiRun is a simple console task that can only do one thing - run other programs on behalf of the Administrator (or any other user). During installation, AdmiRun is copied to the Windows directory so that it can be accessed in any directory. AdmiRun can work both in batch mode (in batch files), and for launching programs interactively (via a shortcut on the Desktop). The call format can be obtained by typing AdmiRun /? Of course, to run programs as Administrator, you need to know the password. On the other hand, for security reasons, it is impossible to openly transfer the password, otherwise the entire security system loses its meaning. The solution is to transfer an encrypted account (account = user + domain + password). AdmiRun receives the account defiantly openly, through the command line, but nothing can be understood from it - the account is transmitted as an encrypted key. The key is tied to a specific executable file, without this file AdmiRun will simply not be able to decrypt the account. Therefore, if the user tries to run another program with the same key, he will fail. Moreover, in order to make the life of hackers more fun, the keys are generated using random numbers and never repeated.

So, after installing AdmiLink, I advise you to uncheck the creation of all shortcuts during installation and run the utility only from the directory where it is installed, launching AdmiLink.


1) In the "Set the name of the executable file of the program of interest" field, specify the path by clicking on the floppy disk icon. In our case, this will be cmd.exe


2) Leave the "Set the command line for the executable file" field blank.

This step is optional if there are no parameters. Also, keep in mind that you can bind account encryption to the command line so that you cannot get Administrator rights by changing the command line options in the shortcut.
For example, when making a c:\windows\system32\control.exe timedate.cpl shortcut to correct the system time, don't forget to attach encryption to the command line, otherwise, by editing the shortcut, you can run, for example, c:\windows\system32\control. exe nusrmgr.cpl and get access to user management, which is not good at all.

3) The field “Set the starting directory of the program to be launched…” is usually filled in automatically

4) Set the display mode of the program window.

  • SHOW - run the program visible on the screen. This normal mode for interactive programs.
  • HIDE - run a program that is not visible on the screen. This is the mode for utilities running in the background.

Go to the "Account" tab

5) In the "Domain name" field, specify the NetBios name or full domain name, in our case, test.lan.


6) In the "Username" field, we can enter Administrator or click "..." to select an account.

7) Enter the password and its confirmation and click "Test".


We press any key. If the message “Account is good to use” appears, then everything is fine and move on.

8) Click "Generate AdmiRun launch key", without this key, the application launch will fail.


9) Go to the "Link" tab and give a name to the shortcut


10) Set the directory, and do not forget about the account under which AdmiLink is running

11) Set the file and image index for the shortcut. This field is usually filled in automatically. By default, it is assumed that the image is taken from the program's executable file with index 0.

12) Click "Generate command line" and see the magic abracadabra


13) Click "Create Shortcut Now"


After clicking on "Create Label Now", a label is created and all fields are reset.

Launching the shortcut


Let's try to change the launched program in the properties of the shortcut, for example, to a calculator

Let's try to launch the shortcut

Please note that binding to MAC, IP and command line was not performed.

To the conclusion. Don't forget that in running program with administrator rights, you can open the "File" tab, if it is, of course, and do whatever you want with the OS. This is more of a security issue for the OS, so be careful.

All people, peace be with you!

Do you want to allow users with a standard account to run applications with administrative privileges without UAC or a password prompt? Then I'll tell you how to do it. We will create a shortcut using the command runas /savecred, which stores the password. I note that this can be considered a security hole - a normal user will be able to use runas / savecred to execute any command as an administrator without entering a password. However, this can be useful in some situations - for example, if you want your child with a standard account to be able to run applications as an administrator without asking you.

Enable administrator account

The first step is to enable the built-in administrator account, which is disabled by default. So, right-click on the command prompt shortcut and select "Run as administrator".

In the command prompt window that opens, run the following command:

net user administrator /active:yes


The account is now enabled, albeit without a password. To set a password, open the Control Panel, select the User Accounts and Family Safety category, and then open the User Accounts menu. Then click on the "Manage another account" link.

Select an administrator account, click on the Create Password button, and create a password for the administrator account.

Create a label

Now we will create a shortcut that will launch the application with administrator privileges. Right-click on the desktop, select "New" and then click on "Shortcut".

In the window that opens, enter the following command:

runas /user: computer name\Administrator /savecred" C:\Path\To\Program.exe

Please note that you need to replace computer name to the name of your computer, and C:\Path\To\Program.exe to the full path to the program you want to run. For example, if the computer name is Laptop and the program you want to run is Auslogics BoostSpeed, you would enter the following path:

runas /user:Laptop\Administrator /savecred “C:\Program Files\Auslogics\Auslogics BoostSpeed\BoostSpeed.exe"


In the next window, enter a name for the shortcut. Optionally, you can choose an icon for the new shortcut - right-click on it and select "Properties".

In the "Properties" dialog box, click on the "Change icon" button and select the appropriate one.

The first time you double-click the shortcut, you will be prompted for the password for the administrator account you created earlier.


This password will be saved - the next time you run the program, you won't have to enter it again.

As mentioned above, under standard accounts, users can run any program with administrator rights without entering a password (using the runas /savecred command), so keep that in mind.

The admin password is stored in the "Credential Manager" - if you want to delete the saved password, you can do it from there.

Some programs on windows 7 or windows 8 require more rights and only run as administrator.

To run the program as an administrator, you definitely need to know the password if you are logged in under a standard user account, otherwise you will not be able to complete this procedure.

That's not all. You can log in to Windows 7 or Windows 8 as an administrator, some programs will still give an error, for example, "Run time error 10".

This rarely happens, but it does happen. Then you need to additionally confirm administrator rights.

This is easy to do, regardless of the Windows used: windows 7 or windows 8 or even windows 10.

To do this, right-click or, if you have a laptop, on the touchpad, respectively, on the shortcut of the program being launched.

After that, a window with a context menu will pop up on the computer monitor or laptop screen.

In it, almost at the very top, click on the line run as administrator, as in the figure below.

How to always run a program with administrator privileges

If you use a program that requires administrator rights very often, then you do not need to always call the context menu.

This operation can be set to "automatic" and then run the program as usual.

To do this, right-click on the shortcut and in the menu that appears, click on the "properties" line (at the very bottom).

After that, at the very top, click on the “compatibility” line and in the tab that appears, put a bird in front of the line: “run this program as an administrator”, then (at the very bottom) “apply” and “OK”.

Now it will always run with the appropriate rights without your intervention.


Here, as in the first case, you will need a password if you are logged into your account as a regular user.

Usually, applications in windows 8 (8.1) require more rights, the seven is simpler in this regard.

To make using your computer a little easier, you can change your User Account Control settings.

There is a slider - lower it to the very bottom, then the system will be less picky. Good luck.



tell friends