<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Windows 8 and 8.1 - Run as Administrator

Published on
13,395 Points
7,195 Views
2 Endorsements
Last Modified:
Approved
From time to time users may run across the need to run a program or script as an administrator.  In Windows 8 and 8.1, there are a few different ways of running these types of actions.

From the Start Screen or Apps Screen
From the start screen you are able to run a program as an administrator through two methods.  First, navigate to your program and either right-click the icon or long-press the icon (for touch users).  This will enable the app bar where you have the Run as administrator option.

app bar
For users who are fans of shortcut keys, you can use the 'Ctrl+Shift+Click" method.  While holding down both the Ctrl and Shift keys, click on the program that you wish to run as administrator.

From the Desktop
From the desktop Screen you are able to invoke the run as administrator option through context menu.  First, you will right-click or long-press (for touch users) to bring up the context menu.  From the context menu, select the run as administrator option, notated by the blue and yellow shield icon, the User Account Control (UAC) icon.

desktop
From the Taskbar
From the taskbar you are able to use the run as administrator option through two methods.  First, right-click on a program to enable the jump list.  Once the jump list is in view, right-click on the program in the jump list menu to bring up the context menu. From the context menu, select the run as administrator option, notated by the blue and yellow shield icon, the User Account Control (UAC) icon.

For users who are fans of shortcut keys, you can use the 'Ctrl+Shift+Click" method.  While holding down both the Ctrl and Shift keys, click on the program in the taskbar that you wish to run as administrator.

taskbar
Run as Administrator Shortcut
If you are running a program frequently that requires the run as administrator permission, it may be beneficial to just set the shortcut to always run as administrator.

From the Taskbar
From the taskbar, right-click on a program to enable the jump list.  Once the jump list is in view, right-click on the program in the jump list menu to bring up the context menu. From the context menu, select the Properties option.  In the program's properties window, navigate to the Shortcut tab, then click advanced.

program properties
From the advanced menu, select the Run as administrator option and click OK.

advanced properties
From the Desktop
From the desktop Screen right-click or long-press (for touch users) to bring up the context menu.  From the context menu, select the Properties option.  In the program's properties window, navigate to the Shortcut tab, then click advanced.

program properties
From the advanced menu, select the Run as administrator option and click OK.

advanced properties
Advanced Run as Administrator Tools
For users who are comfortable behind the console, there are a few ways to elevate programs using commands.

Command Prompt
runas /profile /user:<username> “C:\programs\<program>.exe”

Open in new window


PowerShell
start-process -verb RunAs <program>

Open in new window


Elevate PowerShell from a Script, before running the Script
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))

{   
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powershell -Verb runAs -ArgumentList $arguments
Break
}

Open in new window

2
Comment
1 Comment
LVL 62

Expert Comment

by:McKnife
Allow the comments: you show no elevation on the command line. runas has nothing to do with elevation - it would only elevate if the built-in administrator account would be used. For command line elevation, elevate the command prompt itself OR rightclick the script ->"run as administrator", or use elevate: http://technet.microsoft.com/en-us/magazine/2007.06.utilityspotlight.aspx (still the same for win 8.1).
Also you should include the task scheduler as another way of elevating code interactively.
0

Featured Post

Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Join & Write a Comment

This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Next Article:

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month