Re: Looking for a script or a program to keep outlook running at all times....
- From: mr_unreliable <kindlyReplyToNewsgroup@xxxxxxxxxxx>
- Date: Thu, 20 Jul 2006 17:13:54 -0400
hi Fosco,
I'm not here to defend wmi, it is a bit awkward to use
and never seems to have the property you are looking for.
It's apparently something only a sysadmin can love.
However, you are suggesting the O.P. download and register
the autoit3 ocx, just to avoid an extra two lines of code
(that I already coded for him).
That is, using this (three lines):
for each Process in oWMI.InstancesOf("Win32_Process")
if (Process.Name = sOutlook) then Exit Sub
next
Instead of your (one line):
If ProcessExists("notepad.exe") Then
You have to admit that saving two lines of code is a
marginal gain at best.
And finally, if I really _did_ know how to use wmi,
I could have done-it-all using one line. Something
like: (sql) select-case-where-process-name-is-outlook.
cheers,jw
Fosco wrote:
"mr_unreliable".Also, "fosco" is not accurate in saying that you need autoit3
to determine if the outlook process exists. You could also
use microsoft's wmi (if you have it). If you _don't_ have it,
then you can download it from microsoft (for free).
I use win98 too .. and I HATE wmi :-)
autoit3 >> 1 line code :
If ProcessExists("notepad.exe") Then
--
Fosco
- Follow-Ups:
- References:
- Looking for a script or a program to keep outlook running at all times....
- From: unitedstatesalliance
- Re: Looking for a script or a program to keep outlook running at all times....
- From: Fosco
- Looking for a script or a program to keep outlook running at all times....
- Prev by Date: Re: cscript sometimes fails to run JScript
- Next by Date: Re: Return after AppActivate
- Previous by thread: Re: Looking for a script or a program to keep outlook running at all times....
- Next by thread: Re: Looking for a script or a program to keep outlook running at all times....
- Index(es):
Relevant Pages
|