Hi All,
I tried all the suggestions. Here is the code that I used:
Dim liodirectory As IO.Directory
Response.Write("Current Directory: " & liodirectory.GetCurrentDirectory &
"<br>")
Response.Write("Environment Current Directory: " &
Environment.CurrentDirectory & "<br>")
Response.Write("Environment Special Folder: " &
Environment.GetFolderPath(Environment.SpecialFolde r.ProgramFiles) & "<br>")
Response.Write("Assembly Directory: " &
System.IO.Path.GetDirectoryName(System.Reflection. Assembly.GetExecutingAssem
bly.Location) & "<br>")
Here is the output that I got:
Current Directory: C:\WINNT\system32
Environment Current Directory: C:\WINNT\system32
Environment Special Folder: C:\Program Files
Assembly Directory: c:\winnt\microsoft.net\framework\v1.1.4322\tempora ry
asp.net files\root\23dca450\b763ff63\assembly\dl2\3a720830 \e84cc8dd_bfccc301
The output I was hoping to get was: D:\WebSite\ (which is where the root of
my web pages are). Is there anyway which will allow me to get to that
location using a system variable?
Any help would be greatly appreciated.
Sincerely,
FT
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:et**************@TK2MSFTNGP10.phx.gbl...
* "First Tiger" <kk********@yahoo.com> scripsit: Is there a default function or global variable that will allow me to
derive the location of my install? I'm trying to store my system settings file
from a persistent location. I know that I can set it through code but I want
the option to install the same application multiple times on the same
computer so I can foresee that being an issue. Any help or direction would be
greatly appreciated.
\\\
Imports System.IO
Imports System.Reflection
.
.
.
Private Function ApplicationPath() As String
Return _
Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
End Function
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>