2013-10-07 1 views
0

J'essaie de créer un ensemble qui, avec postgresql, est une condition préalable. J'essaie de détecter postgresql en effectuant une recherche dans Registre comme suit:Échec de la recherche WiX Burn 3.7 et du registre Postgresql

<Fragment> 
<util:RegistrySearch Id ="PostgresqlPath_x64" 
    Root="HKLM" 
    Key="SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.1" 
    Result="exists" 
    Variable="PostgresqlInstalled_x64" 
    Win64="yes" /> 

<util:RegistrySearch Id="Postgresql_x86" 
    Root="HKLM" 
    Key="SOFTWARE\PostgreSQL\Installations\postgresql-9.1" 
    Result="exists" 
    Variable="PostgresqlInstalled_x86" 
    Win64="no"/> 

puis l'utiliser dans ExePackage:

<ExePackage SourceFile="..\..\bin\external_software\postgreSQL\postgresql-9.1.6-1-windows-x64.exe" 
       InstallCommand="$(var.PostgresqlInstallCommand)" 
       InstallCondition="VersionNT64" 
       DetectCondition="PostgresqlInstalled_x64" 
       PerMachine="yes" 
       Compressed="yes"/> 

    <ExePackage SourceFile="..\..\bin\external_software\postgreSQL\postgresql-9.1.6-1-windows.exe" 
       InstallCommand="$(var.PostgresqlInstallCommand)" 
       InstallCondition="(NOT VersionNT64)" 
       DetectCondition="PostgresqlInstalled_x86" 
       PerMachine="yes" Compressed="yes" /> 

Il évalue false même lorsque le Postgresql est installé , peu importe ce que Win Version (x86 ou x64) je suis en train de tester.
Est-ce que je fais quelque chose de mal ici ou? :/

Ici, le fichier journal de concurrence d'installation:

