CMD.exe closes immediately after the call (Win7 64)

Has anyone found this behavior when the shell (cmd.exe) closes right after the call? I ran McAfee AV and check the Windows system files (sfc.exe), and nothing bad was found, I even copied the cmd.exe file from another win 7 machine, and it still works the same. The strangest thing is that on Windows 7 64 there is also a 32-bit version of this file, which works perfectly fine.

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

In addition, calling commands directly from the Start menu, for example, ping, works fine ...

Perhaps this question is not directly related to coding, but this question keeps me from many things related to real application development and environment testing.

+10
source share
4 answers

Answering all questions:

  • superuser, safe mode, run as administrator, change of ownership and access rights - did not help
  • I called using the "Start" menu and pressing the "d" button (click on cmd.exe) with the same result,
  • To date, not a single virus or malware has been detected that scans using McAfee, Anti-malware, MS, malware removal, etc.

I finally figured this out :

  • Run regedit
  • Go to HKLM\Software\Microsoft\Command Processor\or HKEY_CURRENT_USER\Software\Microsoft\Command Processor\orHKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\

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

  • AutoRun, .
  • CMD.exe .

,

, .

, " /". ( )

, 0x0.

, ? , .

, -

+43

, -, .

HKLM\Software\Microsoft\Command Processor "", . , , RUN cmd.exe/d

, HKCU\Software\Microsoft\Command Prompt . , , , . , . , , , . , .
, .

- - , , registyr, , .

, , , , . , , , .

.
http://software.oberberger.com/2008/09/interesting-stuff-about-cmdexe.html

.

+3

- cmd.exe . , cmd.exe /K cmd.exe, . , :

C:\>chcp
Active code page: 65001

, :

[HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]
"CodePage"=dword:0000fde9

Another solution is to change the font cmd.exefrom raster fonts to true type.

+1
source

This is a shot in the dark, but in the past I saw such problems, when the debugger pointed incorrectly with the help of the Image file parameters , you can check if there is an entry 'cmd.exe' there.

0
source

All Articles