Running DOS and Batch Programs on XP

K

Ken Blake, MVP

Bob said:
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.


Yes but it's much better to make that shortcut to cmd.exe, not command.com.
Cmd.exe is the defaul, and preferred command processor in almost all
situations.
 
B

Bob I

Bob I wrote:





Yes but it's much better to make that shortcut to cmd.exe, not command.com.
Cmd.exe is the defaul, and preferred command processor in almost all
situations.

CMD wasn't working in this instance, hence the suggestion to try the
"command.com" route. Which got "us" to this point.
 
B

Bob I

There are methods of sending keystrokes, but I don't know how well they
play in the "command.com" window.
[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.
Thanks again,
David
 
K

Ken Blake, MVP

Bob said:
CMD wasn't working in this instance, hence the suggestion to try the
"command.com" route. Which got "us" to this point.


Then my apologies. I missed the early part of the thread.
 
D

David

I'm afraid that I'm becoming a PITA -- if you're getting tired of this, I
will understand.

Anyway, here is what I now have on the new shortcut's Programs Tab:

Cmd Line: C:\WINDOWS\system32\command.com
Working: C:\WINDOWS\system32
Batch File: C:\Webster2.bat

Unfortunately, when I click the shortcut, the window opens with:
C:\WINDOWS\SYSTEM32>
as the prompt, instead of executing the Webster2 bat file.

I *am* however able to get the program to work fine, if I navigate to the
Webster2 bat file from there; but I'm not sure that is what you had in
mind(?) Seems like it was your intent that the bat file would be executed
automatically, after command.com was loaded(?)
 
D

David

Interesting. Back in the beginning before getting everyone involved, I
somehow sort of had the feeling that cmd just wasn't staying "turned on",
and maybe that might be a cause of the problem. Could it be that we're now
reaching the intersection of what Bob's command.com is doing?

Well, you can tell for sure now that I don't know what I'm talking about...
 
J

John John

David said:
Interesting. Back in the beginning before getting everyone involved, I
somehow sort of had the feeling that cmd just wasn't staying "turned on",
and maybe that might be a cause of the problem. Could it be that we're now
reaching the intersection of what Bob's command.com is doing?

Under 32 bit operating systems (Windows NT/2000/XP) your DOS (16 bit)
programs are running in a "Virtual" environment, to be precise they are
run by the NT Virtual DOS Machine or NTVDM. Command.com is the command
interpreter for NTVDM. CMD.exe is the 32 bit command interpreter, it
runs on its own. Command.com always runs under NTVDM. You can open
Task Manager and keep it on top then open DOS programs or run the
different command processors in the RUN box or at the cmd prompt and you
will be able to observe this.

John
 
D

David

Under 32 bit operating systems (Windows NT/2000/XP) your DOS (16 bit)
programs are running in a "Virtual" environment, to be precise they are
run by the NT Virtual DOS Machine or NTVDM. Command.com is the command
interpreter for NTVDM. CMD.exe is the 32 bit command interpreter, it
runs on its own. Command.com always runs under NTVDM. You can open
Task Manager and keep it on top then open DOS programs or run the
different command processors in the RUN box or at the cmd prompt and you
will be able to observe this.
Thank you, John -- that helps.
So much to learn, so little time.
David
 
B

Bob I

I'm beginning to wonder if there isn't something that's been broken in
the "rush to close" security holes. I remember something about "PIF"
(which is what we are playing with) being used as an attack path. Let me
think this one over and play abit.
 
B

Bob I

Ok, replace the contents of "Cmd Line" with what is in the "Batch File" line

Cmd Line: C:\Webster2.bat
Working: C:\WINDOWS\system32
Batch File: (empty)

Let me know the results, as that works here.
 
D

David

Hi Bob,

Thank you so much. But I'm sorry to say that it didn't work. It *did*
bring up the wthpro.exe program window. But when I hit <Enter>, it just
disappeared. (Remember that <Enter>, followed by <ALT-F10>, are both
required to get it rolling.)

I'm feeling really sorry that you have spent so much time on this. You
have at least showed me how to make the program work, which is more than I
would have ever accomplished. So if you want to let this shortcut business
go, I fully understand.

Regards,
David
 
D

David

I assume you mean this, correct?:

Cmd Line: C:\Webster\wthpro.exe
Working: C:\WINDOWS\system32
Batch File: (empty)

I'm sorry -- still the same. (The program window appears, but when I hit
<Enter> it disappears.)

Somewhere we let command.com go. Should I have been doing something with
it?
 
B

Bob I

You created the shortcut using command.com so it is using that
"environment". This program doesn't seem to like being run like that. So
perhaps going back to opening a command prompt and then running the bat
file will have to suffice. Out of curiosity, why such an old thesaurus?
 
D

David

Bob,
Thank you so much for all your time, interest and explanation! I can live
with that access. (At least I can now access!) I am though, going to go
back and study everything in this entire thread to learn from it.
Re why -- I have always been kind of a word nut. Though I have tried to
find a more modern thesaurus, I've never found one that is as extensive as
this one. Clumsy yes, but it always comes through. However, if you have a
recommendation, I will certainly look at it...
Thanks again,
David
 

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