If you can run the program by elevating the user (run as administrator) you can simply pick up the postgres process that is running and look at the path of it:
Process[] ps = Process.GetProcessesByName("postgres");
foreach (Process p in ps)
{
FileInfo app = new FileInfo(p.MainModule.FileName);
string dir = app.Directory.FullName;
}
Obviously you do not need the loop, just grab one.
The Result:
Having the bin
folder, you get access to the other postgresql binaries.
On user elevation, you can place this next to the application, and when it is executed, request elevation.