Link to home
Start Free TrialLog in
Avatar of kbwesler
kbwesler

asked on

client registry access via JavaScript

Is it possible to access a client workstation registry key value via JavaScript through the web?

If so, how?

thanks
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Of course you cannot access the registry with javascript when it came through the web. This is due to security reasons. The only way to do that is when the user explicitly allows you to do that. otherwise it is not possible.

And believe me, users won't allow you to do that.

You are able to do that with ActiveX but due to the vulnerability I won't give you that code...

Why exactly would you want that?

CJ
There might be another way to achieve your goals.
i dont think so. not that i know what you mean, but i just have never come across this, <grin>
which registry are we talking abt here?
Avatar of kbwesler
kbwesler

ASKER

so the user has to enable active scripting within the browser? is there any other way to pull values from a client registry via a scripting language?
Why do you want to do that? What results would you like to achieve?

CJ
The user has to enable your website to do that. And it will only work in Internet Explorer and not on AOL or Netscape.

In IE the user will be prompted with a security warning and can then choose whether to allow you or not.

I have an application which runs in a LAN that saves preferences locally to the client workstation registry.  Then I have a web component to the app that needs to access those registry settings. There has to be a way to achieve this.
I have an application which runs in a LAN that saves preferences locally to the client workstation registry.  Then I have a web component to the app that needs to access those registry settings. There has to be a way to achieve this.
You really should be using cookies for that purpose and not the registry, that is what they are for.

Okay, so you alreayd have an application? Is it a component? Like ActiveX? If so, the easiest way to achieve your goals is by adding this registry writing to that application and allow that application to run on the client. You cannot tell the application to write or read from a certain client without having the application run on that client (makes sense?).

Cookies are the way to do your stuff from a browser on.

I still don't really get the design that you are using. So I would like to ask some questions.

1) Is it a webinterface? With other words is a page being opened on the client?
2) Does it really have to be registry? I don't recommend it for this purpose, instead you should use cookies.
3) is the web application a true component or plain HTML / Javascript?

CJ
cookies are not an option.  It is a web interface and it is only a component or portal to the client/server application.  The preferences that are stored in the registry are different for every workstation.  Yes, it has to access the registry.
ASKER CERTIFIED SOLUTION
Avatar of CJ_S
CJ_S
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is the only way that you won't get the anti-virus software in between btw, other methods using javascript will!!

CJ
cookies are not an option.  It is a web interface and it is only a component or portal to the client/server application.  The preferences that are stored in the registry are different for every workstation.  Yes, it has to access the registry.
thank you exactly what I was looking for.