# CMD Flashing



## CCM (Jul 25, 2017)

Each 2 minutes there is always a command prompt flashing on my screen. I don't know how it did that because I didn't download anything and then it just pop up. I looked it up on YouTube and it says that I need to download Rkill, but using Rkill did not help me at all, the cmd is still flashing on my screen. I looked it up on Google as well but, it also did not work. I tried deleting my recent downloads and it still flashes on my screen. I stopped someoff an unimportant stuff on task manager and it didn't work. If someone who also had this problem and solved it please let me know, and if someone knows how to help me please let me know.


----------



## Lanctus (Jul 20, 2017)

Hello CCM. Before this issue began, did you make any changes to your computer, or install any third party software?


----------



## lunarlander (Sep 22, 2007)

Go download MS Sysinternals Process Monitor. It will show a running history of all programs that started.


----------



## CCM (Jul 25, 2017)

Lanctus said:


> Hello CCM. Before this issue began, did you make any changes to your computer, or install any third party software?


I think I have changed something when windows had just been updated, it said that I need to "review settings" and I turned on one of its setting I forgot which one, but I did install cheat engine (but I have deleted it) , and before that I install photoshop and other adobe apps.


----------



## CCM (Jul 25, 2017)

lunarlander said:


> Go download MS Sysinternals Process Monitor. It will show a running history of all programs that started.


I download it and saw all of the programs that started, and everytime the cmd is flashing, I looked at the recent programs that started and saw "conhost.exe" has started.


----------



## lunarlander (Sep 22, 2007)

Are any of those programs you install pirated ?


----------



## Lanctus (Jul 20, 2017)

"conhost.exe" is Console Window Host, it is something akin to a shell maintaining the power of running a systems-level service, which in this case would be Command Prompt. That running is normal, and even seeing several instances running at once (one for each various systems-level service). I would not be worried about that. Given your answers that lead up to before the problem, it is possible you have corrupted system files somewhere. I would run a systems maintenance troubleshoot first. To get there, press the Windows key on your keyboard, type in Troubleshooting in search, click on it when it pops up, look for and click on Systems and Security, then Systems Maintenance, and then click next a few times until the troubleshooter starts running. That typically takes care of more common issues. Try this, and let us know if it fixes it.


----------



## jenae (Mar 17, 2013)

Hi, copied from another forum:-
Hi Chief, the hard part is the cmd prompt flashes by and you cannot see what is calling it. You can force the cmd prompt to stay open, diagnose your problem then return it to defaults. Copy the text below separately into notepad's save them as CmdOpen.reg and CmdClose.reg, (default) save to desktop double click and agree to add to registry, restart computer.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="cmd.exe /k \"%1\" %*"

