Reputation: 1386
This is somewhat an update to question1 and question2. After realizing that postgres could be bundled with its database already initialized, and even with mock-up data inside (yay) I modified my NSIS installer to just copy-paste the postgres inside the installation folder of my application and then create and start it as a Service listening to a non-standard port.
The problem is that when the application is installed in the Program Files
folder the Service is created, but cannot start. Either from the command line or from the Services Windows Dialog I get the following error:
The My App Postgre Server service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
If postgre is installed outside system folders, e.g. D:\My App\pgsql\
everything works fine - the service starts and the database is accessible trough my application.
This seems like a permission issue, but I can't get around it.
Upvotes: 0
Views: 918
Reputation: 1386
As for now all the information I have encountered points that Postgres cannot be started from the Program Files
or any other System folder. I have seen other similar applications using it and installing it C:\postgres
in order to make it work.
Upvotes: 1