I want to start or stop two services in this order: service1 then service2.
Here is my bat file(test.bat):
SET _cmd=net %1 service1 && net %1 service2
cmd /C %_cmd%
If run this bat like this: test.bat start or test.bat stop, the output looks as below:
starting/stopping service2
starting/stopping service1
However, what I want is service1 then service2. Could anybody show me how to do that?
If just run below command in a command prompt window, commands will run in right order:
cmd /c net stop service1 & net stop service2
Anybody know the differences? Thanks in advance!