You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+12-7
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,19 @@
1
-
## UAC-Focus
1
+
##  UAC-Focus
2
+
3
+
### ABOUT
2
4
3
-
##### ABOUT
4
5
This is a simple AutoHotKey script that makes it easier to control UAC Prompts with the use of keyboard shortcuts (`Alt`+`Y` / `Alt`+`N`)[^1]. It have been tested to work on Windows 10 21H2, but should probably also work on Windows 11, 8/8.1 and maybe even 7 or Vista.
5
6
6
-
##### Rationale:
7
+
#### Rationale:
8
+
7
9
By default Windows UAC is set up to run on a secure (dimmed) desktop. Consequently, the UAC Prompt window is always in focus when it appears, and is easy to control using the keyboard. If, however, UAC is set up to run on a regular desktop, the UAC Prompt window doesn't always come up in focus, making it inconvenient to control with the keyboard, forcing the user to explicitly switch to UAC window first using either mouse or `Alt`+`Tab`.
8
10
9
-
##### The solution:
11
+
#### Solution:
12
+
10
13
This AutoHotKey script waits for the UAC Prompt window to appear and then brings it in focus, making keyboard shortcuts usage more convenient.
11
14
12
-
##### HOW TO USE
15
+
## HOW TO USE
16
+
13
17
The UAC Prompt host process (consent.exe) runs under SYSTEM account and cannot be easily accessed due to security reasons. Because of this the script must be run with the highest privileges (as `NT Authority\System`).
14
18
15
19
There are several ways to do this:
@@ -20,9 +24,10 @@ There are several ways to do this:
20
24
21
25
3. using Windows **Task Scheduler** task with `Run with highest privileges` setting enabled.[^4]
22
26
23
-
24
27
---
25
-
##### DISCLAIMER
28
+
29
+
### DISCLAIMER
30
+
26
31
Running a process as a System user is a potential security risk and is usually discouraged. Although this script is probably unlikely to compromise system security, it, nevertheless, comes with ABSOLUTELY NO WARRANTY and you are using it AT YOUR OWN RISK. You have been warned.
27
32
28
33
[^1]: this is a default for a non-localized (i.e. english) Windows UI. If the UI is in another language, the letter corresponding to each option can be found out by pressing `Alt` twice while UAC window is open.
0 commit comments