Questions tagged [uac]

This tag is used for questions concerning the User Account Control (UAC) security feature of Windows Vista, Windows 7, 8 and higher versions of Windows.

This tag is used for questions concerning the User Account Control (UAC) security feature of Windows Vista, Windows 7, 8 and higher. This feature, enabled by default, reduces the privilege level of an Administrator account to those of Limited User account. Because of this, many programs that worked in previous Windows versions do not work as expected in Windows Vista, Windows 7, 8 and higher.

With UAC, each user having admin rights would have split-token - one for regular usage and one for administrative usage. Regular token won't be able to have administrative permissions (such as changing system-time, or installing applications). Administrative token would have rights to do any administrative activity.

A process (and all its threads) would have either of these tokens, and they cannot change to another token (for e.g. from Regular to Admin). User has to respond to UAC prompt when opening Admin mode (elevated) application.

Programmers can specify if their programs to require admin (elevated) token so that OS will always attempt to launch the process with elevation. This information is put into EXE header itself.

1432 questions
13
votes
1 answer

What are the UAC implementation best practices? (.NET)

I'm thinking about developing an application that should run as standard user most of the time, but for certain operations, elevated administrative access will be required. The user expecience should be like in Windows Explorer when copying…
ygoe
  • 18,655
  • 23
  • 113
  • 210
13
votes
2 answers

Disabling UAC with Powershell

I'm trying to disable UAC (i.e. set to the minimum level) using Powershell. So I'm running: Set-ItemProperty -Path REGISTRY::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 0 I've also tried this…
Sam
  • 887
  • 1
  • 12
  • 27
13
votes
1 answer

How to prevent uninstaller elevating for Standard Windows 10 user?

We have an x86 Win32 desktop application. When the installer is run by a Standard (non-Admin) user, we avoid elevating and/or showing a UAC prompt and install under C:\Users\username\AppData\Roaming\... instead of the common Program Files…
d.l.
  • 141
  • 1
  • 6
13
votes
1 answer

WIX Burn Bootstrapper not asking for admin rights for my MSI

I created an MSI with WIX that needs elevated permissions to work correctly. In the MSI Project, I specified this via Now I included this MSI in a custom bootsrapper project, based on WixWPF…
Dennis
  • 14,210
  • 2
  • 34
  • 54
13
votes
2 answers

Is it possible to UAC elevate a process without starting another process

I was wondering if it is possible for a program to prompt the user with a UAC prompt to raise it's own privileges without starting another process. All the examples I can find on the internet seem to ShellExecute "runas" which creates a new process…
Negs
  • 233
  • 1
  • 6
12
votes
1 answer

UAC elevation does not allow drag and drop

I have a .net application where I need to elevate with admin rights due to accessing some low level win APIs. I am doing it using requestedExecutionLevel in application manifest set to requireAdministrator. The application also needs to receive drag…
CDS
  • 135
  • 1
  • 1
  • 6
12
votes
5 answers

Developing Apps with Administrator Rights in Delphi

I'm using D2010 under Windows 7 to write an app that seems to require admin rights (I think because it uses COM to communicate with a third party .exe, which also requires admin rights). I've added the manifest resource as required, but when I try…
Roddy
  • 66,617
  • 42
  • 165
  • 277
12
votes
3 answers

display application icon on UAC elevation prompt for application run from network share

I have configured my .NET application using an application manifest to request administrator privileges. I have also signed the assembly using signtool. Everything works great—when you start the application, you get the nice UAC prompt with the…
Will Rogers
  • 431
  • 1
  • 5
  • 14
12
votes
7 answers

How to configure Visual Studio not to give UAC prompt on each run?

I have switched to Vista recently and I wanted to keep UAC turned on, as I agree it increases computer security a lot. Some developer tools I use regularly require running elevated: PIX for Windows Visual Studio 2005 (elevated privileges seem to be…
Suma
  • 33,181
  • 16
  • 123
  • 191
12
votes
2 answers

Embed manifest file to require administrator execution level with mingw32

I'm cross compiling an application with i586-mingw32msvc under ubuntu. I'm having difficulties understanding how to embed a manifest file to require administrator execution level with mingw32. For my example I used this hello.c: int main() { …
pr.nizar
  • 641
  • 6
  • 20
12
votes
2 answers

How to run exe with/without elevated privileges from PowerShell

I would like an easy way to run a process with different privileges from the same user without asking or knowing his/her password. A dialog is okay if necessary. I would prefer not to launch a PowerShell sub-process to accomplish this. Scenario…
alejandro5042
  • 811
  • 1
  • 7
  • 17
12
votes
1 answer

How to enable drag and drop between normal & UAC elevated privileges applications

I've read this answer about how one cannot use drag & drop files from explorer (typically running without extra admin privileges) with UAC-elevated applications. One would think that elevating privileges to an EXE would give, well, more privileges,…
TheDude
  • 3,045
  • 4
  • 46
  • 95
12
votes
3 answers

How to detect file redirection to the Windows VirtualStore?

Since the release of Win Vista, Microsoft introduced file virtualization for legacy applications running as 32bit processes. Released as part of Microsoft's User Account Control (UAC) any legacy applications attempting to write to any locations…
Simpleton
  • 797
  • 4
  • 11
  • 22
11
votes
2 answers

NSIS: Installing an Application to always Run as Administrator

I have a NSIS script that is working well for a large application. I have read many threads all over the web, but cannot get a clear answer to the following: is it possible to install an application using NSIS which, when launched (regardless of the…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
11
votes
2 answers

Where to store Application Data in Windows 7 and Vista

My application needs to, like most, store data. The application was previously used on XP only where it would store the data in Program Files. Now that our customers are moving to Windows 7 I had to upgrade it so that it stored the data in a new…
Chris
  • 26,744
  • 48
  • 193
  • 345