View Single Post
  #10  
Old May 28th 18, 03:42 PM posted to alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default 2/3 of Services NOT Needed !

wrote

| PS - Currently only 49 of 151 enabled .

Another option, if you or others are interested, is that
services can be listed via WMI. (They can also be
started/stopped that way, but that gets into other
issues.)
The following simple script will provide a report of
currently running services. The list can be made more
or less informative by adding or removing the report
of various properties of the Win32_Service object.

Just copy the following to Notepad and save as
something like services.vbs.

'------------ start script -----------------------
' --- watch out for usenet wordwrap on long lines, especially
'-- 5th line, which should end with )

Dim WMI, AAll(), i6, AllServs, oServ, sServ, FSO, TS
Set WMI = GetObject("WinMgmts:")
ReDim AAll(200)
i6 = 0
Set AllServs = WMI.ExecQuery("select * from Win32_Service where Started
= True")
For Each oServ in AllServs
sServ = oServ.Name & vbCrLf & oServ.DisplayName & vbCrLf
sServ = sServ & oServ.Description & vbCrLf & oServ.StartMode
sServ = sServ & vbCrLf & oServ.PathName
sServ = sServ & vbCrLf & "____________________" & vbCrLf
AAll(i6) = sServ
i6 = i6 + 1
Next
ReDim Preserve AAll(i6)
sServ = Join(AAll, vbCrLf)
Set AllServs = Nothing
Set FSO = CreateObject("Scripting.FileSystemObject")
Set TS = FSO.CreateTextFile("C:\Services Running.txt", True)
TS.Write sServ
TS.Close
Set TS = Nothing
Set FSO = Nothing

MsgBox "Done. List of running services saved as C:\Services Running.txt"

'------ end script ---------------------------


Ads