[072C:0664][2013-10-08T15:32:15]i001: Burn v3.7.1224.0, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Users\A521064\Desktop\sLIM_Bootstrapper.exe, cmdline: '' 
[072C:0664][2013-10-08T15:32:15]i000: Initializing string variable 'PostgresqlUninstall' to value 'PostgreSQL\9.1\uninstall-postgresql.exe' 
[072C:0664][2013-10-08T15:32:15]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215.log' 
[072C:0664][2013-10-08T15:32:15]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\A521064\Desktop\sLIM_Bootstrapper.exe' 
[072C:0664][2013-10-08T15:32:15]i052: Condition 'VersionNT >= v5.1' evaluates to true. 
[072C:0664][2013-10-08T15:32:15]i000: Setting string variable 'WixBundleName' to value 'sLIM Controller (Bundle)' 
[072C:0664][2013-10-08T15:32:16]i100: Detect begin, 3 packages 
[072C:0664][2013-10-08T15:32:16]i052: Condition 'PostgresqlInstalled_x64' evaluates to false. 
[072C:0664][2013-10-08T15:32:16]i052: Condition 'PostgresqlInstalled_x86 OR PostgresqlInstalled_x86_2' evaluates to false. 
[072C:0664][2013-10-08T15:32:16]i101: Detected package: postgresql_9.1.6_1_windows_x64.exe, state: Absent, cached: None 
[072C:0664][2013-10-08T15:32:16]i101: Detected package: postgresql_9.1.6_1_windows.exe, state: Absent, cached: None 
[072C:0664][2013-10-08T15:32:16]i101: Detected package: sLIMInstall.msi, state: Absent, cached: None 
[072C:0664][2013-10-08T15:32:16]i199: Detect complete, result: 0x0 
[072C:0664][2013-10-08T15:32:17]i200: Plan begin, 3 packages, action: Install 
[072C:0664][2013-10-08T15:32:17]i052: Condition 'VersionNT64' evaluates to true. 
[072C:0664][2013-10-08T15:32:17]w321: Skipping dependency registration on package with no dependency providers: postgresql_9.1.6_1_windows_x64.exe 
[072C:0664][2013-10-08T15:32:17]i000: Setting string variable 'WixBundleLog_postgresql_9.1.6_1_windows_x64.exe' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_0_postgresql_9.1.6_1_windows_x64.exe.log' 
[072C:0664][2013-10-08T15:32:17]i000: Setting string variable 'WixBundleRollbackLog_postgresql_9.1.6_1_windows_x64.exe' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_0_postgresql_9.1.6_1_windows_x64.exe_rollback.log' 
[072C:0664][2013-10-08T15:32:17]i052: Condition '(NOT VersionNT64)' evaluates to false. 
[072C:0664][2013-10-08T15:32:17]w321: Skipping dependency registration on package with no dependency providers: postgresql_9.1.6_1_windows.exe 
[072C:0664][2013-10-08T15:32:17]i052: Condition 'VersionNT64 >= v5.1' evaluates to true. 
[072C:0664][2013-10-08T15:32:17]i000: Setting string variable 'WixBundleRollbackLog_sLIMInstall.msi' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_1_sLIMInstall.msi_rollback.log' 
[072C:0664][2013-10-08T15:32:17]i000: Setting string variable 'WixBundleLog_sLIMInstall.msi' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_1_sLIMInstall.msi.log' 
[072C:0664][2013-10-08T15:32:17]i201: Planned package: postgresql_9.1.6_1_windows_x64.exe, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: None 
[072C:0664][2013-10-08T15:32:17]i201: Planned package: postgresql_9.1.6_1_windows.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None 
[072C:0664][2013-10-08T15:32:17]i201: Planned package: sLIMInstall.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register 
[072C:0664][2013-10-08T15:32:17]i299: Plan complete, result: 0x0 
[072C:0664][2013-10-08T15:32:17]i300: Apply begin 
[0B08:0AB8][2013-10-08T15:32:20]i360: Creating a system restore point. 
[0B08:0AB8][2013-10-08T15:32:33]i361: Created a system restore point. 
[0B08:0AB8][2013-10-08T15:32:33]i000: Caching bundle from: 'C:\Users\A521064\AppData\Local\Temp\{cef60084-9565-4990-b3d6-2704a4475eab}\.be\sLIM_Bootstrapper.exe' to: 'C:\ProgramData\Package Cache\{cef60084-9565-4990-b3d6-2704a4475eab}\sLIM_Bootstrapper.exe' 
[0B08:0AB8][2013-10-08T15:32:33]i320: Registering bundle dependency provider: {cef60084-9565-4990-b3d6-2704a4475eab}, version: 0.9.18.0 
[0B08:0960][2013-10-08T15:32:39]i305: Verified acquired payload: postgresql_9.1.6_1_windows_x64.exe at path: C:\ProgramData\Package Cache\.unverified\postgresql_9.1.6_1_windows_x64.exe, moving to: C:\ProgramData\Package Cache\E8DC6F6A96D4A4821F149FA9CA67B35C506645C1\postgresql-9.1.6-1-windows-x64.exe. 
[0B08:0960][2013-10-08T15:32:39]i305: Verified acquired payload: sLIMInstall.msi at path: C:\ProgramData\Package Cache\.unverified\sLIMInstall.msi, moving to: C:\ProgramData\Package Cache\{4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}v0.9.19\sLIMInstall.msi. 
[0B08:0AB8][2013-10-08T15:32:40]i301: Applying execute package: postgresql_9.1.6_1_windows_x64.exe, action: Install, path: C:\ProgramData\Package Cache\E8DC6F6A96D4A4821F149FA9CA67B35C506645C1\postgresql-9.1.6-1-windows-x64.exe, arguments: '"C:\ProgramData\Package Cache\E8DC6F6A96D4A4821F149FA9CA67B35C506645C1\postgresql-9.1.6-1-windows-x64.exe" --mode unattended --superpassword postgres --servicepassword postgres --debuglevel 4 --unattendedmodeui none --install_runtimes 0' 
[072C:0664][2013-10-08T15:34:01]i319: Applied execute package: postgresql_9.1.6_1_windows_x64.exe, result: 0x0, restart: None 
[0B08:0AB8][2013-10-08T15:34:01]i323: Registering package dependency provider: {4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}, version: 0.9.19, package: sLIMInstall.msi 
[0B08:0AB8][2013-10-08T15:34:01]i301: Applying execute package: sLIMInstall.msi, action: Install, path: C:\ProgramData\Package Cache\{4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}v0.9.19\sLIMInstall.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7"' 
[072C:0664][2013-10-08T15:34:42]i319: Applied execute package: sLIMInstall.msi, result: 0x0, restart: None 
[0B08:0AB8][2013-10-08T15:34:42]i325: Registering dependency: {cef60084-9565-4990-b3d6-2704a4475eab} on package provider: {4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}, package: sLIMInstall.msi 
[072C:0664][2013-10-08T15:34:42]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No 
[072C:0664][2013-10-08T15:34:45]i500: Shutting down, exit code: 0x0 
[072C:0664][2013-10-08T15:34:45]i410: Variable: PostgresqlUninstall = PostgreSQL\9.1\uninstall-postgresql.exe 
[072C:0664][2013-10-08T15:34:45]i410: Variable: VersionNT = 6.1.0.0 
[072C:0664][2013-10-08T15:34:45]i410: Variable: VersionNT64 = 6.1.0.0 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleAction = 4 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleElevated = 1 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleInstalled = 0 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleLog = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215.log 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleLog_postgresql_9.1.6_1_windows_x64.exe = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_0_postgresql_9.1.6_1_windows_x64.exe.log 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleLog_sLIMInstall.msi = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_1_sLIMInstall.msi.log 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleManufacturer = Atos IT Solutions and Services 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleName = sLIM Controller (Bundle) 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleOriginalSource = C:\Users\A521064\Desktop\sLIM_Bootstrapper.exe 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleProviderKey = {cef60084-9565-4990-b3d6-2704a4475eab} 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleRollbackLog_postgresql_9.1.6_1_windows_x64.exe = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_0_postgresql_9.1.6_1_windows_x64.exe_rollback.log 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleRollbackLog_sLIMInstall.msi = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008153215_1_sLIMInstall.msi_rollback.log 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleTag = 
[072C:0664][2013-10-08T15:34:45]i410: Variable: WixBundleVersion = 0.9.18.0 
[072C:0664][2013-10-08T15:34:45]i007: Exit code: 0x0, restarting: No 

