cmd - Direct the command to a newly opened separate command prompt using bat file -


I have a command prompt shortcut that runs a bit file, when it launches. Once I started it, I will issue another order, my_command, which is added as the doskey macro in login.bat

To the extent that this is so.

I have a CMD shortcut with the target set:

  C: \ Windows \ System32 \ cmd.exe / k "D: \\ login.bat"  

/ Code>

where login.bat sets the environment.

Once the cmd prompt is active, I should issue another command, say my_command (which should be run in the currently open CMD prompt)

Inside login.bat I have the following lines

  ... doskey my_command = another_login.bat <32> <32>   < P> I was trying to write a bat file to do the whole thing.  

I have tried that which is:

  Start C: \ Windows \ System32 \ Cmd.exe / k "D: \\ login.bat" my_command   

command my_command goes to the command prompt of the bat file.

How do I my_commnad move to the new open command prompt and not in the CMD prompt of the bat file?

Try it:

  Start C: \ Windows \ System32 \ cmd.exe / k "D: \\ login.bat & Devenv"   

Answer to your edit: Bad news

You can not run a Doskey macro from a batch file.

References:

Can you run the command that you are installing with Doski?

  Start C: \ Windows \ System32 \ cmd.exe / k "D: \\ login.bat & Another_login.bat DEBUG 32"   < / Div> 

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -