download through me

Clicking on the URL such as, A download dialog will show, I want to replace this dialog, I want to control the download whether availability.

Some download tools can do this, for example, netants, getright and so on. Somebody clicking on the URL such as in IE, the download tools will popup and download it.
  I want to do like downloadtools.
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.

1) Please reformulate your question, because I think it is not clear
2) I think it is not a specific delphi matter,
3) As soon as you have a link to a zip file, all what can ve done is to unload it. If you want to have control over the download you must either
attach a script in your html page (javascript, vbscript, java, activex)
or link to some script on the server
who will handle it

regards, Marc
cookeyAuthor Commented:
Edited text of question.
cookeyAuthor Commented:
   Yes, any language can do this, but, I want to know how to do it,not care which language to be use.
   Of cause, Delhpi better.^_^ Thanks
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.

Yep I get what you want. I have not the answer for this one but it is rather a difficult question, because what your tools do, is to add a plugin to your favorite browser that will launch a download program if such a link is seen.

I think that with 50 points you do not reward anough the people who knows hos to reply this question

regards, Marc
you just need to register your file types in the registry,so when a link to a file of type .txt is clicked it will open in your app instead of can use some code liike this to do it:

procedure RegisterFile;

var Reg: TRegistry;

  Reg := TRegistry.Create;
    Reg.RootKey := HKEY_CLASSES_ROOT;
    Reg.OpenKey('\.txt', True);
    Reg.WriteString('', 'MyProgram');
    Reg.OpenKey('\MyProgram', True);
    Reg.WriteString('', 'a very special file');
    Reg.OpenKey('\MyProgram\DefaultIcon', True);
    Reg.WriteString('', Application.ExeName + ', 1');
    Reg.OpenKey('\MyProgram\Shell\open\command', True);
    Reg.WriteString('', Application.ExeName + ' "%1"');
    ShowMessage('successfully registered');

the stopping of IE or Netscape from downloading the file happen automaticaly because your program is handling it..
to get the paths/url call ParamStr(1);


or in a loop if need be:

  I: Word;
  for I := 0 to ParamCount do begin

Regards Barry

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
waow :-)
inthe - this won't stop ie or netscape downloading the file itself

cookey - you have to set and register mime types in the browser
to handle file downloads - I don't know how to do this

good luck ...
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

From novice to tech pro — start learning today.