【发布时间】:2012-11-07 13:10:13
【问题描述】:
我正在尝试使用我的 WiX 安装程序部署 PostGreSqlServer,但它只是一直失败,我不知道为什么。
我的 wxs 文件的重要部分:
<Binary SourceFile="postgresql-9.2.1-1-windows.exe" Id="PostGreInstaller" />
<CustomAction Id="InstallPostGre" BinaryKey="PostGreInstaller"
ExeCommand='"--serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended"'
Execute="deferred" Return="check" Impersonate="yes" />
<InstallExecuteSequence>
<Custom Action="InstallPostGre" Before="InstallFinalize" />
</InstallExecuteSequence>
已经在 cmd shell 中尝试过该命令,并且成功了。不要为什么它不在安装程序中。
我确定安装程序已嵌入安装程序,因为它有超过 50MB。
我也开启了我的 msi 并开启了日志记录,但这也对我没有帮助...
Action 16:34:29: InstallPostGre.
MSI (s) (64:E0) [16:34:29:407]: Executing op: CustomActionSchedule(Action=InstallPostGre,ActionType=1026,Source=BinaryData,Target=--serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended,)
MSI (s) (64:E0) [16:34:31:698]: Note: 1: 1721 2: InstallPostGre 3: C:\Windows\Installer\MSIE410.tmp 4: --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended
MSI (s) (64:E0) [16:34:31:698]: Note: 1: 2205 2: 3: Error
MSI (s) (64:E0) [16:34:31:698]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1721
Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallPostGre, location: C:\Windows\Installer\MSIE410.tmp, command: --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended
MSI (s) (64:E0) [16:34:34:717]: Note: 1: 2205 2: 3: Error
MSI (s) (64:E0) [16:34:34:717]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (64:E0) [16:34:34:717]: Product: Hausverwaltung -- Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: InstallPostGre, location: C:\Windows\Installer\MSIE410.tmp, command: --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended
那里有 WiX 大师吗? :)
【问题讨论】:
-
请不要将这样的安装程序与通用应用程序一起分发。计算机的用户可能已经安装了 PostgreSQL,在这种情况下安装将失败。或者他们将来可能想这样做,并且会想知道为什么他们找到的指令都不起作用 - 因为您的程序使用您自己的超级用户帐户和密码静默安装了 PostgreSQL。通常最好使用 .zip 二进制文件,然后使用 initdb 并自己创建服务帐户。
-
@raphi011 你能解决这个问题吗? :D
标签: postgresql installation wix embedded-resource