Ineed to open this key" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\"
and get the "VerSpecificRootDir" value using c++ ....How can i do this
I have no knowledge abt it can any one help me in this regard..
After Getting All The Support I did it as
unsigned long type=REG_SZ, size=1024; char res[1024]=""; HKEY hk; long n = RegOpenKeyEx(HKEY_LOCAL_MACHINE,TEXT("SOFTWARE\\Microsoft\\Microsoft SQL Server\\100"), 0,KEY_QUERY_VALUE, &hk ); if ( n == ERROR_SUCCESS ) { printf("OK \n"); RegQueryValueEx(hk,L"VerSpecificRootDir",NULL,&type,(LPBYTE)&res[0],&size); RegCloseKey(hk); } But in this i am not getting the value of "VerSpecificDirectory" what i have missed let me know?? what is wrong in this code....