Hi
I am using RegOpenKeyEx() and giving registry path Software\\Mozilla\\Mozilla Firefox ,its giving error_sucess.but after that how can i get the instal directory Data of mozilla firefox from that path using RegQueryValueEx().
Hi
I am using RegOpenKeyEx() and giving registry path Software\\Mozilla\\Mozilla Firefox ,its giving error_sucess.but after that how can i get the instal directory Data of mozilla firefox from that path using RegQueryValueEx().
First you need to open Software\Mozilla\Mozilla Firefox and query the CurrentVersion value for the current active version.
Then, open Software\Mozilla\Mozilla Firefox\\Main and query its Install Directory value.
RegQueryValueEx is used like so;
TCHAR buffer[1024] = {0};
DWORD bufferSize = sizeof(buffer);
DWORD result = RegQueryValueEx( hkeyMain,
TEXT("Install Directory"),
NULL,
NULL,
(LPBYTE)buffer,
&bufferSize);
if (result == ERROR_SUCCESS)
{
// buffer now contains the install directory
}