Forum Discussion
m_essaid
8 years agoValued Contributor
hi,
I just scripted that a few days ago :
procedure xxxx
var
wmiService, service;
begin
wmiService:= WMI.Service;
service:= wmiService.Get('Win32_Service.Name=''theServiceName''');
service.StartService
please note that "theServiceName" is to be changed by the service name as it appears in windows services
also, "service.StopService" stops the service
finally, both return an integer. 0 indicates that the operation has correctly been processed.
see this page for all return codes :
https://msdn.microsoft.com/en-us/library/aa393660(v=vs.85).aspx
Related Content
- 7 years ago
- 3 years ago
- 6 years ago
Recent Discussions
- 13 hours ago