118 total views
As needed, you can create a shortcut with admin privileges to allow standard users to run programs that require admin privileges.
In Windows, you can create custom shortcuts for almost any file, folder, or program. In general, shortcuts do not give you any admin rights. But there are situations where you need to allow other users on the system to run programs that require admin privileges. In these cases, you do not need to provide an admin password. Instead, you can create a custom shortcut with admin privileges to allow a standard user to run the program as admin.
Alternatively, if you don’t want to see the UAC prompts, you can completely avoid them by creating shortcuts with admin mode. Following are the simple steps for creating a shortcut with admin privileges and for a standard user to run the program as administrator.
Note: Before moving on to the next section, find the computer name, username and password of the admin account. You will need this information in the next steps.
1. Activate the Admin account
By default the Admin account is disabled, so you must enable the Admin account.
To activate the administrator account, follow the steps below:
On the Search Start Menu box, type Command Prompt, then right-click the Command Prompt shortcut and select Run as administrator.
Enter the following command in the Command Prompt window to activate the Admin account:
net user administrator / active: yes
The Admin account is activated, but the account is not password protected.
To set up an administrator account password, open the Control Panel and then select Accounts and Family Safety => User Accounts.
Click on the User Account window Manage another account.
Select Administrator account, select Next Create a password Then proceed to create a password for the Admin account.
2. Steps to create shortcut with admin privileges
Creating shortcuts with admin privileges for programs allowing standard users to run it as admin is easier than you might think. The best thing about the method below is that you don’t have to give the admin password and the admin permissions are limited to the program. Just follow the steps as follows.
B1: As with any custom shortcut, you can create it directly on the desktop. Just right-click on the desktop and select New> Shortcut.
B2: In the blank field, copy and paste the code below. Replace ComputerName by the actual computer name, Username with the actual username and file path illustrated with the actual path of the exe file for the target program.
runas /user:ComputerNameUsername /savecred "C:dummypathtofile.exe"
B3: Click the button Next.
B4: In this window, give the shortcut a name. You can name the shortcut with whatever you want. Then, click the button Finish.
B5: After creating the shortcut, double-click on it. For the first time, you will be prompted to enter the admin password. Enter the password and tap
B6: If the username and password are correct, the shortcut will be executed and the program will be launched as admin.
Username and password are automatically saved in Windows Credential Manager. Therefore, other users do not have to enter a password. Instead, Windows will automatically extract the password from Credential Manager and launch the application.
If you no longer need a user to launch the app as an admin, delete the shortcut.
3. Create a shortcut to open the application with admin privileges manually in Task Scheduler
B1: Press the keys Win + R to open the dialog box Tremor, import taskchd.msc into the Tremor and press OK to open Task Scheduler.
B2: Click Task Scheduler Library to the left of Task Scheduler and click Create Task in section Actions the right.
B3: In the tab General, enter the name (eg “Elevated command prompt”) you want for this task and enter the optional description of the task.
Note the name of this task. You will need that in step 8 and when you create the shortcut for this task in step 13 below.
B4: In the tab General, check box Run with the highest privileges.
B5: In the tab General, choose Windows ten in the drop-down menu Configure for.
B6: Click the tab Actions and choose New.
B7: Import cmd.exe go to school Program / script.
This is what is being used to open the shortcut with admin privileges, so it cannot be changed to anything else.
B8: Enter the command below in the field Add arguments and press OK.
/c start "Task Name" "Full path of application file"
Replace Task Name in the above command using the task name (eg “Elevated command prompt”) you used in step 3 above.
Replace Full path of application file in the above command with the actual full path of the application file you want to run as admin.
/c start "Elevated command prompt" "%windir%System32cmd.exe"
B9: You should now see this new action listed.
B10: Click the tab Conditions, uncheck the box Start the task only if the computer is on AC power and press OK.
B11: You should now see this new task listed in the Task Scheduler Library. You can now close Task Scheduler if you want.
B12: Right-click or long-press on the desktop, select new and click Shortcut.
B13: Enter the command below in the location field and select Next.
schtasks /run /tn "Task Name"
Replace Task Name in the above command with the name of the task you used in step 3 above.
schtasks /run /tn "Elevated command prompt"
B14: Enter the desired name for this task shortcut and click Finish.
B15: Right click or press and hold on the new shortcut on desktop and select Properties.
B16: Click the button Change Icon in the tab Shortcut.
B17: Press OK.
B18: Click Browse, navigate to and select the application file (for example: “% windir% System32 cmd.exe”) you want to run as admin, click Open, select the icon you want for the shortcut and click OK.
You can use any icon you want for this shortcut.
B19: Press OK.
B20: You can run at startup, pin to taskbar, Start menu, add All apps, Quick Launch, assign a shortcut or move it to a place you like for ease of use.
4. Automatically create app opening shortcut with admin privileges using script
B1: Download the file Create_an_eleised_shortcut.bat.
B2: Save the .bat file to the desktop.
B3: Unblock .bat files.
B4: Double-click the file Create_an_eleised_shortcut.bat to run it and click Yes if prompted by UAC.
B5: Enter a name (example: “Elevated Command Prompt“) you want to use for the shortcut and the task name, then click Enter.
B6: Enter the full path of the application file without the quotes (for example: “% windir% System32 cmd.exe”) and press Enter.
B7: A shortcut will now be created on your desktop using the default application icon with the name you provided in step 5. This will be the application opening shortcut with admin privileges.
See some more articles below:
#trick #create #shortcut #run #application #Admin