Messing around with the register. Everything's working fine, but I just can find out how to read a value... Can anyone fix this code (so that strBuf holds the value...)?
VB Code:
  1. Dim lngResult As Long, strBuf As String
  2. strBuf = Space$(255)
  3. RegOpenKey HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram", lngResult
  4. RegQueryValueEx lngResult, "UninstallString", ByVal 0&, REG_SZ, ByVal strBuf, Len(strBuf)
  5. RegCloseKey lngResult