[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="cmd.exe /k \"%1\" %*"

Save as CmdOpen.reg

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="\"%1\" %*"

Save as CmdClose.reg (this is the default).


----------



## CCM (Jul 25, 2017)

Lanctus said:


> "conhost.exe" is Console Window Host, it is something akin to a shell maintaining the power of running a systems-level service, which in this case would be Command Prompt. That running is normal, and even seeing several instances running at once (one for each various systems-level service). I would not be worried about that. Given your answers that lead up to before the problem, it is possible you have corrupted system files somewhere. I would run a systems maintenance troubleshoot first. To get there, press the Windows key on your keyboard, type in Troubleshooting in search, click on it when it pops up, look for and click on Systems and Security, then Systems Maintenance, and then click next a few times until the troubleshooter starts running. That typically takes care of more common issues. Try this, and let us know if it fixes it.


I've just tried this and it still doesn't work. It just said that I don't need any changes or any update to my system.


Lanctus said:


> "conhost.exe" is Console Window Host, it is something akin to a shell maintaining the power of running a systems-level service, which in this case would be Command Prompt. That running is normal, and even seeing several instances running at once (one for each various systems-level service). I would not be worried about that. Given your answers that lead up to before the problem, it is possible you have corrupted system files somewhere. I would run a systems maintenance troubleshoot first. To get there, press the Windows key on your keyboard, type in Troubleshooting in search, click on it when it pops up, look for and click on Systems and Security, then Systems Maintenance, and then click next a few times until the troubleshooter starts running. That typically takes care of more common issues. Try this, and let us know if it fixes it.


I've just tried it and it says that I don't need any changes or updates to my system. I did troubleshoot the windows update and it fixes some problem but not the CMD part.


----------



## CCM (Jul 25, 2017)

jenae said:


> Hi, copied from another forum:-
> Hi Chief, the hard part is the cmd prompt flashes by and you cannot see what is calling it. You can force the cmd prompt to stay open, diagnose your problem then return it to defaults. Copy the text below separately into notepad's save them as CmdOpen.reg and CmdClose.reg, (default) save to desktop double click and agree to add to registry, restart computer.
> 
> Windows Registry Editor Version 5.00
> ...


I've just tried this as well. I tried double clicking it and when I tried add it to registry but it said that I cannot import it because it is not a registry file (but I already saved it as .reg and for all types).


----------



## jenae (Mar 17, 2013)

Hi, they are binary files, what you copied did include the header, looks like this:-

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="cmd.exe /k \"%1\" %*"

[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="cmd.exe /k \"%1\" %*"


----------



## Lanctus (Jul 20, 2017)

I would suggest you to run the System File Checker and check if it helps.

1. Click on search bar next to Start Menu.

2. Type "*CMD*" without the quotes.

3. Right click on it and select* Run as Administrator*.

4. Type "*sfc /scannow*" and hit on *Enter Key.*


----------



## CCM (Jul 25, 2017)

jenae said:


> Hi, they are binary files, what you copied did include the header, looks like this:-
> 
> Windows Registry Editor Version 5.00
> 
> ...


Oh sorry about that, I'm an idiot I didn't put the header on the notepad. But it still did not fix the issue though.


----------



## CCM (Jul 25, 2017)

Lanctus said:


> I would suggest you to run the System File Checker and check if it helps.
> 
> 1. Click on search bar next to Start Menu.
> 
> ...


I've run the System File Checker and it says "Windows Resource Protection did not find any integrity violations." I still don't know what is causing my CMD to flash.


----------



## lunarlander (Sep 22, 2007)

Hi,

The registry file that you imported into the registry is not meant to solve anything. It makes the command windows stay open after running so you can see what command executed. Were you able to see it ?


----------



## CCM (Jul 25, 2017)

lunarlander said:


> Hi,
> 
> The registry file that you imported into the registry is not meant to solve anything. It makes the command windows stay open after running so you can see what command executed. Were you able to see it ?


I was wondering about that, I wasn't able to see any command because it didn't stay open. I already restarted my laptop after I registered the first registry file and the command windows didn't stay open after running.


----------



## jenae (Mar 17, 2013)

Hi, looks like a win 32 process in 10 these close by design and the cmd does not work, now this is happening on a regular basis so it should mean it is a scheduled task, you have to do a bit of work.

Go to search and type:- command prompt, right click on the returned command prompt and select "run as administrator" an elevated cmd prompt will open, at the prompt copy and paste this text:-

schtasks /query /FO TABLE /v > 0 & notepad 0 (press enter) be patient it takes awhile to compile.

Notepad will open (if it is difficult to read go to "view" and turn off "wordwrap") Now all running and scheduled tasks will show, note the date and time of your errant prompt window, the log shows this.. match them if you can, it should help us find the culprit.

You can attach the notepad output here for us to query as well, if you like.


----------



## CCM (Jul 25, 2017)

jenae said:


> Hi, looks like a win 32 process in 10 these close by design and the cmd does not work, now this is happening on a regular basis so it should mean it is a scheduled task, you have to do a bit of work.
> 
> Go to search and type:- command prompt, right click on the returned command prompt and select "run as administrator" an elevated cmd prompt will open, at the prompt copy and paste this text:-
> 
> ...


I am trying to match the date and time of the errant prompt window but there is not any time that matched the time of the cmd flashing. For example, the time that the cmd flashed is at 9:35 then I opened up the notepad output but it doesn't show me any output at 9:35. I wanted to put the notepad output here but, there is a lot of output.


----------



## jenae (Mar 17, 2013)

Hi, there is an known issue with MS office causing this (although more likely on an hourly basis) do you have MS office?


----------



## CCM (Jul 25, 2017)

jenae said:


> Hi, there is an known issue with MS office causing this (although more likely on an hourly basis) do you have MS office?


Yes, I do have MS Office. What is the issue?


----------



## jenae (Mar 17, 2013)

Hi, have a look through this:-

http://www.winhelponline.com/blog/find-unknown-program-open-and-close-immediately/


----------



## CCM (Jul 25, 2017)

jenae said:


> Hi, have a look through this:-
> 
> http://www.winhelponline.com/blog/find-unknown-program-open-and-close-immediately/


Hi, I've tried the first one it didn't work, because when I opened up the task scheduler, it doesn't have the "Microsoft/Office" branch. The second one ("Driver Setup Utility?") the command prompt is blank, there is nothing in the command prompt. Then I tried to match up again the last run time from excel and notepad, but the only thing that matched up with the CMD flashing was only WfiTask and it is only matched up once.


----------

