Oh for an autoexec.bat!

R

Roy

In the days when I ran Win95, I added some lines in autoexec.bat to give me
some additional DOS commands using DOSKEY. Since moving to Win2000 (for
work) and XP (home) I can't do this as there ain't no DOS. For using the
NT-style command window, I use a batch file with the extras in which I can
call up with one short command - but I have to do this every time I open a
cmd window.

Before you ask, I have read the NT manual and not found a solution in there.
XP is presumably the same.

Roy
 
L

Lanwench [MVP - Exchange]

Roy said:
In the days when I ran Win95, I added some lines in autoexec.bat to
give me some additional DOS commands using DOSKEY. Since moving to
Win2000 (for work) and XP (home) I can't do this as there ain't no
DOS. For using the NT-style command window, I use a batch file with
the extras in which I can call up with one short command - but I have
to do this every time I open a cmd window.

Before you ask, I have read the NT manual and not found a solution in
there. XP is presumably the same.

Roy

Can't you just make a shortcut to your batch file and use that instead of
launching a command prompt window using cmd? If the batch file is in a
folder included in your path statements, you could easily do this by using
start | run <filename> - or just click a shortcuut.
 
R

Roy

Thanks folks, but what I was after was a way of running said batch file
automatically so that I would not have to call it up each time I opened a
command window, which I usually do by clicking on the icon. I have had a
little playaround with your suggestions, but have not made any progress.
Some thought needed on my part, obvioiusly. Not to worry, I'll keep trying
when I get the time - meanwhile it's no great hardship to type in three
letters before doing any work in the command window.

Cheers, and thanks again,
Roy

"David Candy" <.> wrote in message
Can't you look in properties and do exactly what you want. I could.
 
M

Mike Kolitz

I believe you can tell the command prompt to automatically run a specified
program or batch file when it starts by specifying that program in the
registry at HKLM(or HKCU)\Software\Microsoft\Command Processor\AutoRun.

You should be able to create a batch file that does everything you would
want to put in autoexec.bat, and set that file to run when a CMD window is
opened.

--
Mike Kolitz MCSE 2000
MS-MVP - Windows Setup / Deployment


Roy said:
Thanks folks, but what I was after was a way of running said batch file
automatically so that I would not have to call it up each time I opened a
command window, which I usually do by clicking on the icon. I have had a
little playaround with your suggestions, but have not made any progress.
Some thought needed on my part, obvioiusly. Not to worry, I'll keep
trying when I get the time - meanwhile it's no great hardship to type in
three letters before doing any work in the command window.

Cheers, and thanks again,
Roy

"David Candy" <.> wrote in message
Can't you look in properties and do exactly what you want. I could.

--
----------------------------------------------------------
http://www.uscricket.com
"Lanwench [MVP - Exchange]"
Can't you just make a shortcut to your batch file and use that instead of
launching a command prompt window using cmd? If the batch file is in a
folder included in your path statements, you could easily do this by
using
start | run <filename> - or just click a shortcuut.
 
F

Frank Saunders, MS-MVP

Roy said:
Thanks folks, but what I was after was a way of running said batch
file automatically so that I would not have to call it up each time I
opened a command window, which I usually do by clicking on the icon.
I have had a little playaround with your suggestions, but have not
made any progress. Some thought needed on my part, obvioiusly. Not
to worry, I'll keep trying when I get the time - meanwhile it's no
great hardship to type in three letters before doing any work in the
command window.

Cheers, and thanks again,
Roy

"David Candy" <.> wrote in message
Can't you look in properties and do exactly what you want. I could.

Put a shortcut to the BAT file in your Startup folder.

--
Frank Saunders, MS-MVP, IE/OE
Please respond in Newsgroup only. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com./athome/security/protect/default.aspx
 
R

Roy

Neat. Very neat. So easy when you know how . . . but I hadn't realised
that "cmd" was so versatile.
Thanks!

Roy

"David Candy" <.> wrote in message
cmd /k batfilename.bat
 
A

Alex Nichol

Roy said:
In the days when I ran Win95, I added some lines in autoexec.bat to give me
some additional DOS commands using DOSKEY. Since moving to Win2000 (for
work) and XP (home) I can't do this as there ain't no DOS. For using the
NT-style command window, I use a batch file with the extras in which I can
call up with one short command - but I have to do this every time I open a
cmd window.

You could try adding it to your windows\system32\autoexec.nt - which
performs the functions, but only for the Emulation, not the system as a
whole.
 
F

FrankV

Add it in the autoexec.nt file, not autoexec.bat. You will probably find
that in a few folders but only one is used.
For my system it is c:\i386\autoexec.nt.

Frank
 
R

Roy

Thanks to all. I have settled for David Candy's suggestion - it's neat, and
I had no idea that "cmd" was so versatile or powerful. I've now been into
the manual to learn more. Tried the other suggestion (modifying
autoexec.nt) but it hasn't worked yet. Probably finger-trouble on my part
as the idea seems fine in theory.

Learning something new every day . . . .

Roy
 
D

David Candy

autoexec.nt only works for dos programs. cmd isn't a dos program. The black window is just a terminal window and any console application, dos or windows, can write to it. The window isn't the program.
 

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