PDA

View Full Version : Can ASP check registry?


janice_2k
05-31-2004, 09:20 AM
Dear Gurus/Members,
I am a newbie in ASP. I would like to know whether can ASP check the windows registry?

I developed an e-learning website that requires a specific software. During the one time installation of the software, the installer will store a string of registry number into regedit on user's computer. After that, whenever user click on a button on the website to call the software, the ASP command will check the regedit whether the registry exist. If there is no such string, it will prompt user to install the software. Otherwise, it will proceed. My main concern is whether can ASP detect and check the user's PC (regedit) for the registry? If not, can VB script or Javascript does that? Can I have a sample of the codes for the matter mentioned above? Any suggestions and ideas are higher appreciated. Hope to hear some reply soon.

Thanks in advance,
Janice

M@rco
05-31-2004, 12:52 PM
Do you need to check the registry of the *user's* PC, or the *server*?

If the server, then if you set the right permissions it's possible to use the WScript.Shell object to access the registry from within your ASP script, but you might have to spend some time fiddling to get the permissions right.

If the client, then you can use the same object, but the user will be prompted to authorise each access to the registry because it's a potential security hole.

What specific software are you checking for? I suspect that there might be an easier way to check, but it depends on what the software is...

janice_2k
06-01-2004, 02:51 AM
Hi M@rco,
First of all, thanks for your reply. I developed a website that requires user to download a plugin that I created using Media Control Interface for voice recording/playback. It is a one-time installation whereby a string of registry numbers will be stored on the user's pc in regedit folder during the installation. After that, whenever the user clicks on a button to call the record/playback pop up window, a script will check the user's regedit folder to see if the resigtry exist. If the registry does not exist, it will ask user to download the program. Otherwise, it will display and run the record/playback pop up window. My concern here is whether can the script to check the existance of registry be written in ASP? If not, what other script language can does this, besides VB? I hope my description is not confusing. Hope to hear your reply soon. Thanks in advance.

Thank you,
Janice

shmoove
06-01-2004, 08:26 AM
It's been a while since I did anything like this, but if I remember correctly what you need is basically to develop the plug-in as an ActiveX control, and then Windows and IE will take care of all the "making sure the plug-in is installed" part.

shmoove

M@rco
06-01-2004, 08:59 AM
It's been a while since I did anything like this, but if I remember correctly what you need is basically to develop the plug-in as an ActiveX control, and then Windows and IE will take care of all the "making sure the plug-in is installed" part.Precisely. If you re-develop your application so that it runs as an ActiveX control within Internet Explorer, you will be able to deploy it such that IE will automatically download & install it if it's not already present, just like the way Flash does.

If that's not possible/viable (perhaps you MUST have it as an external application) then as a halfway house you could include a dummy ActiveX control as part of the normal installation package, and then check its existence from IE via a call to CreateObject() in VBScript (or the equivalent in JScript).

But it's much cleaner if you do it the first way.