I need to know a reliable way I can determine the folder that a windows service was started from. The way of determining this seems to be different than the way you'd determine it in a WPF applciaiton.
More Details (optional reading):
I have an embedded sql database that is used by both a WPF application and a windows service.
During development, the relative path to the database has been different for both projects because they have been running from their own debug directories while accessing this same embedded database.
Now, I'm trying to create an installer. I've moved both the windows service executable and wpf applications executable to the same root directory.
In the wpf applciation, I'm successfully creating a database connection string that points to the embedded database, but in the windows service I am not successfully creating this connection string.