-1

I need to run this batch file remotely through PDQ deploy

here is the batch file:

@echo off
taskkill /f /im wccad.exe >nul
taskkill /f /im ACSR.exe >nul
cd C:\csg\wccad\
wccad.exe -run ACSR WIN_32
timeout 600 >nul
taskkill /f /im ACSR.exe >nul

Here is the ouput log after the job failed

ERROR: The process "wccad.exe" not found. ERROR: Input redirection is not supported, exiting the process immediately. ERROR: The process "ACSR.exe" not found.

I think i need an if statement but i can't find any solutions on google people Please help

EBGreen
  • 1,453
  • 11
  • 10

1 Answers1

0

Redirect STDERR to NUL (hide errors) e.g. as taskkill /f /im wccad.exe >nul 2>&1:

Example (taken from an open cmd window via copy&paste):

==> taskkill /f /im wccad.exe >nul
ERROR: The process "wccad.exe" not found.

==> taskkill /f /im wccad.exe >nul 2>&1

==>
JosefZ
  • 1,564
  • 1
  • 10
  • 18