#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12

    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. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    guess not.
    hmmm...
  4. #3
  5. jasondoucette.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Canada
    Posts
    378
    Rep Power
    12
    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.
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,625
    Rep Power
    4247
    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.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    138
    Rep Power
    12
    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
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    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
    hmmm...

IMN logo majestic logo threadwatch logo seochat tools logo