Hi guys Been lookin' for a way to list the non-Microsoft Services to a *.txt file.
Either using vbs or a batch file will be sufficient.
I've tried numerous ways with WMI and the sc.exe command, but can't seem to put my finger on it.
Thanks,
Tim
Hi guys Been lookin' for a way to list the non-Microsoft Services to a *.txt file.
Either using vbs or a batch file will be sufficient.
I've tried numerous ways with WMI and the sc.exe command, but can't seem to put my finger on it.
Thanks,
Tim
The Win32_Service
WMI class doesn't have a property that would return the service's manufacturer, but the CIM_DataFile
class does. So I can suggest the following solution:
Win32_Service
class instances.PathName
property of the current service (it holds the command line for the service).PathName
.CIM_DataFile
class instance corresponding to the service file.Manufacturer
property to find out whether or not the service is Microsoft's. For example, on my Vista box, the Manufacturer
of all Microsoft services is Microsoft Corporation.Notes:
PathName
and querying the CIM_DataFile
class as the PathName
can include command-line arguments and may not include known file extensions (e.g. exe).Manufacturer
property may be Null
for some non-Microsoft services.