2
有誰知道如何抑制msg「No Instance(s)Available」。從下面的命令?提前感謝您的幫助!如何抑制wmic的輸出
wmic process where (name="java.exe") get commandline | findstr /i /c:"xxx" 1>nul 2>&1
有誰知道如何抑制msg「No Instance(s)Available」。從下面的命令?提前感謝您的幫助!如何抑制wmic的輸出
wmic process where (name="java.exe") get commandline | findstr /i /c:"xxx" 1>nul 2>&1
你有2個選擇在何處放置2>nul
,無論是
2>nul wmic process where (name="java.exe") get commandline | findstr /i /c:"xxx"
或
wmic process where (name="java.exe") get commandline 2>nul | findstr /i /c:"xxx"
你也可以管標準錯誤到標準輸出使它成爲你的FINDSTR命令可見,你可以做(因此忽略「沒有實例可用」):
wmic process where (name="java.exe") get commandline 2>&1 | findstr /i /c:"xxx"