if(NS_LoadString(hInst, IDS_ERROR_UNINSTALL_LOG_FOLDER, szEUninstallLogFolder, MAX_BUF) == WIZ_OK)
if(GetPrivateProfileString("Messages", "ERROR_UNINSTALL_LOG_FOLDER", "", szEUninstallLogFolder, sizeof(szEUninstallLogFolder), szFileIniUninstall))
HRESULT GetUninstallLogPath(){  char szBuf[MAX_BUF];  char szLogFolder[MAX_BUF];  char szKey[MAX_BUF];  char szWindowsUninstallKey[MAX_BUF];  char szErrorMsg[MAX_BUF];  char szEUninstallLogFolder[MAX_BUF];  char szRootKey[MAX_BUF];  HKEY hkRoot;  if(*ugUninstall.szUserAgent != '\0')  {    hkRoot = ugUninstall.hWrMainRoot;    lstrcpy(szKey, ugUninstall.szWrMainKey);    AppendBackSlash(szKey, sizeof(szKey));    lstrcat(szKey, ugUninstall.szUserAgent);    AppendBackSlash(szKey, sizeof(szKey));    lstrcat(szKey, "Uninstall");  }  else  {    hkRoot = ugUninstall.hWrRoot;    strcpy(szKey, ugUninstall.szWrKey);  }  GetWinReg(hkRoot, szKey, "Uninstall Log Folder",   szLogFolder, sizeof(szLogFolder));  GetWinReg(hkRoot, szKey, "Description",            ugUninstall.szUninstallKeyDescription, sizeof(szLogFolder));  lstrcpy(szWindowsUninstallKey, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\");  lstrcat(szWindowsUninstallKey, ugUninstall.szUninstallKeyDescription);  GetWinReg(HKEY_LOCAL_MACHINE, szWindowsUninstallKey, "DisplayName", ugUninstall.szDescription, sizeof(szLogFolder));  /* if the DisplayName was not found in the windows registry,   * use the description from read in from config.ini file */  if(*ugUninstall.szDescription == '\0')    lstrcpy(ugUninstall.szDescription, ugUninstall.szUninstallKeyDescription);  if(FileExists(szLogFolder) == FALSE)  {    if(NS_LoadString(hInst, IDS_ERROR_UNINSTALL_LOG_FOLDER, szEUninstallLogFolder, MAX_BUF) == WIZ_OK)    {      lstrcpy(szBuf, "\n\n    ");      if(*szLogFolder == '\0')      {        GetStringRootKey(hkRoot, szRootKey, sizeof(szRootKey));        lstrcat(szBuf, szRootKey);        lstrcat(szBuf, "\\");        lstrcat(szBuf, szKey);        lstrcat(szBuf, "\\Uninstall Log Folder");      }      else        lstrcat(szBuf, szLogFolder);      lstrcat(szBuf, "\n");      wsprintf(szErrorMsg, szEUninstallLogFolder, szBuf);      PrintError(szErrorMsg, ERROR_CODE_SHOW);    }    return(1);  }  lstrcpy(ugUninstall.szLogPath, szLogFolder);  return(0);}