Purpose You want to read a registry value |
Solution Example // JavaScript read registry
function RegValue(s)
{
return guixt.CreateObject("WScript.Shell").RegRead(s)
};
In order to read a particular other registry value, e.g. "Path", use In order to handle non-existing registry keys use the JavaScript try/catch mechanism: function RegValue(s) { try { return guixt.CreateObject("WScript.Shell").RegRead(s); } catch(e) { alert("Registry key not found: " + s); return ""; }; } |
Components |