Index: pgAdmin3.cpp =================================================================== RCS file: /projects/pgadmin3/src/pgAdmin3.cpp,v retrieving revision 1.105 retrieving revision 1.106 diff -Lsrc/pgAdmin3.cpp -Lsrc/pgAdmin3.cpp -u -w -r1.105 -r1.106 --- src/pgAdmin3.cpp +++ src/pgAdmin3.cpp @@ -109,6 +109,26 @@ wxPathList path; path.Add(loadPath); + +#ifdef __WIN32__ + + // Look for a path 'hint' on Windows. This registry setting may + // be set by the Win32 PostgreSQL installer which will generally + // install pg_dump et al. in the PostgreSQL bindir rather than + // the pgAdmin directory. + wxString key; + key << wxT("HKEY_LOCAL_MACHINE\\Software\\") << APPNAME_L; + wxRegKey *hintKey = new wxRegKey(key); + + if (hintKey->HasValue(wxT("Helper Path"))) + { + wxString hintPath; + hintKey->QueryValue(wxT("Helper Path"), hintPath); + path.Add(hintPath); + } + +#endif + path.AddEnvList(wxT("PATH")); // evaluate all working paths