停止CMD始终以管理员权限打开 [英] Stop CMD from always opening with administrator privileges

查看:1360
本文介绍了停止CMD始终以管理员权限打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我如何打开它,cmd.exe总是以管理员权限打开。如何打开它没有?是否有一些注册表设置丢失?即使我直接从运行对话框中打开它或通过双击在system32文件夹中它仍然打开与管理员privs。



谢谢。



$ b $ b


  • Cmd.exe始终以管理模式启动。



  • 项目:错误PRJ0003:生成'C:\windows\system32\cmd.exe'错误。




属性|兼容性选项卡显示为灰色,因此关闭此选项似乎是不可能的(兼容性模式不能在此程序上设置,因为它是此版本的Windows的一部分)。



这种情况下,您必须编辑注册表以删除与cmd.exe关联的RUNASADMIN首选项。



'RUNASADMIN'首选项存储在这些注册表项中:



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



删除名为c:\windows\system32\cmd.exe的值,并恢复业务!



Kees


No matter how I open it, cmd.exe always opens with admin privileges. How can I open it without? Is there some registry setting missing? Even if I open it directly from the run dialog or by double clicking in the system32 folder it still opens with admin privs.

Thanks.

解决方案

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

  • Cmd.exe always starts in Adminstration mode.

  • Linking in VS failed with the message: Project : error PRJ0003 : Error spawning 'C:\windows\system32\cmd.exe'.

The Properties | Compatibility tab is greyed out, so switching this off seems impossible (Compatibility modes cannot be set on this program because it is part of this version of Windows).

To recover from this situation you have to edit the registry to remove the RUNASADMIN preferences that is associated with cmd.exe.

The 'RUNASADMIN' preference 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 named c:\windows\system32\cmd.exe and you are back in business !

Kees

这篇关于停止CMD始终以管理员权限打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