Re: checking processes




"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.


.



Relevant Pages

  • Re: assembly language and reverse engineering
    ... in Windows assembly programming what you can't learn when doing ... Windows API but about assembly programming). ... And you have far less to learn to get your first working DOS program than ... but, real mode is real mode, and pmode is pmode. ...
    (alt.lang.asm)
  • Re: Confusing stack effects
    ... And DOS ... is the best way to start assembly programming. ... To learn todo 16-bit dos programming, for programming in windows later is the worst kind of advice. ... Learning to program for a Click&Go GUI is a tedious incredible complex job, compared to doing a dos app, where all you need to do is set up a loop, to take input that in all cases _you_ made the rules for. ...
    (alt.lang.asm)
  • Re: PDP-11 OS Release Dates
    ... >> DOS and Windows. ... They bought QDOS from a little ... > anything to do with programming Microsoft products after the BASIC for ...
    (comp.os.vms)
  • Re: PDP-11 OS Release Dates
    ... >> DOS and Windows. ... >anything to do with programming Microsoft products after the BASIC for ...
    (comp.os.vms)
  • Missing Old DOS command HELP!
    ... sort of menu driven batch file. ... I am using WINDOWS XP and would love to create a small ... old "CHOICE" command form DOS 6? ...
    (microsoft.public.windowsxp.general)

Loading