I have tried to create a batch script, but using the tasklist, it gives me processes for all users, this won't work.
I need to run a per user script on a terminal server, here is what I need:
I need a batch file that will check to see if a process if running for that user. If exists, then exit. If it doesn't exists, then start....
Here is what I have thus far:
if tasklist /FI "IMAGENAME eq CPOPM06.exe" | find /i "CPOPM06.exe" && set PROCEXIST=YES
if /I "%PROCEXIST%"=="YES" goto :EXEC
if /I "%PROCEXIST%"=="NO" goto EXIT