|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
changing DOS exit sentance?
Is there a way so that instead of the exit in the dos window saying, "Press any key to continue" It can say something like , "Thank you for using my program, have a nice day!"??
Thanks in advance. -andy
__________________
hmmm... |
|
#2
|
||||
|
||||
|
guess not.
|
|
#3
|
||||
|
||||
|
Good question, but I have no idea about the answer. Have you searched the 'net for it? It's obviously a part of the OS, since the OS displays this even when not run from a compiler, and it has to be stored somewhere, so you probably can change it by hacking into the right place... Maybe someone has figured this out. This reminds me of a hack that I heard about in which you can change the text on the 'Start' button.
__________________
Jason Doucette / Xona.com™ - Programming Windows Errata Addendum "Discussion is an exchange of knowledge; argument is an exchange of ignorance." |
|
#4
|
||||
|
||||
|
Just a shot in the dark, but maybe it's executing the pause command. If you execute the pause command, it prints the message "Press any key to continue . . .", so I'm guessing that this is what is being executed.
|
|
#5
|
|||
|
|||
|
It depends what operating system you are using.
I'm using windows 2000 In my C:\WinNt\system32\ directory there is the command interpreter which used to be command.com or at least parts of it in DOS of old ie. version 6 and less the command interpreter is named cmd.exe if you make a copy then search for the text continue in it using a hex editor you will find the text you wish to change. The only catch is that it is stored in unicode (ie. as two bytes pre character so instead of searching for "continue" you have to search for c0n0t0i0n0u0e0 where '0' is the character with a hex value of 00h so do a seach for the following hex values 63 00 6f 00 6e 00 74 00 69 00 6e and you will find a couple of cases. Change the text to what you want and see if after running your new copy of cmd.exe the message say what you want. Now all you have to do is call the newcmd.exe when you run everthing with the new pause. the easiest way is to create a shorcut with the following "C:\newcmd.exe" /c a.bat a.bat contains Code:
pause
__________________
-- ngibsonau |
|
#6
|
||||
|
||||
|
Only thing is that if I ran the *.exe file on another computer then "Press any key to continue would appear again. Oh well..i thought their might be some easy way through code to do it. Thanks alot for everyones input.
-andy |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > changing DOS exit sentance? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|