Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've asked this question yesterday;
"I need help here, please. I have a page that has links to a batch file in the user's computer, if the user doesn't have the batch file it will generate a page not found page, if it is found it will display the results by the batch file. My question is, there is a way to check for the presence of the batch file in the user computer and redirect them to a page explaining that don't have it. Or by detecting from the browser that the batch file doesn't exist when page can't not be displayed comes up, therefore they will be redirect somewhere. Can someone point me to the right direction on how to do such a program or even if it is possible?"
But I have to rephrase my question again, the reason for this question is to see is some of my viewers would have downloaded an application to their hard drive if not I would have to instruct them to try to do so. I heard that it is possible using active-x control but I try to stay away from it. I also don't want to invade people’s computer trying to check into their harddrive. My new question is, let say they click on this link that is linked to a batch file in their computer c: drive. If they have this application installed it will launch the program, otherwise it will display a can't find page screen. I am wondering if I could capture that “can't find page” error somehow and redirect them to another location with useful information using perl. Once again;
Thank you very much!!

Replies are listed 'Best First'.
Re: Rephrased File Checking Question
by Joost (Canon) on May 07, 2003 at 15:05 UTC
    My new question is, let say they click on this link that is linked to a batch file in their computer c: drive. If they have this application installed it will launch the program ...

    If this would be possible it would be even more of a security hole than just being able to "test" if a file exists. - Imagine yourself innocently browsing the web, clicking links - when suddenly you start a program on your own machine - for the sake of arguments i'll call it FORMAT.EXE...

    Anyway, there is no reason for the users to NEED the application you are talking about, unless it's a browser plugin - and here are ways of testing for them.

    Just put a nice explanation on your page why and how the user should have said application installed, and if they decides they really need it, they will.

    -- Joost downtime n. The period during which a system is error-free and immune from user input.