Domanda

I use this command to verify if a particular schedule task exists:

schtasks.exe | findstr /I /c:TaskName

I need to write something that DOES NOT use the PIPE "|" so I tried this:

schtasks.exe /Query /TN TaskName

but it only works for Windows 2008, not Windows 2003 machines since the /TN option is not available in 2003.

Any ideas? Thank you!

È stato utile?

Soluzione

Heh, yeah.

schtasks /query >tmpfile && findstr /i /c:"Taskname" tmpfile

doesn't use a pipe. :>

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top