How to make macros be there when I call the command prompt

J

Jack Crane

With Win 98 I used to have a bunch of handy, simple DOS macros, such as
"py" for pinging www.yahoo.com. I think I can recreate them in Win XP, but
how do I make them be there available for use when I call the command
prompt? With Win XP I put them in autoexec.bat.

Thanks,

Jack
 
R

R. C. White

Hi, Jack.

As I'm sure you know, WinXP is built on the NT platform, which deals with
hardware much differently from MS-DOS and Windows versions built on that
platform. However, WinXP does include a DOS emulator, which lets us use
most DOS commands and programs. In many ways, this "DOS" is "a better DOS
than DOS". ;<)

Some DOS macros will work in a "DOS" window; others won't. The ones less
likely to work are those that deal with hardware directly, rather than
through DOS commands. Games, especially, were often programmed to bypass
DOS to gain more speed.

My suggestion is to simply copy your DOS batch files onto your current HD.
Then open a "DOS" window (the Command prompt window) and try them. My guess
is that all or most of them will work. (I often use Ping; it works fine.)

WinXP does not use Config.sys and Autoexec.bat, as you know. However, it
does have available Config.nt and Autoexec.nt, which handle those functions
for DOS programs that require them. My old DOS programs don't need them, so
I have no experience with them, but others here do.

Try your DOS macros in a "DOS" window. Post back with specific questions
about ones that don't work.

RC
 
J

Jack Crane

OK, I entered "doskey py=ping yahoo.com" (no quotes) in a DOS window,
then typed "py". It worked. Same for "doskey ty=tracert yahoo.com". But
they don't stick: they don't work if I close the DOS window and open it
again. I also added them at the bottom of C:\windows\system\autoexec.nt
and rebooted. Don't work. What I get is "'py' is not recognized as an
internal or external command, operable program or batch file."

Jack
 
C

Carrie Garth

| message | Sent: Monday, May 10, 2004 11:15 PM
| With Win 98 I used to have a bunch of handy, simple DOS macros, such
| as "py" for pinging www.yahoo.com. I think I can recreate them in
| Win XP, but how do I make them be there available for use when I
| call the command prompt? <SNIP>

| message | Sent: Wednesday, May 12, 2004 5:03 AM
| OK, I entered "doskey py=ping yahoo.com" (no quotes) in a DOS
| window, then typed "py". It worked. Same for "doskey ty=tracert
| yahoo.com". But they don't stick: they don't work if I close the DOS
| window and open it again. <SNIP> What I get is "'py' is not
| recognized as an internal or external command, operable program or
| batch file."

In you next command session try typing the following command before
recalling your "py" macro:

doskey /macrofile=py

And if that does not help I suggest that you post in the following
Microsoft Newsgroup:

microsoft.public.win2000.cmdprompt.admin

If you read the newsgroups using the Microsoft Communities Web Page:
http://communities2.microsoft.com/c...blic.microsoft.public.win2000.cmdprompt.admin

If you read newsgroups using a NNTP newsreader, such as Outlook
Express, and use the msnews.microsoft.com news server:
news://msnews.microsoft.com/microsoft.public.microsoft.public.win2000.cmdprompt.admin
 
C

Carrie Garth

To add to my previous newsgroup post:

For more information search the Help and Support Center for the phrase
"Creating a macro"
 

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