If you can run the program by lifting the user (run as administrator) you can simply take the postgres process that is running and look at its path:
Process[] ps = Process.GetProcessesByName("postgres");
foreach (Process p in ps)
{
FileInfo app = new FileInfo(p.MainModule.FileName);
string dir = app.Directory.FullName;
}
Obviously you don’t need the loop, just catch one.
The Result:
Having the briefcase bin
, you get access to other postgresql binaries.
On the user upgrade, you can put this next to the application, and when it runs, already request the upgrade.
Do these files have any extensions? Example: ". exe", ". txt"
– Francisco
Yes, they are ". exe"
– Bruno Silva