How to get windows service name from app.config
问题 i have a app.config <appSettings> <add key="ServiceName" value="HasService"/> <add key="ServiceDisplayName" value="HasService"/> </appSettings> my service installer class [RunInstaller(true)] public class MyServiceInstaller : System.Configuration.Install.Installer { public MyServiceInstaller() { var process = new ServiceProcessInstaller {Account = ServiceAccount.LocalSystem}; var serviceAdmin = new ServiceInstaller { StartType = ServiceStartMode.Manual, ServiceName = "HasService", DisplayName