From: cate on
I need a script that will run abc.exe and insure that it returns
within a limited time. If it doesn't I need to kill it and send mail.
I can send mail and killing a process should be easy (never done it in
windows), but how do you start and monitor in jscript/vbscript?

I would like just an outline of how to do this please (an example
would be great). I'm sure there are many examples out there, but I'm
not asking the right questions.

In perl I'd fork, but I have NO clue how to do this in windows.

Thank you.
From: ekkehard.horner on
cate schrieb:
> I need a script that will run abc.exe and insure that it returns
> within a limited time. If it doesn't I need to kill it and send mail.
> I can send mail and killing a process should be easy (never done it in
> windows), but how do you start and monitor in jscript/vbscript?
>
> I would like just an outline of how to do this please (an example
> would be great). I'm sure there are many examples out there, but I'm
> not asking the right questions.
>
> In perl I'd fork, but I have NO clue how to do this in windows.
>
> Thank you.

use the VBScript Docs to read about the WScript.Shell.Excec method.

From: Pegasus [MVP] on


"cate" <catebekensail(a)yahoo.com> wrote in message
news:850128b8-cfc6-4698-84ee-320c57597db2(a)d8g2000yqf.googlegroups.com...
> I need a script that will run abc.exe and insure that it returns
> within a limited time. If it doesn't I need to kill it and send mail.
> I can send mail and killing a process should be easy (never done it in
> windows), but how do you start and monitor in jscript/vbscript?
>
> I would like just an outline of how to do this please (an example
> would be great). I'm sure there are many examples out there, but I'm
> not asking the right questions.
>
> In perl I'd fork, but I have NO clue how to do this in windows.
>
> Thank you.

Here you go:

"How Can I Monitor the Activity Level of a Process?"
http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/22/how-can-i-monitor-the-activity-level-of-a-process.aspx

From: ekkehard.horner on
ekkehard.horner schrieb:
> cate schrieb:
>> I need a script that will run abc.exe and insure that it returns
>> within a limited time. If it doesn't I need to kill it and send mail.
>> I can send mail and killing a process should be easy (never done it in
>> windows), but how do you start and monitor in jscript/vbscript?
>>
>> I would like just an outline of how to do this please (an example
>> would be great). I'm sure there are many examples out there, but I'm
>> not asking the right questions.
>>
>> In perl I'd fork, but I have NO clue how to do this in windows.
>>
>> Thank you.
>
> use the VBScript Docs to read about the WScript.Shell.Excec method.

Exec

sorry, bad keyboarder
From: cate on
On Aug 6, 11:28 am, "Pegasus [MVP]" <n...(a)microsoft.com> wrote:
> "cate" <catebekens...(a)yahoo.com> wrote in message
>
> news:850128b8-cfc6-4698-84ee-320c57597db2(a)d8g2000yqf.googlegroups.com...
>
> > I need a script that will run abc.exe and insure that it returns
> > within a limited time.  If it doesn't I need to kill it and send mail..
> > I can send mail and killing a process should be easy (never done it in
> > windows), but how do you start and monitor in jscript/vbscript?
>
> > I would like just an outline of how to do this please (an example
> > would be great).  I'm sure there are many examples out there, but I'm
> > not asking the right questions.
>
> > In perl I'd fork, but I have NO clue how to do this in windows.
>
> > Thank you.
>
> Here you go:
>
> "How Can I Monitor the Activity Level of a Process?"http://blogs.technet.com/b/heyscriptingguy/archive/2005/09/22/how-can...

thanks all