> Hello. I am having an issue with the Windows command prompt window staying
> open even when there are no cmd.exe process running in the back ground. In my
> job it is often necessary for me to have multiple instances of this open.
> What happens is that I will either close the window by clicking the "X" or I
> will type exit. After doing that, the process "cmd.exe" will close but the
> window will stay open. I have tried looking for the processes with Process
> Explorer but find nothing. As I am typing this, I have 4(four) of these
> windows locked open. I am able to minimize them and maximize them but not
> close them. Any Ideas?
Hi Dan,
Does it make a difference whether you're running full screen or not
(alt-Enter), and then typing exit? Are you unable to type anything in
the window after you click the X or type exit? How are you launching
it, by a created shortcut or Windows key-R? Does the same thing happen
in Safe Mode?
These kinds of things are hard to t-shoot without being able to replicate.
--
Terry R.
***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
"Terry R." wrote:
Hi Terry,
Generally I launch via Window Key-R but sometimes with shortcut. I don't run
them in full screen mode and I am unable to type in them. Safe Mode status is
unknown. unfortunately the issue doesn't occur every time. I may have 6
prompt windows open and 1 or 2 won't close sometimes, and other time they
will all close. Also I have to manually shut down the PC when this happens.
If I try to log off, shut down, or reboot, the system hangs and then I have
to hold in the power button to turn it off.
My first step would be to ensure that I'm really executing
c:\windows\system32\cmd.exe
and not some other program that happens to call itself "cmd" - which is
often the case with malware. To do so you must create a new shortcut
that specifies the full path.
"Pegasus (MVP)" wrote:
Here is the Path : %SystemRoot%\system32\cmd.exe
>
> "Terry R." wrote:
>
>> Does it make a difference whether you're running full screen or not
>> (alt-Enter), and then typing exit? Are you unable to type anything in
>> the window after you click the X or type exit? How are you launching
>> it, by a created shortcut or Windows key-R? Does the same thing happen
>> in Safe Mode?
>>
>> These kinds of things are hard to t-shoot without being able to replicate.
>>
>>
> Hi Terry,
>
> Generally I launch via Window Key-R but sometimes with shortcut. I don't run
> them in full screen mode and I am unable to type in them. Safe Mode status is
> unknown. unfortunately the issue doesn't occur every time. I may have 6
> prompt windows open and 1 or 2 won't close sometimes, and other time they
> will all close. Also I have to manually shut down the PC when this happens.
> If I try to log off, shut down, or reboot, the system hangs and then I have
> to hold in the power button to turn it off.
Can you test it for a while in Safe Mode? Sounds like something is
causing cmd to hang, and Safe Mode would be a start. Are you sure that
whatever you're doing in all the windows has completed before closing
them? What requires the use of multiple windows rather than just using
one? Does it happen with only one window open? Are you using switches
with your commands?
"Dan" <D...@discussions.microsoft.com> wrote in message
news:FFD07A84-954D-47B0...@microsoft.com...
>
>
> "Dan" wrote:
>
>> Hello. I am having an issue with the Windows command prompt window
>> staying
>> open even when there are no cmd.exe process running in the back ground.
>> In my
>> job it is often necessary for me to have multiple instances of this open.
>> What happens is that I will either close the window by clicking the "X"
>> or I
>> will type exit. After doing that, the process "cmd.exe" will close but
>> the
>> window will stay open. I have tried looking for the processes with
>> Process
>> Explorer but find nothing. As I am typing this, I have 4(four) of these
>> windows locked open. I am able to minimize them and maximize them but not
>> close them. Any Ideas?
>
> Anyone else out there with any ideas?
>
> "Dan" wrote:
>
>> Hello. I am having an issue with the Windows command prompt window staying
>> open even when there are no cmd.exe process running in the back ground. In my
>> job it is often necessary for me to have multiple instances of this open.
>> What happens is that I will either close the window by clicking the "X" or I
>> will type exit. After doing that, the process "cmd.exe" will close but the
>> window will stay open. I have tried looking for the processes with Process
>> Explorer but find nothing. As I am typing this, I have 4(four) of these
>> windows locked open. I am able to minimize them and maximize them but not
>> close them. Any Ideas?
>
> Anyone else out there with any ideas?
Did you try any of my last suggestions? If so, I missed your response.
"Terry R." wrote:
Sorry, I did miss your last response. In answer, running in safe mode would
be unlikely at best. I suppose I could stay late or try on Sunday. Yes, I
work in voice equipment and I always exit after I have left the the equipment
and am sitting at a command prompt. Sometime it happens with a single window
open but I'm not sure if it's just due to the law of averages that I only see
it single windows infrequently. I am often required in the couse of
troubleshooting an issue with the equipment to have multiple windows open to
trace down the issue. No switches, standard command prompt.
"Colin Barnhorst" wrote:
Continues to happen even after a fresh boot.
"Dan" <D...@discussions.microsoft.com> wrote in message
news:7D3563E1-F234-468E...@microsoft.com...
I think the only way you can t-shoot this is to eliminate anything that
might be causing the issue. Safe Mode would do that. Do you have the
latest display driver? Buggy drivers cause weird things to happen.
Safe Mode would bypass that also.
Dan, I'm hoping you found a solution to this. I am having the same
issue and have been having it for some time. I use Command Prompts
frequently for remote connectivity over slow connections. It doesn't
happen as often for me but probably once every couple weeks and the only
way to get rid of it is to hard boot. I've tried only using the exit
command and that didn't work, I also tried just hitting X and no luck
there. I've scanned my PC for everything and no luck there either. I
have noticed that it seems to only have occured when I have multiple
cmd's open but I've only seen it where one session stays up all the
others close fine. I can even open another prmopt and close it fine. I
haven't tried the safe mode suggestion cause I can't reproduce it. It
just seems to happen randomly. If/when I can reproduce it I will post
that here. I think if I was able to reproduce it though I could figure
out a solution. The system I'm having the issues on is XP and fully
patched and having no other issues.
Like Dan and Yonder, I too have had this issue for over 3 years now.
This is not a graphics, driver, memory, safemode, yada blah and etc
issue (not to be disrespectful) but is rather an issue on how a telnet
session termination is handled.
I am an experienced and professional IT person and have used a few
different latops and desktop systems in the last 3 years - all of which
show the same problem when it does 'by chance' happen. These systems
differ in make and configuration (note: even my colleague has had this
happen in his WinXP vmware guest). What we need is a 'Microsoft' IT
expert to track this down.
I work with networking gear and as such have several 'cmd.exe' windows
open with a telnet session established to remote devices. And this is
when the issue 'can' occur. The issue is not reproducible all the time
but happens when a user (in this case me) is logged in to a remote
device via telnet.
If the telnet session is terminated via a remote device timeout (as is
the case with cisco gear for security reasons) the 'cmd.exe has a good
chance of hanging - not always - no way to predict when. Then the only
way to close the window (and subsequently turn off the computer b/c as
mentioned it won't shut down) is to power off the machine via holding
the power button. The machine operated fine aside from not being able to
close the window or shutdown the machine. (so to summarize, open cmd.exe
window, issue a telnet to remote device. Login. Do some work, turn and
talk to someone wanting to discuss how they painted the deck on the
weekend, turn back to the computer to find the session has expired do to
a lack of activity. type exit.. nothing.. click the 'x' and nothing.
Cllick start shutdown.. processes start to close but no full shutdown
happens.)
I have tired waiting for MS to release a hotfix as I just don't see it
coming. I find it hard to beleive that this hasn't been called into MS
or fixed yet. Strange!!!
Any MS experts out there that can shed some light on why this session
termination is not handled properly and is causing this to happen?
Cheers!
I run the telnet command after opening the command prompt, rather than
running telnet.exe from the Run dialog. My machine also will not power
off except by cutting power as well. No process for it in Process
Explorer either. It just appears to be a UI anomaly. I would recommend
using SecureCRT or PuTTY to initiate telnet sessions, as I don't have
this issue with those applications. They also offer additional benefits
of being able to save addresses you connect to regularly, as well as
automate login credentials in the case of SecureCRT, if you feel secure
doing that sort of thing.
If you think there is a bug in cmd.exe then you should post full details
here. You say "I can't believe Microsoft hasn't heard of this issue before"
and say "I can't believe there is a bug left in cmd.exe after all this
time". Let's get the all the details first, then pass judgement on the MS
engineers!
Its not telnet related. I just encountered the problem for the first
time and I wasn't doing anything remotely telnet-ish. I accidently typed
'cmd' in the "Start->Start Search" textbox instead of in the "Run"
textbox. I got up a cmd window with the title: -select CMD Shell -
"C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SetEnv.Cmd"- that
won't go away. I can't kill it. None of the exit methods work. I can't
type into the window. I can drop down the titlebar menu, select
(non-existant) text, and scroll the scrollbar. That's it.
It doesn't show up in the process tree anywhere that I can find. It is
consuming CPU resources. My computer is more sluggish than usual (and
this is a fast computer). I've also tried using "Process Explorer" which
is a little more revealing version of the task manager and it can't spot
the process either. It looks like its a ghost/zombie window.
I'd like to figure out how to get rid of it without rebooting if
possible but I'm not going to spend all night doing it. I guess I'll
just chalk it up to more Microsoft stupidity and reboot anyway.
"bratwiz" <bratwiz...@no.email.invalid> wrote in message
news:bratwiz...@no.email.invalid...
I gave all the details. Cmd.exe will hang, in both 2000 prof. and xp
prof. No error code is given. They just hang and become unresponcive.
The window will not close and the pc will not shut down without a hard
reboot.
I only speculate that it must be a bug in cmd.exe because it happens in
both 2000 prof and xp prof, but I'm not a MS expert. Does this help?
Is this the 1st you heard of this issue?
I have opened cmd.exe on hundreds of Win2000/XP machines for many years and
it never hung. If it hangs on your machines then there could be one of two
reasons:
a) You do it in a certain way that you have failed to describe so far.
b) Your Windows installations are damaged.
Note: If this was a generic problem with cmd.exe then it must be repeatable
on other machines when following your step-by-step recipe (which we haven't
seen so far). If it is not repeatable the it is caused by a problem on your
own machines, e.g. malware or virus infection.
I don't see how it could be the way I use it. I will open the app via
a shortcut from the start menu. Use it for ping, tracert, nslookup,
telnet, ect.., and when I try to close it, it hangs.
Both PC's I've mentioned have been provided by my work, and supposed to
be very stable images. Also, I am not the 1st and only person to have
this issue. Read back to previous entries.
Also, the problem doesn't happen every time I use cmd.exe, so it is
very hard to duplicate. So far, I have had this new laptop 3 weeks, and
it has only happened 2 times. I will usually open 5 - 15 cmd.exe
windows every night.
That definitely sounds like a cockpit problem. Something unobtrusive is
being set up somehow that invites the apparently random problem of going
into a loop or into outer space. I'd be posting and looking for others
thoughts on it too if it were me, but that really doesn't sound like a
"bug".
Until you can find a way to reliably repeat the symptoms (in which
case the fix might become obvious) so others can get a look at it too,
there isn't likely to be a lot you can do. Personally I have never even
heard of such a problem on a fully functioning, malware-free machine.
It does occur to me that the inability to close it could either be an
interaction with some app that most others don't have, something more or
less unique to your machines, or:
More than one cmd session is running, and the one you see cannot
close until the other one finished up and releases it. Do you have
sessions calling other session? If so, that could be a likely culprit.
Does Event Viewer show anything?
How about firewall logs? Especially if this has anything to do with a
LAN of any kind.
Do you know if the cpu is being sent to a slow mode? Worth checking;
perhaps it wants an hour or so before it can close out everything that
needs to close.
Is a preceding session leaving an env variable that isn't cleared &
thus it can't close?
Lots and lots of possibilities until it can be duplicated by someone
else. I'd say just start plugging away at them one at a time until
something showed up.
I haven't bothered with "howto" because I suspect you know those things
already and it's make for a very long post, probably error-prone since I
haven't taken on a proper load of caffiene yet<g>. If not, post back;
many will be happy to suggest how-to for the various things.
HTH,
Twayne
As well, I am an IT professional (dating from pre-GUI days) and
constantly hop in and out of command prompt windows.
I see this happen maybe once every two to three months, and yes,
typically it's after having been telnetted to a network device that
severed the connection. However the "lock up" doesn't occur the moment
of the disconnection. I might proceed and execute various other
commands. I'm staring at one window right now where the cisco router
dropped the connection, and I proceeded to run some other native NT
command-line ping and trace routes.
It seems like the command prompt window remains "normal" until you
actually try to close it with the "X". Using the "exit" command seems
to avoid the problem. However the occurrence of this is so sporadic
that I actually can't specifically recall if it's ever happened to me
when using "exit".
The "locked up" command prompt window isn't actually fully "locked up".
I can scroll back through the buffer, the cursor continues to flash at
the appropriate spot, when you click within the "body" the title
properly switches to show "Select" (as if I were going to cut/paste
using quickedit), I can "quickedit" and cut data from the window and
paste it into another app, I can right click on the titlebar and get the
context menu. Everything EXCEPT "close" and "properties" continues to
work on said context menu.
Frankly, I thought I was a bit crazy until I found this thread!
I'd love to try testing it in Safe Mode... would anyone else like to
take my job while I sit here for the next 2 months waiting for it to
happen? :cool:
-B
I've been having this problem consistently because I have been using
the command prompt to configure my wireless. When I am running programs,
I require the internet to be very smooth, but with Vista's system, my
wireless will search for possible networks every 60 seconds which will
make my latency spike for 3 seconds EVERY minute. It is very annoying so
I have to open my command prompt in administrator mode.
I run this command: netsh wlan set autoconfig enabled=no
interface="Wireless Network Connection"
This command disables the search that it does so my internet stays
stable.
After I do this, I can not close the command prompt at all! It just
hangs. I try to hit the "X" and even go to task manager to kill it, but
nothing works. Then my computer will not shut down until I manually hold
the power button.
This is very annoying since I put my computer to sleep, and when I
reboot it, I have to run the command again, but to turn the search ON.
So every time I want my internet to work correctly, I need to open TWO
more command prompts that NEVER close. At the end of the day I have
about 8 of these windows open permanently until I manually power off my
computer.
It is very annoying but hopefully my situation can help some people
work out a solution.
I open command prompt in administrator mode since this process requires
it. Then I type the command I showed above and it will be open forever.
Thanks. I hope someone can figure something out.
Of course this is an XP forum and the cmd.exe not closing issue is
researchable. It seems many of your symptoms have been reported
before.
Are you saying that in order to prevent your OS from searching for
wireless connections every 60 seconds you open a command window and
run:
netsh wlan set autoconfig enabled=no
How do you know your system is searching every 60 seconds?
I am not running Vista, but if I had to stop and open a command window
and run some netsh command, I would not like it. I would rather
figure out where this 60 second search thing is and fix/disable it
until I wanted it to run.
My wireless XP systems do not have this "feature" that I know of
(maybe I just never noticed it). Is it a Vista thing?
When your command window does not close, is the result the same for
EXIT and clicking X?
Is cmd.exe still running in Task Manager after you try to close it?
Is there a patten where you can say if you open a windows and run a/
some commands it always hangs? Can you say it never hangs when other
commands are run?
Have you tried using command.exe for a while? I know they are not the
same, but things like ping, netsh, etc. will still run there. Then
maybe you can determine if it is only with cmd.exe or both.
I read where one person ran sfc /scannow but did not say if it fixed
the problem or not. There is no harm in running sfc /scannow if you
are prepared, so if someone suggests it later (likely), you can say
you already did it.
Download, install, update and do a full scan with these free malware
detection programs:
Malwarebytes (MBAM): http://malwarebytes.org/
SUPERAntiSpyware: (SAS): http://www.superantispyware.com/
They can be uninstalled later if desired and you can say you ran them
already too.
CMD prompt hangs (for me) only after a disconnected telnet session from
a Cisco device (telnetting a Cisco device is 99% of my cmd prompt
usage).
process is not listed in taskmanager
window can be "maximized", "minimized", resized, moved.
I can't get into the properties of the stuck cmd prompt.
I can open and close other cmd prompts without problems (but I have had
other prompts lock up if timed out from a telnet session)
I've issued a "shutdown -f" from a run box and everything starts to
shutdown, then the mouse pointer turns to an hourglass and rapidly
flashes (once per second).
My cmd prompt settings have been modified (quick edit mode, screen
buffer size, window size)
ending "explorer" process and then starting it back up in taskmanger
run box brings "explorer" back with the bad cmd window.
After the telnet session has timed out, I've hit enter a couple of
times and it will still lock up when I type exit
It has hung on a newly built XP station with all of the Microsoft
updates (first day). I originally rebuilt my station after it started
frequently happening (SP1 I believe). It has happened on SP2 and SP3.
On a side note, whenever I time out from a telnet session, I've started
telnetting into another device, exiting out, and haven't had it lock up.
So I'm convinced (for me at least) that it only occurs after a timed
out telnet session. Unfortunately, I sometimes get "X" happy and start
clicking those, so I still will get the hung session.
I'm curious if anyone with this issue also has Symantec Endpoint
Protection?
A complete stab in the dark, but I wonder if it is a common thread.
My experience is similar to that of many previous posters. I've had
this problem for years, with XP, Windows 2000, and most recently Windows
7 though I still prefer XP. I am a professional network admin, dating
from the DOS days, so I use the command prompt quite often, for telnet,
ping, traceroute, nslookup, etc. Let me also add that I have a business
associate who does similar tasks as me, and he has seen exactly the same
problem.
It is NOT a telnet problem. Although it happens frequently after a
telnet session, I've also had it happen other times - for example, after
doing a continuous ping -t, then aborting it. It happens if I use exit
to close the window, or hit the x. It is sporadic. I can't predict
when it will happen.
My gut feeling is that it is a "timing" issue. In other words, when the
command prompt is closed, certain things are supposed to happen in a
certain order, and for some reason they don't.
Here's a thought. I prefer to set up my command prompts different from
the default. I enable Quick Edit so I can cut and paste quickly when
needed. I also change the size of the screen buffer to height 1000 so I
can scroll back ****her. I wonder if others who have had this problem
use their command window in a similar way. Just trying to identify
commonalities here.
So it happens with many professional users, multiple systems, various OS
versions, clean OS install, various antiviruses, clean malwarebytes
scan... the common theme seems to be the NT-based (rather than
DOS-based) command prompt.
I know one user here said that we shouldn't jump to conclusions that it
is a Microsoft problem until we can reproduce it on demand and prove it.
In principle I agree, but - well, I can't reproduce it on demand
consistently. I've tried for years. I do not know the magic
combination of things to cause it. But - again a gut feeling, but one
based on 25 years of professional experience with PCs - I do believe
this will ultimately turn out to be a Microsoft issue. It would be nice
to hear that anyone from Microsoft is even taking this seriously. The
silence is deafening.