Service config files

Started by
3 comments, last by stormwarestudios 15 years, 11 months ago
Hi all, I've written a program at work which I'm turning into a Windows service. The program relies on a configuration file. My question is, what is the customary storage location for the configuration file for a service? I am assuming at this point that the cleanest place is in C:\Documents and Settings\All Users\Application Data\<my app>\, but I would like to be sure. I guess the config file could also go in C:\Program Files\Common Files\<my app>\? I would like to avoid touching the registry if possible. Cheers, - DH
Advertisement
Is this an Application Configuration file or just a config file (like myConfig.config as opposed to app.config)? If it's a normal config then yeah, stick in the App Data path - that's what I do.

James
Yeah it would be the application config file. The config file is not user-specific.

Thanks,
- DH
Hang on, if it's the App.config file then shouldn't you just keep that in the same directory as your Service.exe?

James
I guess I could. Coming from more of a Linux background, I figured the application's binaries and configurations should somehow be separate.

Silly me :)

This topic is closed to new replies.

Advertisement