CMD.exe 调用后立即关闭(Win7 64) [英] CMD.exe closes immediately after calling (Win7 64)

查看:40
本文介绍了CMD.exe 调用后立即关闭(Win7 64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人发现命令处理器 (cmd.exe) 在调用后立即关闭时出现这种行为?我已经运行 McAfee AV 和 Windows 系统文件检查 (sfc.exe) 并且没有检测到任何错误,我什至从其他 win 7 机器复制了 cmd.exe 文件,它仍然以相同的方式工作.最奇怪的是 - 在 Windows 7 64 上还有该文件的 32 位版本,它完全正常工作.

Has anyone found such behavior when Command Processor (cmd.exe) closes immediately after calling it? I’ve run McAfee AV and Windows System File Check (sfc.exe) and nothing wrong was detected, I’ve even copied cmd.exe file from other win 7 machine and it is still working same way. Strangest thing is – on the windows 7 64 there is also 32 bit version of that file which works perfectly normal.

SysInternals Process Monitor 显示 cmd.exe 进程以退出代码 0x0... o_O

SysInternals Process Monitor shows that cmd.exe process ends with exit code 0x0... o_O

也可以直接从开始菜单调用命令,比如 ping,工作正常……

Also calling commands directly from start menu, like ping, works normal…

也许这个问题与编码并不严格相关,但这个问题使我无法做许多与实际应用程序开发和环境检查相关的事情.

Maybe that question is not strictly related to coding but that issue holds me from doing many things related to actual application development and environment check.

推荐答案

回答所有问题:

  • 超级用户、安全模式、以管理员身份运行、更改所有权和权限 - 没有帮助
  • 我通过菜单开始调用以及单击 cmd.exe 得到相同的结果,
  • 通过今天的 McAfee 扫描、反恶意软件、MS 恶意删除等,未发现任何病毒或恶意软件

我终于解决了:

  • 运行regedit
  • 转到 HKLM\Software\Microsoft\Command Processor\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\HKEY_LOCAL_MACHINE\Software\Microsoft\命令处理器\

出于某种原因,里面有带有EXIT"的 AUTORUN 键.

For some reason there was AUTORUN key with "EXIT" inside.

还有,

在某些情况下,命令提示符也会在启动时打开,即当您登录时应用上述解决方案时,系统会在命令提示符下挂起.

In some cases, the Command prompt is also opening on Startup, which is when the above solution is applied hangs the system on Command prompt when you logon.

这可以通过使用 Autoruns 来解决,您需要在其中在登录/启动选项卡上禁用命令提示符启动注册表.(可以有多个条目)

This can be fixed by using Autoruns, where you need to disable command prompt startup registries on Logon/Startup tab. (there can be more than one entries)

那个也解释了为什么退出代码是 0x0.

That one also explains why exit code was 0x0.

不知道是什么东西设置了那个键... McAfee 上周显示了一些活动,我上周五注意到了.

Have no idea what kind of thing set that key up... McAfee showed some activity lat week and I've noticed it last Friday.

希望这些症状和我的回答能在未来对某人有所帮助

Hope these symptoms and my answer will help someone in future

这篇关于CMD.exe 调用后立即关闭(Win7 64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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