Reputation: 379
I am trying to use tasklist.exe utility using a batch script to find weather a process is running on remote server or not
I am using following command,
tasklist /s 192.168.1.246 /u myusername /p mypassword /FI " IMAGENAME eq oracle.EXE" > temp.txt
When I try to execute the above command directly from command prompt,it executes and gives the desired output
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
oracle.exe 4988 Console 0 5,121,392 K
But when the same command is placed in a batch file, the command promt windows hangs with cursor blinking.
Please help me with this issue.
Regards
Upvotes: 3
Views: 2299
Reputation: 2282
Change the name of your batch tasklist.bat
to anothername.bat
or add .exe
in the line of code in: tasklist.exe /s 192.168...
Upvotes: 1