Running DOS and Batch Programs on XP

D

David

I have a favorite old DOS program that I have been dragging along since DOS
2.0. It worked fine up through Win 95, O.K. on Win 98, and now laboriously
on XP. It never has worked on XP with only a shortcut to the *.exe file.
However, I have been able to make it work by starting with the command
prompt, and then navigating down through the file structure to that *.exe
file.

Yesterday I tried to simplify matters by creating a simple batch program
that would do all that navigation and then start up the program. No joy.
I have put everything in the *.bat file, exactly the same as I was doing
before, manually, but the DOS program doesn't execute. I have put "pause"
statements in the *.bat's sequence so that I can follow its progress. But
it just blips through the DOS program without even stopping, and then
exits.

Has anyone any ideas about what might be happening here -- and how I might
go about fixing it?

Thank you most kindly for any thoughts,
David
 
D

David

It's pretty hard to see what is in your batch file from here...

John
Sorry, I didn't include it because I thought that there might possibly be
some generic issue with what I am doing that I wasn't aware of.

Anyway, it is embarrassingly simple, but I wanted to keep it as clean as
possible until I got something to work. Here it is:

REM For calling Webster Thesaurus directly from the command line
echo Begin Webster.bat
cd\
pause
cd\Webster
pause
wthpro.exe
pause
cd\
pause

Actually I was wrong earlier when I said that it blipped right through the
application without stopping. (Sorry, I've made so many variations of this
*.bat file that I got mixed up.)

Anyway, it actually does make it into wthpro.exe. But, when run manually,
it then expects an <ALT-F10> key entry to get started. When run via batch
however, it won't accept this <ALT-F10> entered manually.

Perhaps the question that I should have originally asked is, "is there any
way to enter <ALT-F10> as part of the *.bat stream??" But somehow, it
feels like something else must be wrong.

BTW, please don't jump on me because the program is installed on the C:\
directory. I don't like it either, but the program is so primitive that
that is where it wants to be.

Thanks again,
David
 
B

Bob I

Here is a possible solution.

R-click Desktop
New, Shortcut
Browse to C:\Webster\wthpro.exe
select and next
name it Webester or such
Finish
Now r-click the Shortcut, Propertis, Compatibility, and then set it to
run in Windows95 mode.
 
D

Dick Miller

There are entries to be put in "autoexec.nt" and possibly "config.nt"
and I can't, for the life of me, remember what they were. Maybe someone
can remember.
I had dos programs running on RC1 & RC2 of XP.
My Bat file my genealogy program was:
c:\
mode con: lines=25
cd\paf\ddata
c:\paf\paf.exe
 
D

David

Thanks, Bob,
I tried it, but afraid no luck. It (the DOS program) still behaves the
same way.

(Once it gets inside wthpro, it accepts the manual "Enter" that it is
expecting, but it will not accept the manual <ALT-F10> that it wants...)
 
J

John John

David said:
Sorry, I didn't include it because I thought that there might possibly be
some generic issue with what I am doing that I wasn't aware of.

Anyway, it is embarrassingly simple, but I wanted to keep it as clean as
possible until I got something to work. Here it is:

REM For calling Webster Thesaurus directly from the command line
echo Begin Webster.bat
cd\
pause
cd\Webster
pause
wthpro.exe
pause
cd\
pause

Actually I was wrong earlier when I said that it blipped right through the
application without stopping. (Sorry, I've made so many variations of this
*.bat file that I got mixed up.)

Anyway, it actually does make it into wthpro.exe. But, when run manually,
it then expects an <ALT-F10> key entry to get started. When run via batch
however, it won't accept this <ALT-F10> entered manually.

Perhaps the question that I should have originally asked is, "is there any
way to enter <ALT-F10> as part of the *.bat stream??" But somehow, it
feels like something else must be wrong.

BTW, please don't jump on me because the program is installed on the C:\
directory. I don't like it either, but the program is so primitive that
that is where it wants to be.

You say it "only" runs from the Command Prompt yet I see no cmd
statement in the batch file?

How about:

@ECHO OFF
cmd /k "C:\Path to Program\Program.exe"

On second thought, probaly a silly suggestion... Try the suggestion
offered by Bob I, it seems like the best thing to try. If the program
is really too old for XP's liking you could try the often suggested
DOSBox to run it.

