Julia,
If you want to get the path that the executing assembly is in, you
should get either the executing assembly (through a call to the static
GetExecutingAssembly method on the Assembly class) or the entry point (which
is your executable, I believe, obtained through a call to the static
GetEntryAssembly method on the Assembly class).
Once you have the Assembly instance, you can get the location through
the Location property on the assembly. From there, you can use the methods
on the Path class (in System.IO) to get the path of your files using a base
and a relative path.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Julia" <co********@012.net.il> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,
I have two application which 'evaluate'( New FileStream(path....) relative
path,
when evaluating the path inside a window service it always return
something
like
C:\\WINNT\SYSTEM32\MyPath
While when evaluating it in a window application I get the correct path
both run from the same folder!!
Thanks.