O
ORC
Hi,
I have an application in which I need information of the path to the exe
file. The application must run on both compact and full framework and on the
Internet I found this code snip that should work (on the CF at least):
"Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)"
It works very fine on Compact Framework where I get:
"\Program Files\My Company"
But on the full framework a "file:" and a backslash is applied in front of
the resulting path as in:
"file:\C:\Program files\My Company"
What is wrong and how is the correct way to do it( that will work on both CF
and FF ?
Thanks,
Ole
I have an application in which I need information of the path to the exe
file. The application must run on both compact and full framework and on the
Internet I found this code snip that should work (on the CF at least):
"Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)"
It works very fine on Compact Framework where I get:
"\Program Files\My Company"
But on the full framework a "file:" and a backslash is applied in front of
the resulting path as in:
"file:\C:\Program files\My Company"
What is wrong and how is the correct way to do it( that will work on both CF
and FF ?
Thanks,
Ole