Purpose
You want to read a registry value
 

Solution
Use the "WScript.Shell" object

Example
We read the installation path of "excel.exe":
 
CallJS x = _
  RegValue "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe\"

Message
"&V[x]"

// JavaScript read registry
function RegValue(s) 
{
  return guixt.CreateObject("WScript.Shell").RegRead(s)
};


Remarks
We need the ending backslash "\" since we read the "Standard" value:

In order to read a particular other registry value, e.g. "Path", use 
 
CallJS x = _
  RegValue "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe\Path"


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
InputAssistant + Controls