Scheduled Event ?

A

Alex Anderson

Hello Everyone,

Currently I'm running Windows 2000 server SP4 (with all accumulative
updates) and I have a schedule event schedule to happen at 12:00am every
day. I have the event pointing to a .cmd file that has the following
contained in it. kill -f aspnet_wp.exe My problem is, kill.exe accumulates
and it spikes my processor. It's my understanding that running a schedule
event, kill.exe would be remove from processes under Task Manager, would it
not? I have to manually kill the process. Is there something I need to add
or select when setting a schedule event like mine so that it kills the
process and kill.exe removes itself from the Task Manager?

Thank you
Alex Anderson
 
D

Dave Patrick

You might try something like this.

cscript mykill.vbs

-----------mykill.vbs--------------
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select " & _
"* from Win32_Process Where Name = 'aspnet_wp.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set fso = Nothing
Set objWMIService = Nothing
Set colProcessList = Nothing
------------------------------------

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Hello Everyone,
|
| Currently I'm running Windows 2000 server SP4 (with all accumulative
| updates) and I have a schedule event schedule to happen at 12:00am every
| day. I have the event pointing to a .cmd file that has the following
| contained in it. kill -f aspnet_wp.exe My problem is, kill.exe
accumulates
| and it spikes my processor. It's my understanding that running a schedule
| event, kill.exe would be remove from processes under Task Manager, would
it
| not? I have to manually kill the process. Is there something I need to
add
| or select when setting a schedule event like mine so that it kills the
| process and kill.exe removes itself from the Task Manager?
|
| Thank you
| Alex Anderson
|
|
 
A

Alex Anderson

Dave,

I apprciate your code, as I will try it instead of my crappy CMD I
wrote. Thanks again!

Alex Anderson
 
D

Dave Patrick

You're welcome.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Dave,
|
| I apprciate your code, as I will try it instead of my crappy CMD I
| wrote. Thanks again!
|
| Alex Anderson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top