Discussion:
Adding an Execution of a Batch File to cmd.exe
(too old to reply)
KevinSimonson
2011-03-16 23:18:42 UTC
Permalink
My operating system is Windows 7 Enterprise, and, in case you want all
my information, I sometimes accompany that OS with the string
"Intel(R) Core(TM) i7 CPU, Q 820 @ 1.73Ghz 1.73 Ghz". I found a place
on the Internet that showed me how to put <doskey> commands in a batch
file, and this website said that if I want those aliases automatically
on start-up, I need to put them in my "cmd.exe" file. But that
website didn't say anything about _how_ to put them in that "cmd.exe"
file. I found an existing "cmd.exe" file in "C:\Windows\System32" of
my laptop, but it's a binary file. How do I add a reference to my
aliases file to a binary file? And where should I put the mentioned
"cmd.exe"? Is my login directory the right place?

Any information on this would be greatly appreciated.

Kevin S
Bruce Chambers
2011-03-17 00:33:51 UTC
Permalink
Post by KevinSimonson
My operating system is Windows 7 Enterprise, and, in case you want all
my information, I sometimes accompany that OS with the string
on the Internet that showed me how to put <doskey> commands in a batch
file, and this website said that if I want those aliases automatically
on start-up, I need to put them in my "cmd.exe" file. But that
website didn't say anything about _how_ to put them in that "cmd.exe"
file. I found an existing "cmd.exe" file in "C:\Windows\System32" of
my laptop, but it's a binary file. How do I add a reference to my
aliases file to a binary file? And where should I put the mentioned
"cmd.exe"? Is my login directory the right place?
Any information on this would be greatly appreciated.
Kevin S
You either miread/misunderstood the directions, or the author really
screwed up. You can't place a batch file within CMD.EXE. What you need
to do is open a Command Prompt windows (which is what running CMD.EXE
will do) and then run the batch file from within that window.
--
Bruce Chambers

Help us help you:

http://support.microsoft.com/kb/555375
http://www.officeforlawyers.com/howask.htm
http://www.catb.org/~esr/faqs/smart-questions.html

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell
Continue reading on narkive:
Loading...