General Question

Perchik's avatar

Command prompt default colors in a script?

Asked by Perchik (5002points) September 18th, 2007

My computer science professor is having a problem that she charged us to find an answer to. She has many c++ programs to show us in class, which open in a command type window. If you change the default it stays for the duration of class, but the next day (after the computer has been rebooted) the colors revert back to the black and grey. We’ve decided that this is unavoidable, the way our network deals with defaults. After deciding we couldn’t change the default, she wanted us to look around online to see if we could write some kind of executable script to change the color and font in one click, instead of having to go through properties. Any suggestions?

Observing members: 0 Composing members: 0

4 Answers

andrew's avatar

Is she opening them in the standard windows command shell? Or some other terminal?

Perchik's avatar

Well she has them as .exes that she’s opening. They open in the command shell by default. We already figured out that if you change the main command shell (cmd.exe) colors and save that, it will keep that change for that day for every program she runs. But our network flushes any kind of changes made to defaults on logout. Therefore we can’t save those changes over logouts…hence the reason she wants a script or exe that she can just click and run to set the colors.

andrew's avatar

According to this you can use the COLOR command. If she hasa registry access she might be able to change it by following this article.

andrew's avatar

More specifically, she can hack her registry by altering:

;Default Command Prompt Color
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
“DefaultColor”=dword:0000000a

from http://www.msfn.org/board/lofiversion/index.php/t23165.html

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther