Detecting all previous postgres install
Hi everybody,
This is the first time I post in NSIS forum so please forgive my ignorance ;)
I have to detect if postgreSQL is already installed on a computer. I searched on the web and read many things doing this, but they did not help me.
Do I have to check in the registry if there is a SOFTWARE\PostgreSQL\... key in the registry or if a service is present ? What is the best solution ?
The solution I choose is the 2nd one (it may not be the right one...). I use 'Services' plugin for NSIS. But problem is that there are several versions of postgreSQL, so do I have to try every version of them with :
services::IsServiceInstalled 'postgresql-8.3'
services::IsServiceInstalled 'postgresql-8.2'
services::IsServiceInstalled 'postgresql-8.1'...
?
Thank you in advance for help/advices.