06-05-2020, 04:13 PM
Here returns true and data. My QM3 version is newer, but registry functions didn't change during that time.
.NET has registry functions too:
.NET has registry functions too:
C# code:
// script "" //.
using Au; using System;
using Microsoft.Win32;
partial class Script { [STAThread] static void Main(string[] a) => new Script(a); Script(string[] args) { //;;;
string userRoot = "HKEY_CURRENT_USER";
string subkey = @"Software\GinDi\QM2\Test\";
string keyName = userRoot + @"\" + subkey;
string name = "ADD1";
#if tru
if(ARegistry.GetString(out string data, name, keyName)) Print(data); else Print("not found");
#else
string data = Registry.GetValue(keyName, name, null) as string;
Print(data);
#endif
}
void Print(object o) => AOutput.Write(o);
}