Command prompt opens and closes immediately

ChrisDunce

Reputable
Mar 10, 2015
1
0
4,510
Hi Everyone

I've been experiencing this little issue where my command prompt will flash for a millisecond on startup. It happens so fast that it's really hard to see if there is code in the command prompt window. Initially, I thought that it was specific to just my computer's startup, but I've realised that this will occur when my computer connects to the internet.

For example, if my computer disconnects and reconnects to the internet, the cmd window will flash. Likewise, when I manually pull out the ethernet cable from my computer and insert it back in, the cmd window will flash. My computer hasn't been slower or sluggish but it's still sort of annoying that this happens.

I've looked at my startup items on msconfig and found nothing suspicious. I've also scanned my computer with Malwarebytes, Microsoft security essentials and CCleaner.

I appreciate the help, everyone!

Cheers
 


Hey plaintuts

I'm having the same issues as Chris. Cmd prompt runs on startup for a split second and vanishes. All started happening when I changed security permissions / administrator privileges on my C drive. I changed them when I upgraded to Windows 10 because programs / apps were failing to launch for unknown reasons (presumably buggy windows 10). This is when it started happening.

I have gone back to Windows 7, but the cmd prompt window is still opening on startup for a split second and closing immediately after. As per your request for Chris, I have attached an image URL: http://imgur.com/8xltoaQ

Hope you or someone can help me undo what I shouldn't have changed!

Thanks,

Jeremy.
 


Greetings, orionautics!

I will admit I am a beginner / novice when it comes to these things. I did exactly what you asked (Windows key + R to bring about the run dialog box, open cmd prompt, typed 'cmd /k and hit enter') After doing that I noticed the cmd prompt window changed its name - cmd.exe /k. Was the '/k' to keep the cmd prompt window open so I can view it upon start up? I reset my PC twice but the same thing happened - cmd prompt automatically popped up, vanished almost instantly and the window didn't stay open.

Apologies if I am causing any frustration! Just want to try and sort this out

Thanks man,

Jeremy.
 




The /k temporarily keep the cmd windows open. Try to configure cmd under the Local Computer Policy
Start > RUN > then type, "gpedit.msc" and press OK
Now go to User Configuration > Administrative Templates > System
under the system look for the option "Prevent access to the command prompt" you must set it to 'Not Configured'.

or the other way, edit your registry
Start > RUN > then type, "regedit" and press OK
navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System!DisableCMD
If you see the value 'DisableCMD' in this location just simply delete it.
 
 
Try this:
Open regedit > HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\
if theres AUTORUN key with "EXIT" inside, remove it and run cmd once again.

If the problem still persist, go to [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]
if you find "codepage" after that line, remove it. then try to run cmd again.

this will work this time.