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

How to run NOT elevated in Vista (.NET)

I have an application that I have to run as Administrator. One small part of that application is to start other applications with Process.Start The started applications will also be run as administrators, but I'd rather see them run as the 'normal'…
idstam
  • 2,848
  • 1
  • 21
  • 30
20
votes
3 answers

How to add manifest info into delphi project

What is the easiest way to add the manifest info to a Delphi XE project (.exe)? Is it possible to add just the required node like:
markus_ja
  • 2,931
  • 2
  • 28
  • 36
20
votes
3 answers

How do I make a console app always run as an administrator?

I have a console application that was developed to be called by a erp software. They call my app inside the erp and when they do it, i always get errors related to the insufficient permission to do it. I have checked the "run this program as an…
Marco
  • 235
  • 1
  • 2
  • 8
20
votes
1 answer

Dropping privileges in C++ on Windows

Is it possible for a C++ application running on Windows to drop privileges at runtime? For instance, if a user starts my application as Administrator, but there's no reason to run my application as administrator, can I in some way give up the…
Nitramk
  • 1,542
  • 6
  • 25
  • 42
19
votes
8 answers

Disabling UAC programmatically

Is it possible to programmatically disable UAC in Vista? Or, can I make my application run unrestricted by the UAC setting in any way? FYI, the application needs to mount hard drives on the fly, which is why I can't ask for UAC permission each…
Abdullah Jibaly
  • 53,220
  • 42
  • 124
  • 197
19
votes
3 answers

Setting the UAC 'Publisher' Field for a NSIS Installer

When I open my installer(that I created using NSIS), the UAC dialog appears with information about my installer. The field Publisher is 'unknown'. I've heard of digitally signing the application, do you know how to do this in NSIS? How can I set the…
sazr
  • 24,984
  • 66
  • 194
  • 362
18
votes
2 answers

MSI, UAC and Unidentified Publisher. How do I change the Unidentified Publisher?

I am currently working on a MSI package for one of my application. It works well; however, before the installation starts, I get the expected UAC window asking me if I trust or not this program from the Unidentified Publisher. I am not concerned by…
Martin
  • 39,309
  • 62
  • 192
  • 278
17
votes
2 answers

starting a UAC elevated process from a non-interactive service (win32/.net/powershell)

I'm using a thrid party Windows service that handles some automation tasks by running scripts and executables using CreateProcessAsUser(). I'm running into problems on Windows Server 2008 due to UAC and way the LUA elevation is handled through the…
Chris Sears
  • 6,502
  • 5
  • 32
  • 35
17
votes
3 answers

Showing the UAC prompt in PowerShell if the action requires elevation

I have a simple PowerShell script to stop a process: $p = get-process $args if ( $p -ne $null ) { $p | stop-process $p | select ProcessName, ID, HasExited, CPU, Handles } else { "No such process" } If I try to stop a process not started by the…
driis
  • 161,458
  • 45
  • 265
  • 341
17
votes
4 answers

Where to put common writable application files?

I thought that CSIDL_COMMON_APPDATA\company\product should be the place to put files that are common for all users of the application and that the application can modify, however, on Vista this is a read-only location, unless modified by the…
dennisV
  • 1,119
  • 3
  • 19
  • 34
16
votes
4 answers

Delphi 7 vista / windows 7 manifest

Would anyone have an example of a manifest file for Delphi 7 which allows apps to run as administrator on Windows XP / Vista / 7? Running an application with this feature usually leads to a User Account Control (UAC) dialog asking for privileged…
colin
  • 2,983
  • 6
  • 41
  • 49
16
votes
2 answers

Correct way to deal with UAC in C#

I have an application (Windows service) that is installed into a directory in the Program Files folder. Alongside this application is another WinForms application that is used to configure the service (amongst other things). When it does…
adrianbanks
  • 81,306
  • 22
  • 176
  • 206
16
votes
2 answers

Win C#: Run app as administrator without UAC prompt

I need one of my .exe to always run as administrator without UAC prompt. My program will be installed with setup, which will have for one time admin rights, and I need to perform such step in this setup that my exe will be always executed as admin…
Paya
  • 5,124
  • 4
  • 45
  • 71
16
votes
1 answer

C#: What are Partially Trusted Callers?

I haven't seen this clearly defined in one page: Partially Trusted Callers. I am researching about APTCA and this is always mentioned, but MSDN does not have an article about it. I only had a few clues, but I am not 100% sure. Are code executed…
user46915
16
votes
3 answers

Write in "ProgramData" folder (W7 and Vista) .NET

I install my app under "Program Files" directory. And I install data, under "ProgramData" directory: Environment.SpecialFolder.CommonApplicationData In programData I have created folder to save data. Example: C:\ProgramData\MyApp\MyData\here I have…
aco
  • 819
  • 4
  • 15
  • 32