How do I enable pressing "y" for the UAC prompt? Only arrow keys work

3

1

I run into the UAC dialogue often enough. When it appears, my screen blanks out for a second and then is reshown with everything dim except for the UAC box. The box has two buttons, "Yes" and "No". The default button is "No" and it is initially selected.

At this point, my most common response is to say "Yes" somehow. That is because the box popped up in response to something I have done a moment before and it is something I need to get done. Now, the method I prefer to use in most similar situations where I must make an answer to a dialogue box I see quite often is to use one of the shortcut keys for that box. For example, when exiting winword, I might not want to modify the document I have open so I would just press "n", where the dialogue's options are "_Yes", "_No", and "_Cancel". Likewise, the UAC box's buttons are "_Yes" and "_No". However, for some reason, pressing the shortcut key doesn't actually do anything in the UAC box.

I was trying to find other people with this problem. The thing I did come across is http://www.native-instruments.com/forum/showthread.php?p=1056830 where the user suggests "if you have UAC enabled, and press "y" every time you're prompted." This means that pressing the shortcut key must work for some people. I would like to know how to enable it on my Windows 7 Professional machine.

The option I have been falling back to, which isn't portable between many different keyboards (because they always have arrow keys in different places), is LEFT ARROW followed by SPACEBAR. Using the mouse is out of the question.

EDIT: I thought I would like to clarify that I asked this question before I knew what accelerator keyboard shortcuts were or that the “normal” way of activating accelerator shortcuts is to hold down alt while pressing the underlined key. From the answers, I learned that alt is sometimes required. I have since found this useful for this situation: if a text box is focused in a window, you can use alt+mnemonic to click a particular button (my old self would have tried to blur the text box first or resorted to mouse usage).

binki

Posted 2012-08-02T15:11:07.820

Reputation: 389

