Discussion Locked

Need your help in MSDOS.(Sounds Funny).

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi!!!
I have following problem in MSDOS:
a)Can we change the default Error Messages like "File not found etc",
These error messages are listed in command.com.But when I change them directly in command.com, the output remains the same.What to do?
b)Can we change the default action of an inbuild command like dir.
Like when we enter dir , it should do something else eg echo "Arvind Bagla".I think u got my point. My friend have done this before, but he didn't told me the trick.I tried to create a batch file having the same name, but by default DOS first looks for commands and then Batch files.

c)Lastly can we change the default action of executing a exe,bat file other then double clicking it. Means they should not get executed when we double click them.

Thankz in advance.
Rajasthani
rajasthandajatt@hotmail.com
ICQ--144123569

5 replies

by Member 20071246

Question 1: a)Can we change the default Error Messages like "File not found etc",
These error messages are listed in command.com.But when I change them directly in command.com, the output remains the same.What to do?

Answer: Not without the source. Some bit of reverse engineering is essential which is not legal again. Some assembly might help.

b)Can we change the default action of an inbuild command like dir.

Answer: Use doskey

eg: doskey dir=echo Arvind Bagla

Put this in autoexec.bat to make it permanent.

c). Lastly can we change the default action of executing a exe,bat file other then double clicking it.

Answer: Since you use the word "double click" I assume you are using Windows XX. Go to Explorer, Tools=>Folder Options=>File types tab, click on the registered file type you want (exe,bat etc) and edit its properties to choose the action you want. For example, double clicking on an exe or bat could open it in notepad or something like that.
Warning: You could end up rendering your system useless, if configured incorrectly.

Thanks,
Rookie

by techmailer

I have used assembly language to alter messages in command.com. It's not as hard as you might think, but A WORD OF WARNING:

BE SURE YOUR NEW STRINGS ARE THE EXACT SAME LENGTH AS THE ONES YOU REPLACE, EVEN IF YOU HAVE TO PAD THEM WITH NULLS!!!!!
To do anything else will cripple command.com as all the relative addresses will have changed.

This discussion is closed to new replies.