I want to set the variables in App.config while the windows service is getting installed.
I have seen many people recommending Link :
http://raquila.com/software/configure-app-config-application-settings-during-msi-install/
Configuration config = ConfigurationManager.OpenExeConfiguration(exePath);
is not working. Is it a in built code or we need to open and store variables manually?
Have you added the
System.Configurationreference to your project?After doing so, you have to define the following directive: