0

Is it possible to use cmd /k "doskey /macrofile=C:\myMacros.cmd && macroCommand" from a bat file.

I have tried that as well as start cmd.exe /k "doskey /macrofile=C:\myMacros.cmd && macroCommand". How can I make this work?

I googled a little and found something about piping, but I don't even know what this is, and even after researching that a little, I don't see how this would help run a macro after starting cmd and loading macros.

dylnmc
  • 3,810
  • 4
  • 26
  • 42
  • Well, I kind of got around what I needed to do. I had a doskey macro that called a bat file, so I just call the bat file before I use `cmd /k...` – dylnmc Jul 30 '14 at 14:09

1 Answers1

0

assuming macros.cmd reside in %userprofile% and in the form of macro list

running :

start cmd /k "(doskey /macrofile=%userprofile%\macros.cmd)"

will get you what you wanted e.g. open a new cmd window loaded with the predefined macros