我有一个使用 Postgresql 作为数据库引擎的 WPF 应用程序。我想安装 Postgresql 引擎并将 application-Db 恢复/附加到它。
应用程序的用户是非技术人员,他们不能单独安装 Postgresql。
最佳答案
The application's users are non-technical people and they can not install Postgresql individually.
然后试试这个,静默安装 PostgreSQL,我们在我们的软件部署中使用类似的代码
C:\Installer\postgresql-9.0.2-1-windows.exe --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended
将其作为bat文件运行,在后台安装
- postgresql-9.0.2-1-windows.exe
这是你的exe
- serverport 5432
这是您要安装 Postgres 的端口号
- superaccount Myadmin
您使用的是账户名
- superpassword Mypassword
您的用户密码
其余的保持不变。
这将直接安装到 c:\Program Files
关于c# - 沿 Windows 应用程序部署 Postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10752164/