Forum: EasyBoot
Topic: Edit Command.com to change COLOR of dos
started by: gold

Posted by gold on Feb. 17 2006,13:30
Try it..

Edit Command.com of Windows 98 SE Boot Disk to change COLOR of dos

< http://rapidshare.de/files/13132153/Change_Color_Of_Dos.doc.html >

If any program is executed then color changes into old white on black mode. 'cls' will bring back the changed color. If here is any expert, who can tell another tip, that is stable, it is most welcome.

:)
Posted by wanderer on Feb. 18 2006,13:08
Example,Ghost.exe is on my E: partition.

Make a batch-file called ghost and put the next tekst in there.

e:ghost
cls

When closing Ghost,you are going back to the bacht-file and cls wil be executed.
After that you are back in the promt with the colors you have command.com edit with.

Btw,how many programs would you like to start from the Dos-promt?

Greetz


Posted by gold on Feb. 21 2006,13:46
When a program is directly executed from dos prompt the problem comes, in batch file we can give 'cls'. But for eg. if we run 'fdisk' and after exiting the program the colors will be changed to default.
Posted by Tattenbach on Mar. 01 2006,08:09
Gold,

I already told you that that you can create a simple choice menu, i.e.
1) Fdisk
2) ghost
3) myProgram
4) reboot

in C. After you run every command you will include a 'cls' that will revert your colors to what you like. I think I also sent you the source code in one of my very first e-mails to you. That will solve your problem and will also save you from the user running other programs that they should not be running. In any case, if you are not the user you should do something similar.

Additionally it will teach you some C which is always helpful.

Regards,
Posted by gold on May 01 2006,14:40
Sorry, I am late to check the forum, thanks for the tip, I will test it.
Posted by gold on Mar. 12 2007,18:00
Way to edit Command.com of Windows 98 SE Boot Disk to change color of dos.

1. Download and unzip FRHED v1.0.156 (Free Hex Editor) from this path.

< http://www.rs.e-technik.tu-darmstadt.de/applets/frhed156.zip >

Or Download and install FRHED v1.1

< http://www.rs.e-technik.tu-darmstadt.de/applets/frhed-v1.1.zip >

If you are experienced you can use any other Hex editor.

2. Backup a copy of Command.com (if any error occurs you can restore it)

3. Run 'frhed.exe', File > Open 'Command.com'

4. Go to Edit > Find > Copy and paste this string:

<bh:b4><bh:06><bh:b7><bh:07>2<bh:db>

5. The '07' in <bh:07> holds the information about color. So it had to be changed to get the required result. These are the values.

Black                - 0
Blue                 - 1
Green               - 2
Cyan                - 3
Red                  - 4
Magenta           - 5
Brown               - 6
White                - 7
Grey                  - 8
Bright Blue        - 9
Bright Green      - A
Bright Cyan       - B
Bright Red         - C
Bright Magenta - D
Yellow              - E
Bright White     - F

The first number represent background (in 07, '0' is for background), the second is for foreground color (in 07, '7' is for foreground). Don't enter a number larger than 7 for the first number or your screen will blink.

You can see these values:  |b7 07 32 db| Then Click on the '0' in Hex Editor window. Go to Edit > Enter Decimal Value > Key in 14.

The values will change like this |b7 0e 32 db|

The decimal value 14 is equal to hex value 0e. ‘0’ for black background and ‘e’ for yellow foreground. Decimal to Hex conversion tables can be searched in google.

6. Then save the file. Click on File > Save. Close the Hex editor and replace ‘Command.com’ of Windows 98 SE Boot Disk with the modified one. You can check the date to ensure that you had replaced the old one. The modified date will be current date. Now boot from new disk and check whether it is working. If any error occurs, then do the steps once more.

If any program is executed then the default colors are loaded. ‘cls’ will bring back the changed colors.

Posted by Zeph1 on May 03 2008,14:21
Another method (from < http://personal-computer-tutor.com/abc2/v8/vic8.htm) > using debug:

Change the Color of Your DOS Window

1. Start by creating a new Notepad document (right click your desktop and choose New > Text Document) and copy and paste the following debug lines into it:  

n cyan.com
e 0100 B4 12 B3 10 CD 10 B8 40 00 8E D8 B8 00 06 B7 3F
e 0110 29 C9 B6 18 80 FB 10 74 04 8A 36 84 00 8A 16 4A
e 0120 00 FE CA CD 10 B4 02 8A 3E 62 00 29 D2 CD 10 C3
rcx
0030
w
q  

Make sure you copy the text exactly as is - no spaces after the end of the lines and make sure to do a carriage return after the quit command - which is the last command (q).  In other words, if the cursor is at the end of q ( q| ) press Enter to bring  it to the beginning of the next blank line.

2.  Save the file on your desktop. It will have a .txt extension.  Now, right click it and rename it CYAN.SCR   Ignore the warning about changing the file extension and click YES - you are sure.  

3. Go to the Windows DOS prompt - click Start>Programs>MS-DOS Prompt and at the Windows prompt type cd desktop
C:\WINDOWS>cd desktop  

Press Enter - the prompt should now be:   C:\WINDOWS\DESKTOP>


Now at the new desktop prompt type DEBUG<CYAN.SCR

C:\WINDOWS\Desktop>DEBUG<CYAN.SCR
and press Enter.

That's it - you just created CYAN.COM on your desktop. Exit DOS, go to your desktop and double click your new com file. It should open up as a blank cyan colored screen.  

Next, we want to use your new file to change the background color of your Windows DOS screen.  

1. Move CYAN.COM from your desktop  to your Windows folder.

An easy DOS way to move it -  Click Start>Run and type this:

move cyan.com \windows  

2. Go to your Windows folder (this time just type \windows in the Run box), right click an empty area and choose New>Text Document.  Open the new document and copy and paste the following two lines into it:  

@echo off
c:\windows\cyan.com  

Save the file and then rename it G.BAT
Again, ignore the warning about changing file extensions.   So you should now have two new files in your Windows directory:

cyan.com and g.bat.  

3.  Right click your Start button and choose Open. Double click on the Programs folder to open it.  Find the "MS-DOS Prompt" shortcut icon, right click it and go to Properties. Then click the Program Tab.

4. In the box labeled Batch File, enter:  G.BAT  and click OK.   Exit and that's it.

To test your new creation, go to the Windows DOS prompt your regular way.

Click Start>Programs>MS-DOS Prompt. Your Windows DOS screen should now be cyan colored and any text you type white.

You may also want to change the font to make it more friendly.  The color will be lost if you clear the screen by typing cls but you can easily bring it back by entering the letter G at the prompt and pressing Enter (that was the purpose of naming the bat file G.bat - to make it easy to get the color back if you clear the screen).  Note that you don't have to enter the .bat extension to execute it.  

To create other colors - repeat the above steps to create a com file but substitute 3F at the end of the first line:

e 0100 B4 12 B3 10 CD 10 B8 40 00 8E D8 B8 00 06 B7 3F

With any of these other combinations - choose one Screen color number and one Text color number.
For example, the cyan.com file you made was 3F

3 for the cyan screen
F for bright white text  

Colors (background)  

1 = blue
2 = green
3 = cyan
4 = red
5 = magenta  

Text Colors (foreground)  

1 = blue
2 = green
3 = cyan
4 = red
6 = magenta
9 = Bright Blue
A = Bright Green
B = Bright Cyan
C = Bright Red
D = Bright Magenta
E = Yellow
F = Bright White