John
 
D

David

Thanks, Dick,
You're probably into the kinds of things that are going on here, but afraid
that you are way over my head -- I'm not familiar with any of these terms
except autoexec and config... Sorry.
 
B

Bob I

Ok, new attempt.

create bat file Webster.bat using 3 lines below and save in root.
------------------
CD \webster
wthpro.exe
CD \
-----------------
In the run box, enter COMMAND.COM

then at the command line run Webster


And see if Alt-F10 works then.
 
D

David

John: Replies inserted below:

You say it "only" runs from the Command Prompt yet I see no cmd
statement in the batch file?
1) What I meant was that it only runs from the Command Prompt, but only
when I run it manually.
2) Actually, I did try inserting it in the batch file earlier. This is
what I inserted:

cd\
cd C:\Windows\system32
cmd.exe
cd\

However, this seems to put it into some kind of "recursive loop". (I don't
know how else to describe it, but anyway it still wouldn't accept the
How about:

@ECHO OFF
cmd /k "C:\Path to Program\Program.exe"
1) Could you please explain these a bit?
2) I think you mean: cmd/k "C:\Webster\wthpro.exe"; correct? Do I leave
the quotes on?
On second thought, probaly a silly suggestion...
Not silly -- I'll try anything!
Try the suggestion
offered by Bob I, it seems like the best thing to try.
You have probably seen my reply to Bob by now...
If the program
is really too old for XP's liking you could try the often suggested
DOSBox to run it.
If no further suggestions from anyone, I'll look this up.

Thanks much, again,
David
 
J

John John

David said:
1) What I meant was that it only runs from the Command Prompt, but only
when I run it manually.
2) Actually, I did try inserting it in the batch file earlier. This is
what I inserted:

cd\
cd C:\Windows\system32
cmd.exe
cd\

However, this seems to put it into some kind of "recursive loop". (I don't
know how else to describe it, but anyway it still wouldn't accept the


1) Could you please explain these a bit?
2) I think you mean: cmd/k "C:\Webster\wthpro.exe"; correct? Do I leave
the quotes on?

@ECHO OFF
cmd /k "C:\Webster\wthpro.exe"

Yes that is what I meant and you only need the quotes if there are
spaces in the path. It doesn't hurt or change anything to leave them
there. Don't forget the space between cmd and /k

I see Bob has come up with another idea...

John
 
D

David

Whoopie!!! You guys never cease to amaze me!

(Oh, it worked! <g>)

1) Could you please explain for me *why* it worked, and what this did that
the other approaches did not do?

2) Is it possible for me to now automate all of this under one shortcut,
(which is what I was trying to do in the first place?) (e.g., can I put
"command.com" into the batch file?)

3) Thank you so much!

David
 
B

Bob I

How about a desktop shortcut to command.com and then put your bat file
in the "batchfile" box? You will find it on the program tab.
 
B

Bob I

Oh and as for "1)", I think it's related to differences between
command.com as opposed to cmd.exe. And as for "3)", you're welcome!
 
D

David

John,
As you may have seen, Bob came up with a solution. But I am still curious
anyway about what you were trying to do. Can you please tell me what cmd
/k does? (I have searched, but I can't find any references.)
Thank you,
David
 
D

David

Thank you, Bob. I will try that, but I am unable to find the batchfile
box. Is it somewhere under Start => All Programs?
 
B

Bob I

Please open Windows "Help and Support" plug in "cmd" as the lookup. then
pick CMD in the links offered.
 
B

Bob I

Do this,
r-click desktop
New, Shortcut,
Browse to
C:\Windows\System32 and select "command.com"
Ok

There will be a new shortcut called MS-DOS prompt on your desktop.
R-click that, pick Properties, then the Program tab.
 
J

John John

It just keeps the cmd session open. At the Command Prompt do cmd /? for
more information.

John
 
D

David

[snip all]

I am still wondering, in general, if everything was running nicely; is it
possible for a batch program to "feed" keystrokes to the subject
application?

(Using the present discussion as a specific example, is there a way that
the batch program could feed <Return> and <ALT-F10> to wthpro.exe when it
expects them?) If so, how might I do that? I don't have much hope for
success, but I thought it might be an interesting experiment to see what
would happen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top