how can i get the dafault path of internet explorer?

how can i get the dafault path of internet explorer?
thats just the question
becoolnikeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DavidBirch2dotComCommented:
by Default path you mean homepage? the page that opens when you first start internet explorer?

Try this

function GetIEHomepage: string;
begin
   with TRegistry.Create do
   try
     RootKey := HKEY_CURRENT_USER;
     OpenKey('Software\Microsoft\Internet Explorer\Main', False) ;
     try
       Result := ReadString('Start Page');
     except
       Result :=  '';
     end;
     CloseKey;
   finally
     Free;
   end;
end;

To test stick the following code on a button
 ShowMessage(GetIEHomepage);

David
calinutzCommented:
If you need the Cache,Favorites,History directory then you need to install Jedi VCL components and on the jvSystem page you will find the jvDirectories and with it you can get a lot more system folders...
:-)
becoolnikeAuthor Commented:
i mean the installed path

as u know sometimes internet explorer is installed in difrent locations, also it change its name when there is a difrent language of the installed window.

so i wanna know how can i get the installed path.
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

DavidBirch2dotComCommented:
There is a registry setting which gives the path to the IE exe  you could then take the path from that

It is located under

 \HKEY_LOCAL_MACHINE\Software\classes\applications\iexplore.exe\shell\open\command\

DavidBirch2dotComCommented:
Try the following example

function GetIEpath: string;
begin
   with TRegistry.Create do
   try
     RootKey := HKEY_LOCAL_MACHINE;
     OpenKey('Software\classes\applications\iexplore.exe\shell\open\command', False) ;
     try
       Result := ReadString('');
     except
       Result :=  '';
     end;
     CloseKey;
   finally
     Free;
   end;
end;


// put this on a button or something

Var
  str,str2: string;
begin
 str:= GetIEpath;
 Delete(str,1,pos('"',str));
 str:= copy(str,1,pos('"',str)-1);
 ShowMessage('Iexplore is at : '+str);
 repeat
    str2:= str2+copy(str,1,pos('\',str));
    Delete(str,1,pos('\',str));
 until pos('\',str)=0;
 ShowMessage('Directory is: '+str2);
end;

David

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
saravananvgCommented:
Hello Sir,

  You can go through the following site to get the current URL path which implies it gets the default URL path when
it is opened for the first time.

http://delphi.about.com/od/windowsshellapi/l/aa060303b.htm

with regards,
padmaja.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.