CODE:#define HKEY_CLASSES_ROOT -2147483648
#define HKEY_CURRENT_CONFIG -2147483643
#define HKEY_CURRENT_USER -2147483647
#define HKEY_LOCAL_MACHINE -2147483646
#define HKEY_USERS -2147483645
#define KEY_ALL_ACCESS 983103
#define KEY_WOW64_32KEY 512
#define KEY_WOW64_64KEY 256
#define ERROR_SUCCESS 0
external(INT, "RegOpenKeyEx", "RegOpenKeyExA", "Advapi32.dll");
external(INT, "RegCloseKey", "RegCloseKey", "Advapi32.dll");
external(INT, "RegQueryInfoKey", "RegQueryInfoKeyA", "Advapi32.dll");
external(INT, "RegEnumKeyEx", "RegEnumKeyExA", "Advapi32.dll");
string lpSubKey = "SOFTWARE\Mozilla"; // путь
char text[256];
int rKey, lpcSubKeys;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, lpSubKey, 0, KEY_ALL_ACCESS | KEY_WOW64_32KEY, address(#rKey)) == ERROR_SUCCESS)
{
if (RegQueryInfoKey(rKey, 0, 0, 0, address(#lpcSubKeys), 0, 0, 0, 0, 0, 0, 0) == ERROR_SUCCESS)
{
messagebox("Всего ключей: "+format(lpcSubKeys));
for (int i = 0; i < lpcSubKeys; i++)
{
int size_name = sizearray(text);
if (RegEnumKeyEx(rKey, i, address(#text[0]), address(#size_name), 0, 0, 0, 0) == ERROR_SUCCESS)
{
messagebox(format(#text[0]));
}
}
}
RegCloseKey(rKey);
}