Click here to Skip to main content
15,919,341 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

i want to read the registry value using javascript from chrome browser.

i have code which is use to read the values from registry but works only with IE because of active x object.
Posted

You can't read the registry without ActiveX - which means using IE only. Firefox, Chrome, etc do not support them, and most installations of IE don't either because of the security hole ActiveX controls represent.

Accessing the registry requires access to the host computer (which may not have a registry) which is forbidden for security reasons.
 
Share this answer
 
try this code

XML
<script type="text/javascript">
            function readValue() {
                var WshShell = new ActiveXObject("WScript.Shell");
                var value = WshShell.RegRead("HKCU\\Software\\Microsoft\\FTP\\Use PASV");
                document.write("Value of Use PASV: " + value);
            }
        </script>
 
Share this answer
 
Comments
Nawab Ahmad 4-Nov-13 5:03am    
Hi Soumitra.
Thnx fr ur reply..
but this code works only with IE bcoz u use ActivexObject ..i want code that works with chrome...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900