Which language is selected? The dialog might be in English, but it might want an other letter for yes (e.g. in the past I ran into Y/N dialogs which needed 'j' (from the Dutch word JA) to answer ona Y/N question. – Hennes – 2012-08-02T15:17:49.573

1I know what you mean. I suspect that this has been specifically made so that you cannot use just Y by itself to prevent people from replying in the positive willy-nilly without actually looking at and understanding what they are doing. – Synetech – 2012-08-02T15:18:50.817

Re: This means that pressing the shortcut key must work for some people. I just tested it on my win7 system and just pressing y does not work for me either. (But Alt + y works). – Hennes – 2012-08-02T16:36:47.397

The full quote is:   Run it as administrator (right click and select "Run as administrator) if you have UAC enabled, and press "y" every time you're prompted. When it says "Done", press any key to close the window.   They were being simplistic. They merely meant accepting the dialog, not literally pressing only Y. – Synetech – 2012-08-02T16:55:34.033

@Synetech I expect that if preventing "positive willy-nilly" responses was the goal they would have disabled the ALT-<shortcut> method as well. – binki – 2012-08-06T20:37:40.720

1@binki, holding Alt and pressing Y or N requires both hands and/or uncomfortably contorting one, which takes 1-2 seconds longer than pressing just the letter. As such, that small delay should give you just enough time to mentally register what the prompt means. – Synetech – 2012-08-06T21:10:59.973

Answers

9

Abstract

I cannot find any formal discussion of the reason (though one person complained about the accelerator keys being changed from Vista to 7). However, one of the reasons is somewhat obvious while another is not.

Security

In many simple dialogs, you can press the accelerator key without holding Alt, (e.g., Yes-No dialogs, ARF dialogs (figure 1), Explorer file-copy dialogs (figure 2), etc.) but the UAC prompt is special because it has security ramifications that can be serious. Because many users have a tendency to click indiscriminately without actually looking at, let alone understanding what they are being prompted with, they disabled the ability to dismiss the UAC dialog with only Y or N and force the less convenient method of having to hold Alt to do it.

Some may argue that this minor road-bump has little effect on security and users still dismiss it without paying attention to the warning it presents, but at least the reasoning behind it is simple and somewhat sound.

Technical

In addition, there is another more technical reason. The UAC prompt is not a normal window and is not processed by the normal window manager. Notice how even with Aero Glass enabled, the UAC dialog is Aero Basic (figure 3).

Also notice that you cannot take a screenshot of it (or the screen in general) with the PrtScr key (screenshots like this are usually done with VMs). In fact, you cannot use Alt/Win+Tab, Win, Ctrl+Esc, or even Ctrl+Shift+Escape or any other Explorer/application hotkey while the UAC prompt is active; the only hotkeys that work are the ones that are handled by the CSRSS:

  • Win+P
  • Win+L
  • Win+U
  • Ctrl+Alt+Del

In older versions of Windows (e.g., Windows 3), there was a concept of a system-modal dialog box. That is, a type of dialog box that when shown, would completely block the rest of the system from running until it was dismissed. This made some sense for certain things like critical warnings, but obviously it has serious consequences and worse, can be abused. Not surprisingly, in Windows 95, they removed the system-modal style by changing it so that instead of blocking the system, it just makes the dialog topmost (always on top of all other non-topmost windows). (Technically, a system-modal dialog was impossible in 9x anyways due to it being preemptively multitasked instead of cooperatively multitasked like 3.x was.) The UAC prompt is the closest thing to a system-modal dialog in modern Windows systems, but even that it is a sort of hack similar to, but more powerful than, XP’s fading shutdown screen (figure 4).

Because the UAC prompt is meant to be system-modal, it is not handled by the window manager (which is not capable of doing that), but rather, but by lower-level systems. Because of this, it has to handle accelerators on its own instead of just letting the shell do it, so some accelerator handling (including pressing just the accelerator key without holding Alt) does not work exactly the same as it does in Explorer and other programs.

Security+Technical

There is actually a reason for this that is combination of both security and technical reasons. In the Secure Logon of Windows NT systems (figure 5), the system can be configured to require the user to press Ctrl+Alt+Delete to log on:

Windows NT is designed so that, unless system security is already compromised in some other way, only the Winlogon process, a trusted system process, can receive notification of this keystroke combination. This is because the kernel remembers the process ID of the Winlogon process, and allows only that process to receive the notification. This keystroke combination is thus called the Secure Attention Sequence. A user pressing Control-Alt-Delete can be sure that it is the operating system (specifically the Winlogon process), rather than a third party program that is responding to the key combination (i.e., Login spoofing), and that it is therefore safe to enter a password.

Security in Windows is often handled specially by having low-level, high-privilege processes handle special keys to prevent spoofing. This way, it is more difficult to for example, allow a program to send the Yes key(s) programmatically to bypass the user. Similarly, web-browsers limit how input can be done to prevent click-fraud, automated attacks, etc. so it is no surprise that Windows’ most sensitive security screen makes it accepting the prompt to run a process with administrative privileges a little more complex.

Summary

Whether it was the security design or the technical limitation that came first (bugs or features) is not known; you would have to ask the Windows design team to find out (assuming they would be able/willing to answer). Either way, there are two reasons for it, and they both accommodate each other’s needs.


Appendix

Figure 1: Abort Retry Fail dialog

enter image description here

Figure 2: File copy dialog

enter image description here

Figure 3: UAC prompt in Aero Basic over Aero Glass desktop

enter image description here

Figure 4: Windows XP fading shutdown screen

enter image description here

Figure 5: Windows 7 secure logon screen

enter image description here

Synetech

Posted 2012-08-02T15:11:07.820

Reputation: 63 242

4

I find that I have to press Alt+y to activate the Yes button on a UAC prompt. This may work for you.

Fran

Posted 2012-08-02T15:11:07.820

Reputation: 4 774

Yes, but you are holding Alt. They are asking about pressing only Y just like with most dialog boxes. – Synetech – 2012-08-02T15:19:40.677

The OP does not say he wants to use only Y. He wrote: "[...] I prefer to use in most similar situations [...] is to use one of the shortcut keys for that box". It appears that Y is not a shortcut key for UAC prompts (at least no one here has said it works for them), but Alt+y is. – Fran – 2012-08-02T15:35:18.730

Well they repeatedly said press Y which shows that they have become conditioned to pressing just the accelerator key in simple dialog boxes: For example, when exiting winword, I might not want to modify the document I have open so I would just press "n".   So yes, they did say only Y even if they used N as their example. – Synetech – 2012-08-02T16:03:32.323

@Synetech: from the way it's phrased I believe the OP doesn't care what the key combination is, (s)he simply didn't know about Alt-key shortcuts. – Harry Johnston – 2012-08-04T00:45:01.003

@HarryJohnston, actually from the phrasing, it’s clear they are talking about how most simple dialogs do not require holding Alt. They may or may not know that technically your are supposed to hold Alt for accelerators to work and not requiring it is a convenience/bonus, so mentioning it is useful, but the question as asked is about why it doesn’t work as expected (regardless of whether the expectation is correct or not). – Synetech – 2012-08-04T13:19:17.720

@HarryJohnston, using the arrow keys says nothing about knowing how accelerators work. And again, I’ll direct you to the sentence For example, when exiting winword, I might not want to modify the document I have open so I would just press "n", where the dialogue's options are "_Yes", "_No", and "_Cancel" which clearly shows that they were asking why it doesn’t work as expected. Like you yourself said, they already know how to use the dialog via the arrow keys, so they are not asking about how to use Y, they are asking why it doesn’t work like it does in other dialogs which I explained. – Synetech – 2012-08-05T01:41:03.173

> it's a "how do I" question, not a "why is this happening" question. … if, for some reason, (s)he thought using the Alt key wasn't a good solution either surely (s)he would have mentioned it?  @HarryJohnston, Nope. He is clearly complaining that it doesn’t work they way he is used to, and thinks it should because he misinterpreted the page he linked to. Explaining how accelerators work may or may not help (no doubt he already knows about Alt since he he has done research), but it doesn’t answer the actual question of making it work like he expects. – Synetech – 2012-08-05T17:45:47.413

I have never heard of using meta as part of the shortcut for pressing buttons on dialogues. My casual observation from using Windows was that pressing the key corresponding to the underlined letter of a button activates that button always (except for the UAC dialog and, as I've discovered, the GIMP's "save, discard, cancel" dialogue -- which I attributed to GTK+). Unfortunately, my research for why pressing "y" was not enough to dismiss a UAC dialogue did not inform me that such shortcuts were called "accelerators", so I wrongly assumed that there was no other button-invoking shortcut. – binki – 2012-08-06T20:30:49.053

@Synetech: Now that the OP has clarified, this discussion is just noise, so I've deleted my last two comments. – Harry Johnston – 2012-08-06T21:18:42.500