• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 593
  • Last Modified:

TASKLIST batch command

How can using TASKLIST and to run task if not available

0
egovernment
Asked:
egovernment
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
huh? tasklist is a just a list of running processes.. it has nothing to do with actually starting a process (running a program).. a more in-depth version with options is a product by Sysinternals called Process Monitor http://www.microsoft.com/sysinternals
0
 
Steve KnightIT ConsultancyCommented:
Do you mean if a process is not running then start it?

if so:

@echo off
tasklist | find "notepad.exe" || START "" "notepad.exe"

Will look if notepad.exe is running and if not start it

Steve
0
 
ReneGeCommented:
Here are some alternatives to dragon's command line:

ALTERNATIVE 1:
tasklist | find "notepad.exe"  || START "" "%SystemRoot%\system32\notepad.exe"

ALTERNATIVE 2 (not case sensitive because of find /i):
tasklist | find /i "Notepad.exe" || START "" "%SystemRoot%\system32\notepad.exe"
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Steve KnightIT ConsultancyCommented:
yes good point ReneGe ... Effectively the same and I would normally include /i to check case insensitively.

Steve
0
 
ReneGeCommented:
@egovernment:
If you find your solution in my post, please split points with Steve.

Cheers,
Rene
0
 
Jim-RCommented:
@ve3ofa

My reaction exactly.

"HUH?"

The request is a couple words short of a question, not to mention an actual sentence.  

I don't know how anyone could even speculate what egovernment is asking for sure, but I'm going to try.  

My thinking is that it may have something to do with checking if a specific task is running (that may not be on a list) and then running it if its not there.  This is more like something that Task Scheduler would be capable of in the programming settings of a particular task/s properties.  So perhaps TASKLIST was meant to read Task Scheduler, but in the sense of using a script or batch file to test against a list of Tasks.  (But using eleven words or less)
0
 
Steve KnightIT ConsultancyCommented:
Judging by previous questions... you have 10 open at the moment egovernment, including other ones I have offered comments against, and going back a couple of weeks.  Perhaps you could clarify / give us feedback please on what has been offered (and the other Q's).

http://www.experts-exchange.com/QH_6254058.html

From previous comments from Community support I think we are wasting our time here.

Steve
0
 
egovernmentAuthor Commented:
I will review the all answers
0
 
MikeIT ProfessionalCommented:
I've requested that this question be deleted for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
ReneGeCommented:
There was solutions provided, and no followup from poster. Since we put our time helping, I suggest closing it by splitting points.
0
 
Steve KnightIT ConsultancyCommented:
Well there were valid answers there, but deleting fine if we have to ... BUT is anything being done about my comment in http:#36900634 ?
0
 
ReneGeCommented:
I forgot to mention. If you split points, give mine to Steve, as he's on the 1M finish line..
0
 
Steve KnightIT ConsultancyCommented:
Passed it Rene now :-)
0
 
Steve KnightIT ConsultancyCommented:
Ah a quality well thought out selection of answer after all, we needn't of worried :-)
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now