This week's book giveaway is in the Java in General forum. We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line! See this thread for details.
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
posted 13 years ago
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 ]