Hola amig@s, buscando en este foro me encontré con un código para ver los servicios del sistema en este direccion
http://www.clubdelphi.com/foros/showthread.php?p=109245
el codigo es
Código PHP:
function ServiceGetList(sMachine: string;
dwServiceType, dwServiceState: DWord;
slServicesList: TStrings) : boolean;
const
// assume that the total number of services is less than 4096.
//Increase if necessary
cnMaxServices = 4096;
type
TSvcA = array [0..cnMaxServices] of TEnumServiceStatus;
PSvcA = ^TSvcA;
var
j: integer;
// service control manager handle
schm: SC_Handle;
// bytes needed for the next buffer, if any
nBytesNeeded,
// number of services
nServices,
// pointer to the next unread service entry
nResumeHandle: DWord;
// service status array
ssa: PSvcA;
begin { ServiceGetList }
Result := false;
// connect to the service control manager
schm := OpenSCManager(PChar(sMachine), nil, SC_MANAGER_ALL_ACCESS);
// if successful...
if (schm>0) then
begin
nResumeHandle := 0;
New(ssa);
EnumServicesStatus(schm, dwServiceType, dwServiceState, ssa^[0],
sizeof(ssa^), nBytesNeeded, nServices,
nResumeHandle);
// assume that our initial array was large enough to hold all
// entries. add code to enumerate if necessary.
for j := 0 to nServices-1 do
begin
slServicesList.Add(StrPas(ssa^[j].lpServiceName));
end; { for j }
Result := true;
Dispose(ssa);
// close service control manager handle
CloseServiceHandle(schm);
end; { (schm>0) }
end; { ServiceGetList }
como ver la ruta completa del servicio que muestra este programa? por ejemplo ver las rutas de este tipo:
System32\DRIVERS\xxxxxxxxx.xxx
%SystemRoot%System\xxxxxxxxxx.xx