1

I have administrator privileges in Windows Vista.

Even then I have to run few programs as 'Run as Administrator'( by right click menu option) to make them work successfully.

For e.g. I am able to build a Visual Studio solution only when I launch it by clicking 'Run as Administrator' (otherwise it says 'Access denied for files').Its the same case with few other programs like Command Prompt.

How do I make sure that by default all programs to be running as administrator ?

1
  • I have that problem too, where I want one (and only one) of my app to run under administrator mode sometimes because it checks if a new version is available and downloads it. To isntall it, I need that administrator privileges and I can only do this when I 'run as admin'. Really not a good thing because the persons that use it will be scared from such an issue.
    – David Brunelle
    Feb 5, 2010 at 20:53

4 Answers 4

4

You don't want all programs to run as administrator by default (that's sort of the point witt UAC).

Instead, edit the shortcut for those programs where you do need to run as administrator: right-click the shortcut, select the "Properties" command, go to the "Compatibility" tab and check the "Run as administrator" check box.

2
  • This is true, but it will still cause the UAC prompt to appear to authorize administrator rights. Jul 17, 2009 at 6:02
  • You can set UAC to elevate without prompt. Goto ->Control Panel -> Local Security Policy -> Local Policies -> Security options ->User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode. Set it to "Elevate without prompt".
    – Ganesh R.
    Jul 17, 2009 at 6:19
2

Are you sure you want to have your programs automatically run as administrator? That is a good way to give malicious or poorly written programs free reign to destroy your system. All other operating systems use a more restricted set of privileges than "root" (administator) when running standard programs; only Windows has, to its detriment, allowed programs to run as administrator by default, and now they finally fixed it.

A better approach might be to write to locations belonging to your user account, rather than generating output into a system directory. If it is failing as a result of reading from a system directory (e.g. where your header files are currently located), a better solution would be to change the permissions of those files (for example, to grant read-only access to all users), rather than running in an elevated privilege mode.

0

The trick here is that 'administrator privileges' is not the same as the Administrator account. You might notice that you can't copy and paste between a command prompt running as an administrator while you can if you run it under your own account.

You should be able to suppress warnings by logging in as Administrator, but then you're running everything as Administrator, including 'programs' that shouldn't have unrestricted, uninterruptable access to system functions.

Alternatively, I believe you can set some programs to always run as Administrator when launched. It's not comprehensive, but if you're just trying to avoid clicking through the UAC prompt every time you start up Visual Studio, that would be the way to go.

0

Vista has a feature called User Account Control that allows an Administrator to basically run as a limited/standard user account, but request elevated privileges when needed.

So, when you select Run As Administrator, you'll telling the system to give that application elevated rights. Otherwise, the program runs with standard user rights and doesn't have access to much of the system.

For example, they cannot write to the Program Files or Windows folders.

To get all of your programs to run with full Administrator rights, it's possible to turn off UAC. You should be careful as it removes the security feature. Personally, I turn it off.

You must log in to answer this question.