|
Answer» I'm running XP and AOL 9.0 AOL is good at hogging the processor and thrashing the HD even when AOL is not running. There are 3 or 4 AOL software .exe files that I can stop using the Task Manager bt I'd like to write a small .bat file to stop them for me, running it from the Desktop is possible.
I need to stop aolsoftware.exe , AOLacsd.exe and AOLSP Scheduler.exe in particular.
I don't see any .bat commands that will do this. Any IDEAS please? The simpler the betterYou can use the taskkill utility:
Code: [Select]@echo off taskkill /im aolsoftware.exe /f taskkill /im AOLacsd.exe /f taskkill /im "AOLSP Scheduler.exe" /f
Is that the real name for the third one? If so keep the quotes.
Thank you for that, looks good, but I'm getting the message
'taskkill' is not recognised as an internal or external command, operable program or BATCH file.
I've now found that TSKILL is the equivalent for XP home, TASKKILL only works with Pro.
HOWEVER, it stil doesn't work as I'm getting Could not find process. How do I tell it where to find it? The PID changes each time aolsoftware runs, so this can't be used, I guess.
I have found that TSKILL aolsoftware (without the .exe) kills the process from the DOS prompt but it does not work from the .bat file. TSKILL AOLacsd does no work either way, giving: Access is denied. What next pls?
Took a different approach by iterating the running processes:
Code: [Select]@echo off for /f "tokens=2" %%x in ('tlist') do ( if /i %%x equ aolsoftware.exe tskill /im %%x /f if /i %%x equ AOLacsd.exe tskill /im %%x /f )
I'm stumped with that third one however (AOLSP Scheduler.exe). The embedded space presents a problem. Does it really show up on the task LIST with a space? If not just add another if statement; if it does we may have to use VBScript.
In fact, its only aolsoftware.exe that is the real troublemaker, so the others are just so I can get ALL AOL software stopped, not essential.
However, tlist doesn't work and is not recognised, and has supposedly been replaced with Tasklist. However, my XP doesn't recognise that either. It turns out that I can download Tasklist.exe (where should I put it so it can be accessed easily?)
Tasklist now works from C:/ which is where I put it, and the .bat file now executes cleanly but doesn't stop anything!
(Yes, btw, AOLSP Scheduler.exe does have a space in it)Apparently TLIST came with the NT & 2000 toolkits. TASKLIST came with the XP toolkit. I try not to ask posters to download anything, so let's try this:
Code: [Select]strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery("Select * from Win32_Process")
For Each objProcess in colProcess If objProcess.Name = "aolsoftware.exe" Then objProcess.Terminate() If objProcess.Name = "AOLacsd.exe" Then objProcess.Terminate() If objProcess.Name = "AOLSP Scheduler.exe" Then objProcess.Terminate() Next
Save the script with a vbs extension. You can run from the command prompt with this command: cscript scriptname.vbs You can also run it from the run box as wscript scriptname.vbs. If run from the run box, you'll need path information for scriptname.vbs
Good luck. Excellent - that does indeed stop aolsoftware.exe and aolsp scheduler.exe, although it leaves AOLacsd.exe still running. I don't know what this does, but it doesn't seem to do much and isnt a processor hog, so far.
So, many thanks for your patience and diligence, and do have a good time over the next few days.@ sidewinder: Nice! :-D
@ lifesvoyager: I was playing with the script a bit to kill some other processes and found that this seems to be the case where Windows acts likes UNIX and REQUIRES exact case. Or at least on this machine it did. It is currently running XP Pro with SP2.Thanks for that redeye, but case is correct and AOLacsd.exe still refuses to stop. Also AOLLOAD.EXE won't disappear either. The ones I need to kill are obliging however. odd, innit? (XP Home + SP2)Just a hunch, but it could be that the modules that won't stop are running as services. You can check this by running services.msc from the Start==>Run box.
This piece of code should help. You may have to adjust which modules are processes and which are services.
Code: [Select]strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" _ & strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery("Select * from Win32_Process") For Each objProcess in colProcess If objProcess.Name = "aolsoftware.exe" Then objProcess.Terminate() If objProcess.Name = "AOLSP Scheduler.exe" Then objProcess.Terminate() Next
Set colService = objWMIService.ExecQuery("Select * from Win32_Service") For Each objService in colService If objService.Name = "AOLacsd.exe" Then objService.StopService() If objService.Name = "AOLLOAD.EXE" Then objService.StopService() Next
well now, I note that the ones that are killable have me as their User Name in Task Manager, but the awkward ones have SYSTEM as their user name.
Is this relevant?Quote Is this relevant? Could be. Actually I think the user name is who initiated the job.
There is a fine line between a process and a service more having to do with function. In the services.msc window were you able to find the modules that won't die? Another variable would be are you running as the system administrator? Did you try running the script? Any results?
Note: Stopping a service with the GUI or a script is only valid for the Windows session. The service will revert to it's startup status (automatic/manual/disabled) at boot.'AOL connectivity service' is in the services.msc list - I presume this is AOLacsd.exe?
AOLLOAD.EXE is not in the list by any recognisable name. These are both ones that only die if I kill them from the Task Manager. But they don't seem to be problematic anyway. The ones that thrash the HD are killed by your earlier script which I now run each time I log off from AOL. So all is well, in fact.
Mind you, it amazes me how many processes are listed in the Task Manager and I wonder how many really need to be there.
I'm looking into Linux in the hope of distancing myself from MS if possible.
A successful and enjoyable 2008 to all.
|