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
16
votes
4 answers

Process.Start with different credentials with UAC on

I am trying to start another process with Process.Start running under different credentials with the UAC turned on. I get the following error: System.ComponentModel.Win32Exception: Logon failure: user account restriction. Possible reasons are …
AdamBT
  • 1,936
  • 2
  • 30
  • 48
16
votes
1 answer

How to sign an installer to prevent Vista's UAC warning

I have an app that I need to distribute and want to sign it so I can avoid the UAC warnings in vista. Currently I see this... UAC http://img694.imageshack.us/img694/7289/uac.jpg I am using visual studio to create the installer but the app was not…
Mike
  • 5,437
  • 7
  • 45
  • 62
16
votes
3 answers

Embedding an application manifest into a VB6 exe

I have recently gone through a bunch of standalone utility apps written in VB6 to make sure that registry virtualization is turned off for Windows Vista and above. I created a standalone manifest file for each exe, set the requestedExecutionLevel…
Christian Hayter
  • 30,581
  • 6
  • 72
  • 99
16
votes
3 answers

How to UAC elevate a COM component with .NET

I've found an article on how to elevate a COM object written in C++ by calling CoCreateInstanceAsAdmin. But what I have not been able to find or do, is a way to implement a component of my .NET (c#) application as a COM object and then call into…
Pierre Arnaud
  • 10,212
  • 11
  • 77
  • 108
16
votes
5 answers

UAC and Java

Is it possible to ask for elevated permissions from within a Java Application? Suggestions I've seen seem to all be centered around running an external executable or setting up a manifest to request privileges on launch. These aren't available to,…
joegester
  • 307
  • 1
  • 3
  • 11
15
votes
3 answers

How to prevent Vista from requiring elevation on patch.exe?

[I'm sorry that this isn't directly a programming question. But I have recently switched to a new Vista machine where I am keeping UAC enabled (please don't tell me to disable it, it's not an option).] Every time I run gnu's patch.exe I get an…
scobi
  • 14,252
  • 13
  • 80
  • 114
15
votes
2 answers

Failure to create elevation COM object on Windows Seven

I am developing a COM surrogate object in C, it will be used by my applications to call the UAC elevation dialog for certain actions that require administrative rights. The plan is to make this it export a function that takes a pointer to a function…
ralien
  • 1,448
  • 11
  • 24
15
votes
3 answers

How to embed a manifest file at compile time in Visual Studio 2010

I have a project with a manifest file with the following node: ...meaning I want it to only run "as administrator" by default. from searching around, to make this work I…
andy
  • 8,775
  • 13
  • 77
  • 122
15
votes
3 answers

How do I get around application scope settings being read-only?

What use are they if they cannot be altered from their default values anyway? Rhetorical question. First, what's the best way to circumvent the Settings system and write to the application scope settings file directly (security issues in the next…
CannibalSmith
  • 4,742
  • 10
  • 44
  • 52
15
votes
1 answer

How to change icon in UAC prompt of signed installer (WiX)?

I'm creating an msi package with WiX 3.5 (VS2010) and everything is fine, except that I don't know how to set my icon in UAC prompt. I already have a signing certificate and know how to sign with "signtool.exe" to get the publisher information and…
ptkvsk
  • 2,096
  • 1
  • 25
  • 47
14
votes
2 answers

How do I create a manifest file to launch application with admin privileges?

I want to create a manifest file for my VB 6.0 program, so that when I launch my application, the OS should ask the user for administrator privilege. I also want to know how it can be embedded in the application?
nightfire001
  • 759
  • 3
  • 20
  • 50
14
votes
3 answers

How do I elevate my UAC permissions from Java?

I need to use the systemRoot feature of the Preferences API, but it fails due to lack of permissions on Windows if UAC is on. I'm trying to find the technical details of popping the UAC prompt and elevating my permissions to allow the systemRoot…
Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92
14
votes
4 answers

Storage location of yellow-blue shield icon

Where, in Windows, is this icon stored? I need to use it in a TaskDialog emulation for XP and am having a hard time tracking it down. It's not in shell32.dll, explorer.exe, ieframe.dll or wmploc.dll (as these contain a lot of icons commonly used in…
Oliver Salzburg
  • 21,652
  • 20
  • 93
  • 138
14
votes
1 answer

Process.Start never returns when UAC denied

I have an updater exe that is meant to close the primary exe, replace it with an updated exe, and then launch that updated exe. When the updater attempts to start the updated exe, if the UAC permissions dialog is denied by the user, the updater will…
13
votes
4 answers

Giving application elevated UAC

I have an application which needs the UAC elevation. I have the code which lets me give that but the application opens twice and that's an issue. Here's the code of Form1: public Form1() { InitializeComponent(); WindowsPrincipal pricipal =…
user175084
  • 4,550
  • 28
  • 114
  • 169