C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 16th, 2003, 09:08 PM
andy3109's Avatar
andy3109 andy3109 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 421 andy3109 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 46 m 21 sec
Reputation Power: 6
Send a message via AIM to andy3109
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...

Reply With Quote
  #2  
Old May 18th, 2003, 05:59 PM
andy3109's Avatar
andy3109 andy3109 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 421 andy3109 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 46 m 21 sec
Reputation Power: 6
Send a message via AIM to andy3109
guess not.

Reply With Quote
  #3  
Old May 18th, 2003, 07:25 PM
Jason Doucette's Avatar
Jason Doucette Jason Doucette is offline
jasondoucette.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada
Posts: 378 Jason Doucette User rank is Private First Class (20 - 50 Reputation Level)Jason Doucette User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 h 23 m 8 sec
Reputation Power: 6
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.

Reply With Quote
  #4  
Old May 18th, 2003, 08:47 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,589 Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 40 m 58 sec
Reputation Power: 1001
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.

Reply With Quote
  #5  
Old May 19th, 2003, 04:08 AM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
  #6  
Old May 19th, 2003, 11:49 AM
andy3109's Avatar
andy3109 andy3109 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 421 andy3109 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 46 m 21 sec
Reputation Power: 6
Send a message via AIM to andy3109
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > changing DOS exit sentance?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT