Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Access Registry Entry through Java Script  RSS feed

 
Shweta Gulati
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!