Et Uninstall il ne trouve pas la clé reg:

[0AC0:05E0][2013-10-08T15:47:54]i001: Burn v3.7.1224.0, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Users\A521064\Desktop\sLIM_Bootstrapper.exe, cmdline: '' 
[0AC0:05E0][2013-10-08T15:47:54]i000: Initializing string variable 'PostgresqlUninstall' to value 'PostgreSQL\9.1\uninstall-postgresql.exe' 
[0AC0:05E0][2013-10-08T15:47:54]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008154754.log' 
[0AC0:05E0][2013-10-08T15:47:54]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\A521064\Desktop\sLIM_Bootstrapper.exe' 
[0AC0:05E0][2013-10-08T15:47:54]i052: Condition 'VersionNT >= v5.1' evaluates to true. 
[0AC0:05E0][2013-10-08T15:47:54]i100: Detect begin, 3 packages 
[0AC0:05E0][2013-10-08T15:47:54]i052: Condition 'PostgresqlInstalled_x64' evaluates to false. 
[0AC0:05E0][2013-10-08T15:47:54]i052: Condition 'PostgresqlInstalled_x86 OR PostgresqlInstalled_x86_2' evaluates to false. 
[0AC0:05E0][2013-10-08T15:47:54]i101: Detected package: postgresql_9.1.6_1_windows_x64.exe, state: Absent, cached: Complete 
[0AC0:05E0][2013-10-08T15:47:54]i101: Detected package: postgresql_9.1.6_1_windows.exe, state: Absent, cached: None 
[0AC0:05E0][2013-10-08T15:47:54]i101: Detected package: sLIMInstall.msi, state: Present, cached: Complete 
[0AC0:05E0][2013-10-08T15:47:54]i199: Detect complete, result: 0x0 
[0AC0:05E0][2013-10-08T15:48:07]i200: Plan begin, 3 packages, action: Uninstall 
[0AC0:05E0][2013-10-08T15:48:07]i000: Setting string variable 'WixBundleRollbackLog_sLIMInstall.msi' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008154754_0_sLIMInstall.msi_rollback.log' 
[0AC0:05E0][2013-10-08T15:48:07]i000: Setting string variable 'WixBundleLog_sLIMInstall.msi' to value 'C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008154754_0_sLIMInstall.msi.log' 
[0AC0:05E0][2013-10-08T15:48:07]w321: Skipping dependency registration on package with no dependency providers: postgresql_9.1.6_1_windows.exe 
[0AC0:05E0][2013-10-08T15:48:07]w321: Skipping dependency registration on package with no dependency providers: postgresql_9.1.6_1_windows_x64.exe 
[0AC0:05E0][2013-10-08T15:48:07]i201: Planned package: sLIMInstall.msi, state: Present, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, cache: No, uncache: Yes, dependency: Unregister 
[0AC0:05E0][2013-10-08T15:48:07]i201: Planned package: postgresql_9.1.6_1_windows.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None 
[0AC0:05E0][2013-10-08T15:48:07]i201: Planned package: postgresql_9.1.6_1_windows_x64.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None 
[0AC0:05E0][2013-10-08T15:48:07]i299: Plan complete, result: 0x0 
[0AC0:05E0][2013-10-08T15:48:07]i300: Apply begin 
[0600:0B3C][2013-10-08T15:48:09]i360: Creating a system restore point. 
[0600:0B3C][2013-10-08T15:48:19]i361: Created a system restore point. 
[0600:0B3C][2013-10-08T15:48:19]i326: Removed dependency: {cef60084-9565-4990-b3d6-2704a4475eab} on package provider: {4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}, package sLIMInstall.msi 
[0600:0B3C][2013-10-08T15:48:19]i329: Removed package dependency provider: {4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}, package: sLIMInstall.msi 
[0600:0B3C][2013-10-08T15:48:19]i301: Applying execute package: sLIMInstall.msi, action: Uninstall, path: C:\ProgramData\Package Cache\{4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}v0.9.19\sLIMInstall.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7"' 
[0AC0:05E0][2013-10-08T15:48:22]i319: Applied execute package: sLIMInstall.msi, result: 0x0, restart: None 
[0600:0B3C][2013-10-08T15:48:22]i351: Removing cached package: sLIMInstall.msi, from path: C:\ProgramData\Package Cache\{4E9DAE71-AC58-4A0C-A63F-2AC752C983EF}v0.9.19\ 
[0600:0B3C][2013-10-08T15:48:22]i351: Removing cached package: postgresql_9.1.6_1_windows_x64.exe, from path: C:\ProgramData\Package Cache\E8DC6F6A96D4A4821F149FA9CA67B35C506645C1\ 
[0600:0B3C][2013-10-08T15:48:22]i330: Removed bundle dependency provider: {cef60084-9565-4990-b3d6-2704a4475eab} 
[0600:0B3C][2013-10-08T15:48:22]i352: Removing cached bundle: {cef60084-9565-4990-b3d6-2704a4475eab}, from path: C:\ProgramData\Package Cache\{cef60084-9565-4990-b3d6-2704a4475eab}\ 
[0AC0:05E0][2013-10-08T15:48:23]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No 
[0AC0:05E0][2013-10-08T15:48:43]i500: Shutting down, exit code: 0x0 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: PostgresqlUninstall = PostgreSQL\9.1\uninstall-postgresql.exe 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: VersionNT = 6.1.0.0 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleAction = 3 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleElevated = 1 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleInstalled = 1 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleLog = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008154754.log 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleLog_sLIMInstall.msi = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008154754_0_sLIMInstall.msi.log 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleManufacturer = Atos IT Solutions and Services 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleName = sLIM Controller (Bundle) 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleOriginalSource = C:\Users\A521064\Desktop\sLIM_Bootstrapper.exe 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleProviderKey = {cef60084-9565-4990-b3d6-2704a4475eab} 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleRollbackLog_sLIMInstall.msi = C:\Users\A521064\AppData\Local\Temp\sLIM_Controller_(Bundle)_20131008154754_0_sLIMInstall.msi_rollback.log 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleTag = 
[0AC0:05E0][2013-10-08T15:48:43]i410: Variable: WixBundleVersion = 0.9.18.0 
[0AC0:05E0][2013-10-08T15:48:43]i007: Exit code: 0x0, restarting: No 

