Re: checking processes
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Tue, 8 Jan 2008 21:11:17 +0100
"How" <How@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:681820F8-0DEE-491D-A544-18BC0194F8C9@xxxxxxxxxxxxxxxx
"Pegasus (MVP)" wrote:
===========
"How" <How@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:376E5E54-30EE-4AFC-B835-FDCBC6CDF619@xxxxxxxxxxxxxxxx
Hi Gurus,
I was thinking to write the following script....
Can any one kindly guide me a working sample that can do it using dos
programming.
1. I have a text file that contain a number of processes that i want to
check.
2.i will run tasklist > tasklist.$today_date_time.txt
3.findstr in this text file if there is any processes that I have
listed
in
my point 1.
I would like to use for loop:
for %%a in tasklist.$today_date_time.txt
if process is not running,
do i will notiify myself
Kindly help
This is really a Windows Scripting Host newsgroup but since
there don't appear to be any Microsoft-sponsored batch
file newsgroups, I'll try to answer your question anyway.
The program is written to run under Windows XP.
@echo off
tasklist > c:\Tasklist.txt
for /F %%a in (c:\MyTextfile.txt) do (
find /i "%%a" c:\TaskList.txt > nul
if ErrorLevel 1 echo Task "%%a" is not running.
)
del c:\Tasklist.txt
thanks alot... not sure if i am able to post here next time. BY the way,
is
there any recommend web site that has good script and explaination on dos
programming?
Heard that window 2008 has power shell programming... does window 2008
support vb and dos programming by default?
Since there does not appear to be an MS-sponsored batch newsgroup,
I suggest you keep on posting here.
when you type the following words into a Google search field then you'll
find
lots of batch file tutorial sites:
"batch file" tutorial
Note that DOS is an operating system sold by Microsoft some 30 years
ago. It has long since been replaced by other OSs. The black screen you're
thinking of is not "DOS" - it is the Windows Command Prompt.
I'm sure that the next few versions of Windows will continue to support
batch and VB script files.
.
- References:
- Re: checking processes
- From: Pegasus \(MVP\)
- Re: checking processes
- From: How
- Re: checking processes
- Prev by Date: passing variable to objShell.Run command
- Next by Date: Re: passing variable to objShell.Run command
- Previous by thread: Re: checking processes
- Next by thread: Modify Registry
- Index(es):
Relevant Pages
|
Loading