Hello.
I'm using Windows XP Service Pack 3 and have Command Extensions enabled by default in the Windows Registry. Somehow, the following command does not work on this version of Windows but if I run it in Windows Server 2003 or Windows Vista Business, it works just fine. Any clue?
The problem is that on Windows XP, it seems like the /f option is not working at all and the do part of the command never gets executed.
This is the command:
for /f "tokens=1 delims=: " %A in ('tasklist /FI "IMAGENAME eq python.exe" /NH') do (
If "%A" == "python.exe" (
echo "It's running"
) Else (
echo "It's not running"
)
)
Thanks in advance.