5

When i open .cmd, .bat files or cmd, it shows as A blank window, with no text.

My questions :

  • What causes this problem?

  • How can I fix it?

Some screenshots to give more info about my problem :

When I try to open CMD :enter image description here

When I try to open a batch file :enter image description here

BrickMan
  • 175
  • 1
  • 2
  • 10
  • Try to copy your cmd.exe into some folder not listed in %PATH% - does it is started with the same issue? Check if cmd.exe is altered/damaged. Does some command-line utility (ping, for example) is started without any problems? Check session and global environ variables, cmd.exe properties, shortcuts, etc... Try to set "use ps in cmd window" and then revert back. – Akina Jan 17 '20 at 05:53
  • Is this a geneal fonts problem in windows or only in command prompt? – Ricardo Bohner Jan 17 '20 at 10:17
  • @Akina : All apps start correctly. cmd.exe is not damaged. Global environ variables are normal. – BrickMan Jan 17 '20 at 10:46
  • @RicardoBohner: Only cmd. – BrickMan Jan 17 '20 at 10:46
  • *Try to copy your cmd.exe into some folder not listed in %PATH% - does it is started with the same issue?* Create a shortcut to such file specifying full pathname for it and the starting folder equal to its folder. Does this shortcut is started normally? – Akina Jan 17 '20 at 10:53
  • @Akina : Creating a shortcut to `cmd.exe` doesn't work. Copying cmd to a folder not listed in %path% also doesn't work. – BrickMan Jan 17 '20 at 10:57
  • I would run *regedit* and look at all the folders and keys that have the 'cmd.exe' substring for the presence of obviously unnecessary additions to the execution line. Searching by the folder/parameter name would help to understand does the parameter value is correct. – Akina Jan 17 '20 at 11:05
  • @Akina: Nvm, found a solution. Check my solution below – BrickMan Jan 17 '20 at 11:16
  • I have seen. But this is more troubleshooting regime than normal one, some new settings will be disabled, some additional abilities will be unavailable... I'd prefer to heal the reason, not symptoms. – Akina Jan 17 '20 at 11:24
  • Yes, I know. I just need a functional cmd that can run commands, I don't need fancy settings. – BrickMan Jan 17 '20 at 11:28
  • Try changing the color of the text of the command prompt to yellow with black background with the following command: color 0e – Ricardo Bohner Jan 17 '20 at 16:33
  • @RicardoBohner: I can't type anything in the CMD prompt. – BrickMan Jan 18 '20 at 04:58
  • Are you sure? Maybe you can type but you only don't see what you type. Have tyou tried opening the command prompt with another user on you computer? If you don't have anther user you could create one> You could also use cmd.exe from powershell, in a powershell you could type cmd.exe and use powershell as if it was cmd.exe. You could also try the solution proposed here: https://superuser.com/questions/609470/how-to-reset-the-looks-of-the-command-prompt-window-in-windows – Ricardo Bohner Jan 18 '20 at 06:07
  • Yes, I use cmd in powershell now. Haven't tried changing the color. Using cmd on another user doesn't fix it. – BrickMan Jan 18 '20 at 07:15
  • Changing the color works, see my answer below. – BrickMan Jan 19 '20 at 07:19
  • This problem occurred after I shortly enabled command prompt legacy mode. After switching back, all the text was gone. – Roald Aug 22 '20 at 09:05

2 Answers2

6

Step by step solution that I used :

  1. Open regedit.exe

  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor.

  3. If the Autorun string value exists, delete it.

  4. Right Click > New > String value.

  5. Name it Autorun.

  6. Right Click > Modify

  7. Replace the Value data with color 0f & color 0f.

  8. Press OK.

You can replace color 0f with color (any color).

Some helpful articles :

Hope this helps :)

BrickMan
  • 175
  • 1
  • 2
  • 10
0

The Answer above me is good, but it is a bit complicated and for some, very few but still, it is risking messing with things they should not, so here is a simpler solution, just in case: Rightclick the toolbar > Properties > Terminal:

Right click there or really anywhere within the area

You should have properties there, my system is in german if you haven't already noticed it

Here you can then set your preferred Back- and Foreground colors

Here you may set any color combination you prefer.

Phoenix
  • 529
  • 1
  • 7
  • 24
  • Note: "Properties" (Eigenschaften) changes the settings for the currently running `cmd` instance only. To change the settings for future instances, use "Defaults" (Standardwerte) instead. (Feel free to extend your answer accordingly) – Stephan Jan 30 '21 at 14:16
  • Thank you for your comment, I just noticed it right now – Istvan Galfi Jan 30 '21 at 19:50