How to supress the output of the taskkill command?

5 visualizaciones (últimos 30 días)
Robert Jones
Robert Jones el 10 de Sept. de 2023
Comentada: Robert Jones el 11 de Sept. de 2023
Hello,
I have this line in my code
ans=system('taskkill /F /IM "CST DESIGN ENVIRONMENT_AMD64.exe"> NUL');
and I get this erroras output on the consol
ERROR: The process "CST DESIGN ENVIRONMENT_AMD64.exe" not found.
I would like to supress it so it won' interfere with other messages that are programmed to be displayed
Any ideas?
Thank you

Respuesta aceptada

kei hin
kei hin el 11 de Sept. de 2023
Try
[status,result] = system();

Más respuestas (1)

Walter Roberson
Walter Roberson el 11 de Sept. de 2023
Try
ans=system('taskkill /F /IM "CST DESIGN ENVIRONMENT_AMD64.exe" > NUL 2>&1');

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by