Win7 - Opening "Programs and Features" as Admin from command line (logged in as regular user)
Solution 1:
Is there any particular reason you're trying to do this from the command-line as opposed to built-in features available in the UI? Also, might there be a system policy that's preventing you from performing these operations?
Here's a suggestion using the UI:
- Open the Start Menu
- In the Search Bar, type
appwiz.cpl
. - Wait for
appwiz.cpl
to appear in the search results. There should be only one entry at the top, under "Programs". It should have a document icon with some gears on it, and should be automatically highlighted. - With
appwiz.cpl
highlighted in the search results, press CTRL+SHIFT+ENTER. This will force Windows to attempt executingappwiz.cpl
with Administrator privileges. - Respond to any UAC prompts as appropriate.
If the above does not work, there may be an issue with your system's Security Policy. Do the following to check:
- Log into the system under an account that has Administrator permissions.
- Press Win+R.
- Type
secpol.msc
and hit ENTER. - Respond to any UAC prompts as appropriate.
- In the left pane, navigate the tree to the following location:
Security Settings\Local Policies\Security Options
- Find the "User Account Control" options, near the bottom of the list.
- Check the setting
User Account Control: Behavior of the elevation prompt for standard users
- If it is set to
Automatically deny elevation requests
, you will not be able to use Administrator permissions while running under a standard user account. - If this is set to any of the
Prompt for credentials...
settings, and the above process for runningappwiz.cpl
elevated still does not work for you, then you may have a different problem.
- If it is set to
Solution 2:
For whatever reason, the control panel applets inherit the privileges of the running Desktop shell (which is the Windows equivalent of a window manager). To escalate permissions in the control panel, you have to escalate permissions in this shell, via these steps:
- Open a command prompt as an administrative user
- Kill the running explorer process
- Ctl+Shift+Esc Open task manager, and navigate to the processes tab
- Find the
explorer.exe
process(es), and kill all of them. (Right-click, chooseEnd Process
) Your taskbar, desktop, and explorer windows will all disappear, but your command prompt will remain
- From that admin command prompt, run
explorer.exe
- Now, you should be able to open
appwiz.cpl
, or any other control panel applet with administrative privileges. - When you're done, kill the running explorer process(es), and run
explorer.exe
as the logged-in user.
Caveat: This can lose certain settings, or break your normal desktop environment. For instance, any network paths which have been mounted to a drive will be lost.