Read the Registry

Hi Experts,

I want to detect if an URL Protocol is installed in the computer. I think that I have to access the registry and read if there is registered.

How can I do it with javascript?

My pages are generated with PHP

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.

Michel PlungjanIT ExpertCommented:
It does not matter what your pages are generated with.
You need to run WSH - try here:
_JHL_Author Commented:
I 've read about WSH, and if i'm not wrong it implements an activex with vbscript... but first i´m looking for a jscript solution, second i´ve tried this code but nothing occur in the page  

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\MyNewKey\", 1 ,"REG_DWORD"
WshShell.RegWrite "HKCU\MyNewKey\MyValue", "Hello world!"

WScript.Echo WshShell.RegRead("HKCU\MyNewKey\MyValue")
WScript.Echo WshShell.RegRead("HKCU\MyNewKey\")

WshShell.RegDelete "HKCU\MyNewKey\MyValue"
WshShell.RegDelete "HKCU\MyNewKey\"

ZvonkoSystems architectCommented:
You cannot read the registry from a web server. That is not allowed.

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
Michel PlungjanIT ExpertCommented:
1. all wsh can be executed as javascript but it IS using activeX
2. all wsh is so potentially harmful that you will not be allowed to run in an html page from a server as Zvonko correctly point out.
However you can put it in a file with extension .HTA and the user will be asked if he/she wants to execute it.
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.