How to create a shortcut that allows normal users to run an application with administrator privileges

💖 Like it? Share the link with your friends

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

First of all, you need to enable the built-in account administrator, 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.

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 command prompt to launch 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.

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 specify an account encryption binding to command line, so that you can not get Administrator rights by changing the command line parameters 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!

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