anachrom
Код:
@echo off
setlocal
set "cnt=0"
for /f %%i in ('tasklist ^| findstr process.exe') do set /a cnt+=1
if not %cnt% equ 0 (
if not %cnt% gtr 1 (
echo Only one copy of the program
) else (
echo Some copies of the program
)
) else (
echo Process not found
)
Код:
@echo off
setlocal
set "cnt=0"
for /f %%i in ('tasklist ^| findstr process.exe') do set /a cnt+=1
if not %cnt% equ 0 (
if not %cnt% gtr 1 (
echo Only one copy of the program
) else (
echo Some copies of the program
)
) else (
echo Process not found
)