Stop CMD from opening as administrator

Regardless of how I open it, cmd.exe always opens with administrator privileges. How can I open it without? Is there any registry setting? Even if I open it directly from the launch dialog box or double-click in the system32 folder, it still opens with admin privs.

Thanks.

+6
source share
6 answers

I do not have a registry key. In HKEY_CLASSES_ROOT \ Directory \ shell \ cmd I am missing the value of the string "Extended". Added this again and restarted the machine, getting rid of the administrator privileges by default.

EDIT . I disabled UAC for my profile (to stop the ongoing "Are you sure you want to open this .exe"), and enabling this option stopped CMD, always working with higher privileges.

+3
source

After some fuzzy actions (turning on / off UAC?), I ended up in the same situation as described above:

  • Cmd.exe always starts in administration mode.

  • Connection failed in VS: Project: PRJ0003 error: error "C: \ windows \ system32 \ cmd.exe".

Properties | The Compatibility tab is grayed out, so turning on this option seems impossible (compatibility modes cannot be set in this program because they are part of this version of Windows).

To recover from this situation, you need to edit the registry to remove the RUNASADMIN settings associated with cmd.exe.

The preference 'RUNASADMIN' is stored in these registry keys:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows NT \ CurrentVersion \ AppCompatFlags \ Layers HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ AppCompatFlags \ Layers

Delete the values โ€‹โ€‹c: \ windows \ system32 \ cmd.exe and you are back in business!

Kitty

+1
source

Right-click on cmd.exe, select the properties and check the compatibility tab. Is the "Run this program as administrator" checked?

0
source

Found a way to run as a specific user, even when the UAC is disconnected from http://www.sevenforums.com/general-discussion/235987-run-cmd-exe-given-user-administrator-command-line.html

This is the way to run cmd.exe like any user. Replace "username" with the correct one:

cmd.exe> runas /user:username "cmd.exe" 
0
source

Right-click on the cmd shortcut, go to properties, select additional options and uncheck "Run as administrator".

Check out this video for a better understanding - https://www.youtube.com/watch?v=3Mxh5TNSIl8&list=PLg8CURsOKswrzPs9fMhnmdy9TP7AkOOX1&index=1

0
source

This only happens because you are logged in as a user with administrator rights.

Since this defeats the entire Windows security model, you should not do this in the first place. Create a standard user account and log in with that. The command line should not be opened with administrator rights, since you do not have administrative rights.

If as a standard user you need to open a command prompt with administrator rights, you need to right-click on the shortcut and select the option โ€œRun as administratorโ€ (just find the UAC screen). You will need to provide sufficient authority to authenticate yourself as an administrator, and then you will have the right to cause any chaos that you wish.

-1
source

Source: https://habr.com/ru/post/904070/


All Articles