S
S
shell_guy2021-09-22 18:21:28
cmd/bat
shell_guy, 2021-09-22 18:21:28

How to run cmd inside bat to execute commands?

%comspec% /k "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\DandISetEnv.bat"

copype amd64 c:\winpe_x64 & cd "..\..\Assessment and Deployment Kit\Windows Preinstallation Environment" #I need to run the commands one by one in the Deployment and Imaging Tools Environment console,
how can I do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2021-09-22
@res2001

The batch file is already executed inside cmd. Usually, you do not need to run additional cmd.
Just write the necessary commands in the batch file and run in cmd or explorer (then cmd will start automatically and execute the batch file).

G
gimntut, 2021-09-23
@gimntut

If you need to call a batch file from a batch file, you need to use the call command:
call batnik.bat

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question