I found this: https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/26829 which works, but I can't get it to return a value:

Code:
alias regread {
  var %a $ticks
  .comopen %a WScript.Shell
  if ($comerr) return ERROR
  var %c $com(%a,RegRead,3,bstr,$1)
  if (!%c) || ($comerr) {
    .comclose %a
    return ERROR
  }
  var %b = $com(%a).result
  .comclose %a
  return OK %b
}


Code:
//echo -a $regread(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName)
Simply returns OK here, whereas I can see the correct value using the registry editor (/run regedit)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel