I created a new Windows Service in C# and want to set a Service Dependency.
Did it like this:
ServiceInstaller si = new ServiceInstaller();
si.ServicesDependedOn = new string[] { "DependingOnThisService" };
this.Installers.Add(si);
Everything works fine. My Problem right now is, that I want to set this Dependency only in fact of a special "flag" in the app.config - file.
But I am not able to read from the app.config - file in the ( from
System.Configuration.Install.Installer inherited) class.I neither get an exception nor a result from the config - file (always get an empty string).
So is there a possibility to read from the app.config in this class or, if not, what is the best alternative to do this?
Hope anybody can help me!
tia
Replies
Know the answer? Post it — somebody with the same question will find it here.