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
52
votes
7 answers

Requested registry access is not allowed

I'm writing a tweak utility that modifies some keys under HKEY_CLASSES_ROOT. All works fine under Windows XP and so on. But I'm getting error Requested registry access is not allowed under Windows 7. Vista and 2008 I guess too. How should I modify…
abatishchev
  • 98,240
  • 88
  • 296
  • 433
50
votes
6 answers

How to prevent "This program might not have installed correctly" messages on Vista

I have a product setup executable that copies some files to the user's hard drive. It's not a typical installer in the normal sense (it doesn't add anything to the Start Menu or Program Files folders). Each time the setup program is run on Vista,…
Jason
  • 28,040
  • 10
  • 64
  • 64
50
votes
2 answers

Privileges/owner issue when writing in C:\ProgramData\

As pointed out in Writing config file in C:\Program Files (x86)\MyApp\myapp.cfg, vs. Administrator privilege, it is not a good idea to write a config file in C:\Program Files (x86)\MyApp\myapp.cfg. Instead of this, my software now saves its data in…
Basj
  • 41,386
  • 99
  • 383
  • 673
45
votes
3 answers

Program Compatibility Assistant thinks my app is an installer

I have created a .NET C# WinForms application on Win 7 RTM x64, which let's say I have called DataInstaller. When I run this program outside of the debugger (just an empty form with no functionality at the moment), it works fine until I close the…
Carl
  • 5,881
  • 4
  • 25
  • 24
42
votes
4 answers

How can I detect if my process is running UAC-elevated or not?

My Vista application needs to know whether the user has launched it "as administrator" (elevated) or as a standard user (non-elevated). How can I detect that at run time?
Andrei Belogortseff
  • 1,861
  • 3
  • 18
  • 26
42
votes
7 answers

Java: run as administrator

Is there a way in Java to ask the system to get control over administrator functionality. Of course without doing: Right click on the exe -> run as admin. What I want is that there comes a frame from UAC like in Windows Vista or Windows 7. Or have I…
Martijn Courteaux
  • 67,591
  • 47
  • 198
  • 287
41
votes
4 answers

How to use ServerManager to read IIS sites, not IIS express, from class library OR how do elevated processes handle class libraries?

I have some utility methods that use Microsoft.Web.Administration.ServerManager that I've been having some issues with. Use the following dead simple code for illustration purposes. using(var mgr = new ServerManager()) { foreach(var site in…
Josh
  • 2,740
  • 3
  • 27
  • 41
40
votes
4 answers

Delphi: Prompt for UAC elevation when needed

We need to change some settings to the HKEY_LOCAL_MACHINE at runtime. Is it possible to prompt for uac elevation if needed at runtime, or do I have to launch a second elevated process to do 'the dirty work'?
Vegar
  • 12,828
  • 16
  • 85
  • 151
37
votes
2 answers

Why do files get placed in "C:\Users\AppData\Local\VirtualStore\Program Files(x86)"?

I recently updated my Visual Basic 6.0 application and now include an exe.manifest file to prevent UAC Virtualization. After applying this update, some users can't find their data files (Access MDB files) and after a system search they end up…
Neal
  • 9,487
  • 15
  • 58
  • 101
35
votes
3 answers

How can I run a child process that requires elevation and wait?

Win 7/UAC is driving me crazy. From within my C++ application, I need to run an executable that requires elevation on Windows 7. I want to fire this thing off and wait for it to finish before proceeding. What's the easiest way to do this? I…
KenG
  • 353
  • 1
  • 3
  • 4
33
votes
2 answers

Make Inno Setup installer request privileges elevation only when needed

Inno Setup installer has the PrivilegesRequired directive that can be used to control, if privileges elevation is required, when installer is starting. I want my installer to work even for non-admin users (no problem about installing my app to user…
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
33
votes
6 answers

How do you de-elevate privileges for a child process

I know how to launch a process with Admin privileges from a process using: proc.StartInfo.UseShellExecute = true; proc.StartInfo.Verb = "runas"; where proc is a System.Diagnostics.Process. But how does one do the opposite? If the process you're…
Davy8
  • 30,868
  • 25
  • 115
  • 173
32
votes
7 answers

dotnet core app run as administrator

I have a dotnet console application that requires administrator privileges to run. I can't find how to do this. In a regular project I would add a app.manifest and set but I…
A Jackson
  • 2,776
  • 7
  • 34
  • 45
31
votes
1 answer

Run process as administrator from a non-admin application

From an application that is not being run as administrator, I have the following code: ProcessStartInfo proc = new ProcessStartInfo(); proc.WindowStyle = ProcessWindowStyle.Normal; proc.FileName = myExePath; proc.CreateNoWindow =…
jkh
  • 3,618
  • 8
  • 38
  • 66
29
votes
5 answers

TortoiseSvn and Windows Server 2008 user account control

Here is the question: Can TortoiseSvn work on Windows 2008 without turning off User Account Control? Here is the story: I just moved my test server to Windows 2008 and I am having problems with TortoiseSvn. I am logged on as an administrator, but…
Mark Arnott
  • 1,975
  • 3
  • 17
  • 28
1
2
3
95 96