Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are valid characters in a Windows service (key) name?

Does anyone happen to know what the convention for Windows service key names is, which characters are legal?

like image 828
miki Avatar asked Apr 29 '09 07:04

miki


2 Answers

Based on the documentation for the underlying C++ structure used to create a service:

The maximum string length is 256 characters. The service control manager database preserves the case of the characters, but service name comparisons are always case insensitive. Forward-slash (/) and backslash (\) are not valid service name characters.

Additionally, the following rules apply to the "Display Name":

This string has a maximum length of 256 characters. The name is case-preserved in the service control manager. Display name comparisons are always case-insensitive.

like image 70
Richard Szalay Avatar answered Sep 28 '22 08:09

Richard Szalay


Additional Information to the Response from Richard Szalay.

According to ServiceInstaller.ServiceName

The ServiceName cannot be null or have zero length. ... It also cannot contain ... characters from the ASCII character set with value less than decimal value 32.

like image 38
Timo Sperisen Avatar answered Sep 28 '22 08:09

Timo Sperisen