- rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, KEY_ALL_ACCESS/* KEY_READ*/, &key);
- if (rc != ERROR_SUCCESS) {
+ rc = RegOpenKeyEx(HKEY_CURRENT_USER, path, 0, KEY_ALL_ACCESS, &key);
+ if(rc)
+ rc = RegOpenKeyEx(HKEY_CURRENT_USER, path, 0, KEY_READ, &key);
+ if(rc)
+ rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, KEY_ALL_ACCESS, &key);
+ if(rc)
+ rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, KEY_READ, &key);
+
+ if (rc) {