Brian,
Instead of looking at the start in folder, why not look for the location
of the assembly using reflection, then use that for your relative file
paths?
Either that, or send the path to your directory in the parameters
textbox on the first page of the properties for the service.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Brian" <no@email.com> wrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
Is there a way to set the "start in" folder for a windows service?
I am running under the Local System account, and the start in folder seems
to be "c:\windows\system32". I use some relative filenames in my
application and would really like the start in folder to be something more
like "c:\apps\myservice".
I've looked at the ServiceInstaller class and ServiceProcessInstaller
class but they don't seem to have this option.
--Brian