Enumerate Services to Collection
|enumerate_services.zip||8/22/2019 4:35:54 PM||4,378|
Here is a class and module that enumerates the services on a Windows computer. It gets each service and puts its info into a public collection which can be used anywhere in the program.
The attached ZIP file contains the full class module, as well as the standard module.
Option Explicit Private Sub Command1_Click()
Dim x As clsService
Dim strHostName as String
'Call procedure, where strHostName is the name of the Machine, use "" for the
GetServiceInfo strHostName, SERVICE_ACTIVE Or SERVICE_INACTIVE
For Each x In colServices
This code originally appeared on AndreaVB.com, and has been republished here with the permission of Andrea Tincani.
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.