RegSearch de mes travaux MSI:

<Property Id="POSTGRESQLX64"> 
     <RegistrySearch Id='PostgresqlX64RegSearch' 
       Root='HKLM' 
       Key='SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.1' 
       Name="Version" 
       Win64="yes"  
       Type ="raw" /> 
    </Property> 

Et le journal:

AppSearch: Property: POSTGRESQLX64, Signature: PostgresqlX64RegSearch 
MSI (c) (08:4C) [15:34:04:011]: Note: 1: 2262 2: Signature 3: -2147287038 
MSI (c) (08:4C) [15:34:04:011]: PROPERTY CHANGE: Adding POSTGRESQLX64 property. Its value is '9.1.6.1'. 
AppSearch: Property: POSTGRESQL_SERVICE, Signature: PostgresqlServiceRegSearch 
+0

Pouvez-vous envoyer le fichier journal complet? –

+0

@StephenJennings s'il vous plaît jeter un oeil à ma dernière édition –

Répondre

1

Burn n'appelle aucun de vos éléments RegistrySearch car vous les avez définis dans un <Fragment> mais vous ne les avez pas référencés dans votre <Bundle>.

Vous pouvez faire une des opérations suivantes:

  • Ajouter <util:RegistrySearchRef> éléments à l'intérieur de votre <Bundle>
  • Nest les <util:RegistrySearch> éléments sous <Bundle>

Selon Rob Mensching dans une liste de diffusion après, referencing an item in a fragment with a <FoobarRef> element brings in the whole fragment :

Lorsqu'une chose est référencée dans un fragment, le fragment entier est tiré ... Les autres éléments que vous énumérez sont généralement des éléments de support, donc ils peuvent entrer avec un élément qui peut être référencé. Par exemple, les éléments XxxSequence peuvent être placés dans un fragment avec l'action CustomAction planifiée. Ensuite, vous utilisez un CustomActionRef pour dire, "Hey, je veux que CustomAction et je ne veux pas penser à la façon dont il est planifié."

Lorsque les <RegistrySearch> éléments sont référencés, vous verrez les entrées du journal comme celui-ci:

[2218:2F1C][2013-10-09T10:59:02]i000: Setting numeric variable 'PostgresqlInstalled_x64' to value 0 
+0

Impossible de voter, mais cela a fonctionné. J'ai mal compris la partie du fragment. @StephenJennings –

+0

@ A.K. Si cela a fonctionné, veuillez marquer la réponse comme acceptée. Heureux de vous aider. –

Questions connexes