I plan to run the bat file with different keys:

start stop pause resume install uninstall 

The question is that I do not fully understand how I process these keys "inside" the batch file itself. Can you explain?

    1 answer 1

    Save as test.bat or test.cmd (name can be any). Run with different parameters to a complete understanding.

     @echo off rem %0 - имя файла как при запуске rem %1..%9 - параметры rem shift - сдвинуть параметры на один rem при этом первый потеряется, но зато станет доступен десятый. echo BAT-file name, was started as: %0 if .%1.==.. ( echo No parameters ) else ( echo First parameter is: %1 ) :repeat shift if .%1.==.. ( goto done ) else ( echo Next parameter is: %1 goto repeat ) :done echo That's all...