We have an application that parses the output of sc qdescription <service_name> to get the service description, and the usual output is something like:
C:\>sc qdescription WSearch
[SC] QueryServiceConfig2 SUCCESS
SERVICE_NAME: WSearch
DESCRIPTION: Provides content indexing, property caching, and search results for files, e-mail, and other content.
However, we just discovered that depending on the OS language, the output can be different, e.g. in German:
C:\>sc qdescription WSearch
[SC] QueryServiceConfig2 ERFOLG
SERVICE_NAME: WSearch
BESCHREIBUNG: Stellt Inhaltsindizierung und Eigenschaftenzwischenspeicherung und Suchergebnisse für Dateien, E-Mails und andere Inhalte bereit.
My question is:
- Which criteria should be used to extract the description? The second occurrence of the text after the
:? - What about other languages, e.g. Arabic or Chinese?