PDA

View Full Version : Checking if the file exists on user's computer


bostjank
08-05-2003, 02:08 PM
Hi!

I would like to check whether a file MSADOX.DLL exists in windows system folder of a user computer in order to check whether MDAC is installed on that computer.

I need this, because my app needs MDAC, but if it is already installed, the size of setup file (that would be downloaded from my web site) is SIGNIFICANTLY lower (more than 10 MB).

Does anybody has any suggestions?

Thanks,
Bostjan

Roy Sinclair
08-05-2003, 03:04 PM
Checking for the presense/absense of files on a user's computer would require the use of a custom ActiveX or Java control on your web page. Nothing like that is built into the browser since such a capability would alllow hostile web sites far too much ability to learn about your computer.

oracleguy
08-05-2003, 06:40 PM
Why not this, list both versions on your site. And add, if you don't know what MDAC is, then download the bigger one.

Or you could make the setup without it and as setup runs, if it finds the computer doesn't have it, it could download it from your site and install it.

Roy Sinclair
08-05-2003, 06:49 PM
After a little more thought on the subject I realized something that may be of help.

Since you are expecting the client to have this software installed on their system and you're working from a web page it follows that your intent is to use that software from the web page.

In order to use that software from the web page you're going to have to call it via some ActiveX Control that's a part of that software. Part of the declaration of that control allows you to specify a download source for the control if it's not already installed.

The question now is why not simply use that mechanism which is already present to handle this instead of creating a new one?

bostjank
08-05-2003, 08:34 PM
Hi!

Thanks for your answers. Of course, I could check if MDAC is installed from within the application and instruct user to download and install MDAc (or download and install it from the application).

But the application that would be downloaded from the web is only a demo version, so I would like to make it possible for the user to download the smallest file possible (+ almost nobody knows what MDAC is).

Most of my users stil have dial-up access, so the file size is very important- if MDAC is added to setup, the file is 10 MB bigger!

Anyways, I guess I'll add the checking part into the app and notify user if she needs to install MDAC.

Bostjan

oracleguy
08-05-2003, 09:23 PM
You could write a simple <10k vbscript file they could run that could check to see if they need it. They could just download it and run it. And it would tell them.

bostjank
08-06-2003, 06:03 AM
I only know VB and to run VB application that would check for file, would require a separate setup just for that application - the setup file with all required run time files is bigger that 1 MB.

oracleguy
08-06-2003, 06:25 AM
No, I'm taking about a .vbs file. You write using VBScript. It could provide an eaxmple if you need one.

bostjank
08-06-2003, 06:26 AM
Yes, I would really need an example.