yuda41
yuda41

Reputation: 9

Python to read services Description

I want my python script to read the windows service description, In order to decide whether to stop it \ make it run only manually.. The point is that I don't find the method that reads the Description. (may be something like 'GetServiceDescription').

help anyone?

Upvotes: 0

Views: 221

Answers (1)

Ja8zyjits
Ja8zyjits

Reputation: 1502

You can use wmi library also follow other answers like List running processes on 64-bit Windows.

i haven't tested this but this should be the short snippet to list them reference,

import wmi
c = wmi.WMI()
for service in c.Win32_Service(): #if its win32
    print service.Name

Follow this tutorial

If you find it tough to follow may be looking at the tutorial may help or come again with another question.

Upvotes: 1

Related Questions