wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Access Registry Entry through Java Script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Access Registry Entry through Java Script" Watch "Access Registry Entry through Java Script" New topic
Author

Access Registry Entry through Java Script

Shweta Gulati
Greenhorn

Joined: Apr 26, 2001
Posts: 15
Hi everyone,
I am totally lost. I want to access the value for registry entry(installpath) where my application is installed through Java script. How do I do it?
Thanks a lot,
Shweta
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
Hi,
this is an example form MSDN. You can look under Web Development\Scripting\Window Script Host
Windows script host should be installed on machine (it usually is).
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.RegWrite ("HKCU\\Software\\ACME\\FortuneTeller\\", 1, "REG_BINARY");
WshShell.RegWrite ("HKCU\\Software\\ACME\\FortuneTeller\\MindReader", "Goocher!", "REG_SZ");
var Key1 = WshShell.RegRead ("HKCU\\Software\\ACME\\FortuneTeller\\");
var key2 = WshShell.RegRead ("HKCU\\Software\\ACME\\FortuneTeller\\MindReader");
WshShell.RegDelete ("HKCU\\Software\\ACME\\FortuneTeller\\MindReader");
WshShell.RegDelete ("HKCU\\Software\\ACME\\FortuneTeller\\");
WshShell.RegDelete ("HKCU\\Software\\ACME\\");
[ August 19, 2002: Message edited by: Yuriy Fuksenko ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access Registry Entry through Java Script
 
Similar Threads
Reading registry values from remote computer
error in data base connection
Access Registry Entry through Java Script
File Search
How to access the windows registry