find a file

odelya

Member
Joined
Mar 13, 2005
Messages
10
Programming Experience
Beginner
i open a file throught the internet explorer.
how can i find where the iexplore.exe file is located on the user computer?
 

due

New member
Joined
Mar 20, 2005
Messages
3
Location
Palestine
Programming Experience
1-3
well, normaly it would be in c:\program files\internet explorer\iexplore.exe
to get the real "x:\program files\" path
use
VB.NET:
[size=2][color=#0000ff]Dim[/color][/size][size=2] ProgPath [/size][size=2][color=#0000ff]As [/color][/size][size=2][color=#0000ff]String
 
[/color][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] IEPath [/size][size=2][color=#0000ff]As [/color][/size][size=2][color=#0000ff]String
 
[/color][/size][size=2]ProgPath = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
 
IEPath = ProgPath & "\Internet Explorer\iexplore.exe"
 
[/size][size=2][color=#0000ff]If[/color][/size][size=2] System.IO.File.Exists(IEPath) [/size][size=2][color=#0000ff]Then
 
[/color][/size][size=2][color=#008000]'its there 
 
[/color][/size][size=2][color=#0000ff]Else
 
[/color][/size][size=2][color=#008000]'Oooops Not there!
 
[/color][/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]If
 
[/color][/size][size=2][size=2][color=#0000ff]
 
[/color][/size]
hope that what you where looking for
[/size]
 

odelya

Member
Joined
Mar 13, 2005
Messages
10
Programming Experience
Beginner
anoter question

thanx,it helped.
but now i have another question. i wrote this "shell" command to open a asp.net file to be run as a web page.
for example. i have in directory:
c:\inetpub\wwwroot\odshir
a solution. the start up file is main_page.aspx
i want the asp.net to be run.

i wrote:
shell(IEPath & " " & dest & "\main_page.aspx")

dest is c:\inetpub\wwwroot\odshir.

but when i run it, it opens it as a code file - i can see the code!
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
This is how it should work. If you used Internet Explorer to open an aspx file, you would also see the code.
In order to see the execution of an aspx file, you have to request it from the Server. The server then uses the asp compiler to generate an HTML file and sends that to the client.
 
Top Bottom