Skip to content

Commit

Permalink
When / why PowerToys needs to run elevated docs (#1790)
Browse files Browse the repository at this point in the history
* initial doc work

* rename file to match current naming, got images working

* adjusting the "keep us functioning" section sooner

* Update run-as-admin-detection.md
  • Loading branch information
crutkas committed Mar 31, 2020
1 parent e122217 commit 0549130
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions doc/devdocs/run-as-admin-detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# PowerToys and running as Administrator

## Too long, Didn't Read 😁

If you're running any application as an administrator (aka elevated) and PowerToys is not, a few things may not work correctly when the elevated applications are in focus or trying to interact with a PowerToys feature like FancyZones.

## Having PowerToys keep functioning properly

We understand users will run applications elevated. We do as well. We have two options for you when this scenario happens:

1. **Recommended:** PowerToys will prompt when we detect a process that is elevated. Go to PowerToys settings inside the General Tab and click "Relaunch as adminstrator".
2. Enable "Always run as administrator" in the PowerToys settings.

## What is "Run as Administrator" / Elevated processes

This is when a process runs with "elevated" privileges. Typically this would be associated with the administrator accounts on a system.

Basically it runs with additional access to the operating system. Most things do not need run elevated. A common scenario would be needing to run certain PowerShell commands or edit the registry.

How do i know my application is "elevated"? If you see this prompt (User Access Control prompt), the application is requesting it:

![alt text][uac]

At times also, elevated terminals for instance, they will typically have the phrase "Administrator" appended to the title bar. Be warned, this isn't always the case it will be appended.

![alt text][elevatedWindow]

## When does PowerToys need this

PowerToys in itself does not. It only needs to be elevated when it has to interact with other applications that are running elevated. If those applications are in focus, PowerToys may not function unless it is elevated as well.

These are the two scenarios we will not work in:

1. Intercepting certain types of keyboard strokes
2. Resizing / Moving windows

### PowerToys affected

1. FancyZones
- Snapping a window into a zone
- Moving the window to a different zone
2. Shortcut guide
- Display shortcut
3. Keyboard remapper
- key to key remapping
- Global level shortcuts remapping
- App-targeted shortcuts remapping

[uac]: ../images/runAsAdmin/uac.png "User access control (UAC)"
[elevatedWindow]: ../images/runAsAdmin/elevatedWindows.png "Run as admin"
Binary file added doc/images/runAsAdmin/elevatedWindows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/runAsAdmin/uac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0549130

Please sign in to comment.