Solved Batch Disable services not in a text file (XP)

Hewlett-packard Hp pavilion dv9000 lapto...
August 6, 2012 at 13:54:47
Specs: XP Vista Win7, P4 3Ghz 3G ram
Does someone have a batch file or idea how to querry each service, compare it to a list of services. If the service name isn't in a list, stop & disable it?

The Computer Dr
Chris Robertson


See More: Batch Disable services not in a text file (XP)

Report •


#1
August 6, 2012 at 14:44:28
✔ Best Answer
Once you've created your master list ("taskmaster"), this might work:

@echo off & setlocal enabledelayedexpansion
tasklist /nh /fo:"csv" >tasks
findstr /v /L /g:taskmaster tasks>killall
for /f "tokens=2 delims=," %%a in (killall) do echo taskkill %%~a
:end


Report •
Related Solutions


Ask Question