Установка пропущена SQL Server с wix - PullRequest
0 голосов
/ 24 сентября 2018

Это мой код, я хочу установить SQL Server Express с моим пакетом msi.Но при установке он пропустил SQL Server и установил только оставшуюся часть пакета MSI.И при удалении он не может удалить SQL Server и выдает ошибку.

В чем моя ошибка?Пожалуйста, помогите мне.Я хочу установить SQL Server Express и установить MSI и использовать проверку подлинности Windows для контакта.

<?define InstanceName = "MSSQLSERVER" ?> 
<?define InstanceNameExpress = "SQLEXPRESS" ?> 
<?define ServerInstall="SomeCondition" ?>

<?define InstanceName = "YOUR_INSTANCE" ?>
<?define SqlWebLink = http://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPR_x86_ENU.exe ?>

<util:RegistrySearch
  Id="SqlInstanceKeyFound"
  Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" Win64="yes" Value="$(var.InstanceName)"
  Result="exists" Variable="SqlInstanceKeyFound" />
<util:RegistrySearch
  Id="SqlInstanceKey"
  Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" Win64="yes" Value="$(var.InstanceName)"
  Variable="SqlInstanceKey" After="SqlInstanceKeyFound"  Condition="SqlInstanceKeyFound" />
<util:RegistrySearch
  Id="SqlInstanceFound"
  Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SqlInstanceKey]"
  Result="exists" Variable="SqlInstanceFound" Win64="yes" After="SqlInstanceKey" Condition="SqlInstanceKeyFound" />
<util:RegistrySearch
  Id="SqlVersion"
  Root="HKLM" Key="SOFTWARE\Microsoft\Microsoft SQL Server\[SqlInstanceKey]\Setup" Value="Version"
  Variable="SqlVersion" After="SqlInstanceKey" Win64="yes" Condition="SqlInstanceFound" />



    <Chain>
<!--
<PackageGroupRef Id="NetFx47Web"/>

     -->


      <PackageGroupRef Id="Sql2012Express"/>


      <RollbackBoundary />

      <MsiPackage Id="MyApplication" SourceFile="$(var.SetupProject1.TargetPath)" DisplayInternalUI="yes" Compressed="yes" Vital="yes"/>

    </Chain>
  </Bundle>

  <Fragment>

    <PackageGroup Id="Sql2012Express">
  <!--
    SQL Server 2012 Express - Install new instance
    http://msdn.microsoft.com/en-us/library/ms144259.aspx
    SQL Server Express requires WIndows Installer 4.5
    RepairCommand="/ACTION=Repair /INSTANCENAME=$(var.InstanceName) /Q /HIDECONSOLE"
  -->
      <ExePackage Id="Sql2012Express"
        DisplayName="SQL Server 2012 Express"
        Cache="yes"
        Compressed="yes"
        PerMachine="yes"
        Permanent="no"
        Vital="yes"
        Name="Redist\SQLEXPR_x86_ENU.exe"
        SourceFile=".\prerequisites\SQLEXPRADV_x64_ENU.exe"
        DownloadUrl="$(var.SqlWebLink)"
        InstallCommand='/IACCEPTSQLSERVERLICENSETERMS /HIDECONSOLE /INSTANCEID="$(var.InstanceName)" /ACTION="Install" /FEATURES=SQLENGINE /HELP="False" /INDICATEPROGRESS="False" /QUIET="True" /QUIETSIMPLE="False" /ERRORREPORTING="False" /SQMREPORTING="False" /INSTANCENAME="$(var.InstanceName)" /AGTSVCSTARTUPTYPE="Manual" /ISSVCSTARTUPTYPE="Automatic" /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASSVCSTARTUPTYPE="Automatic" /ASCOLLATION="Latin1_General_CI_AS" /ASDATADIR="Data" /ASLOGDIR="Log" /ASBACKUPDIR="Backup" /ASTEMPDIR="Temp" /ASCONFIGDIR="Config" /ASPROVIDERMSOLAP="1" /SQLSVCSTARTUPTYPE="Automatic" /FILESTREAMLEVEL="0" /ENABLERANU="True" /SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS" /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ADDCURRENTUSERASSQLADMIN="True" /TCPENABLED="0" /NPENABLED="0" /BROWSERSVCSTARTUPTYPE="Disabled" /RSSVCSTARTUPTYPE="Automatic" /RSINSTALLMODE="FilesOnlyMode" /SECURITYMODE=SQL /SAPWD="tomsoN_admin_1032"'


        UninstallCommand="/Action=Uninstall /INSTANCENAME=$(var.InstanceName) /FEATURES=SQL /Q "
        DetectCondition="NOT (SqlInstanceFound AND (SqlVersion &lt; v15.0.1000.169))"
        InstallCondition="NOT (SqlInstanceFound AND (SqlVersion &lt; v15.0.1000.169))">
        <ExitCode Value ="3010" Behavior="forceReboot" />
        <dep:Provides DisplayName="Net2 SQL Server 2012 Express" Key="SQLServer2012Express,$(var.InstanceName)" Version="11.0.3000.0" />
      </ExePackage>

это мой вывод.

[2074:1E98][2018-09-24T11:42:04]i001: Burn v3.11.1.2318, Windows v10.0 (Build 16299: Service Pack 0), path: C:\Users\orhan12\AppData\Local\Temp\{F1FD8805-8AE6-4488-BE25-09A17DC0E8F6}\.cr\FlownetMasterSetup.exe
[2074:1E98][2018-09-24T11:42:04]i009: Command Line: '-burn.clean.room=C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\FlownetMasterSetup.exe -burn.filehandle.attached=608 -burn.filehandle.self=612'
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\FlownetMasterSetup.exe'
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\'
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\orhan12\AppData\Local\Temp\FLOWNETMASTER_20180924114204.log'
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'WixBundleName' to value 'FLOWNETMASTER'
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'WixBundleManufacturer' to value 'Melina-Aero'
[2074:2EB8][2018-09-24T11:42:04]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
[2074:2EB8][2018-09-24T11:42:04]i000: Setting version variable 'WixBundleFileVersion' to value '1.0.0.1'
[2074:1E98][2018-09-24T11:42:04]i100: Detect begin, 2 packages
[2074:1E98][2018-09-24T11:42:04]i000: Registry value not found. Key = 'SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL', Value = 'YOUR_INSTANCE'
[2074:1E98][2018-09-24T11:42:04]i000: Setting numeric variable 'SqlInstanceKeyFound' to value 0
[2074:1E98][2018-09-24T11:42:04]i052: Condition 'SqlInstanceKeyFound' evaluates to false.
[2074:1E98][2018-09-24T11:42:04]i052: Condition 'SqlInstanceKeyFound' evaluates to false.
[2074:1E98][2018-09-24T11:42:04]i052: Condition 'SqlInstanceFound' evaluates to false.
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'Netfx4x64FullVersion' to value '4.7.03062'
[2074:1E98][2018-09-24T11:42:04]i000: Setting string variable 'Netfx4FullVersion' to value '4.7.03062'
[2074:1E98][2018-09-24T11:42:04]i102: Detected related bundle: {07cab931-fdbc-4f40-8f72-71b95e6e83af}, type: Upgrade, scope: PerMachine, version: 1.0.0.1, operation: None
[2074:1E98][2018-09-24T11:42:04]i102: Detected related bundle: {38cbc870-30a1-42ac-aea1-aa610d5080c1}, type: Upgrade, scope: PerMachine, version: 1.0.0.1, operation: None
[2074:1E98][2018-09-24T11:42:04]i052: Condition 'NOT (SqlInstanceFound AND (SqlVersion < v15.0.1000.169))' evaluates to true.
[2074:1E98][2018-09-24T11:42:04]i101: Detected package: Sql2012Express, state: Present, cached: None
[2074:1E98][2018-09-24T11:42:04]i101: Detected package: MyApplication, state: Absent, cached: None
[2074:1E98][2018-09-24T11:42:04]i199: Detect complete, result: 0x0
[2074:2EB8][2018-09-24T11:42:06]i000: Setting numeric variable 'EulaAcceptCheckbox' to value 1
[2074:1E98][2018-09-24T11:42:06]i200: Plan begin, 2 packages, action: Install
[2074:1E98][2018-09-24T11:42:06]i052: Condition 'NOT (SqlInstanceFound AND (SqlVersion < v15.0.1000.169))' evaluates to true.
[2074:1E98][2018-09-24T11:42:06]i000: Setting string variable 'WixBundleRollbackLog_MyApplication' to value 'C:\Users\orhan12\AppData\Local\Temp\FLOWNETMASTER_20180924114204_000_MyApplication_rollback.log'
[2074:1E98][2018-09-24T11:42:06]i000: Setting string variable 'WixBundleLog_MyApplication' to value 'C:\Users\orhan12\AppData\Local\Temp\FLOWNETMASTER_20180924114204_000_MyApplication.log'
[2074:1E98][2018-09-24T11:42:06]i201: Planned package: Sql2012Express, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: Register
[2074:1E98][2018-09-24T11:42:06]i201: Planned package: MyApplication, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[2074:1E98][2018-09-24T11:42:06]i207: Planned related bundle: {07cab931-fdbc-4f40-8f72-71b95e6e83af}, type: Upgrade, default requested: None, ba requested: None, execute: None, rollback: None, dependency: None
[2074:1E98][2018-09-24T11:42:06]i207: Planned related bundle: {38cbc870-30a1-42ac-aea1-aa610d5080c1}, type: Upgrade, default requested: None, ba requested: None, execute: None, rollback: None, dependency: None
[2074:1E98][2018-09-24T11:42:06]i299: Plan complete, result: 0x0
[2074:1E98][2018-09-24T11:42:06]i300: Apply begin
[2074:1E98][2018-09-24T11:42:06]i010: Launching elevated engine process.
[2074:1E98][2018-09-24T11:42:07]i011: Launched elevated engine process.
[2074:1E98][2018-09-24T11:42:08]i012: Connected to elevated engine.
[29F0:2608][2018-09-24T11:42:08]i358: Pausing automatic updates.
[29F0:2608][2018-09-24T11:42:08]i359: Paused automatic updates.
[29F0:2608][2018-09-24T11:42:08]i360: Creating a system restore point.
[29F0:2608][2018-09-24T11:42:08]i361: Created a system restore point.
[29F0:2608][2018-09-24T11:42:08]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{19af776a-0c57-4d9b-9cb3-f7b541bfe755}, options: 0x7, disable resume: No
[29F0:2608][2018-09-24T11:42:08]i000: Caching bundle from: 'C:\Users\orhan12\AppData\Local\Temp\{16AAE7B9-F2C5-4923-952F-AF9F7AD27A3A}\.be\FlownetMasterSetup.exe' to: 'C:\ProgramData\Package Cache\{19af776a-0c57-4d9b-9cb3-f7b541bfe755}\FlownetMasterSetup.exe'
[29F0:2608][2018-09-24T11:42:08]i320: Registering bundle dependency provider: {19af776a-0c57-4d9b-9cb3-f7b541bfe755}, version: 1.0.0.1
[29F0:2608][2018-09-24T11:42:08]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{19af776a-0c57-4d9b-9cb3-f7b541bfe755}, resume: Active, restart initiated: No, disable resume: No
[29F0:2A84][2018-09-24T11:42:08]i305: Verified acquired payload: MyApplication at path: C:\ProgramData\Package Cache\.unverified\MyApplication, moving to: C:\ProgramData\Package Cache\{70ED3308-C6DB-43AA-B371-E739E4BD3D7D}v1.0.0.7\FlowNet Master.msi.
[29F0:2608][2018-09-24T11:42:08]i323: Registering package dependency provider: SQLServer2012Express,YOUR_INSTANCE, version: 11.0.3000.0, package: Sql2012Express
[29F0:2608][2018-09-24T11:42:08]i325: Registering dependency: {19af776a-0c57-4d9b-9cb3-f7b541bfe755} on package provider: SQLServer2012Express,YOUR_INSTANCE, package: Sql2012Express
[29F0:2608][2018-09-24T11:42:08]i323: Registering package dependency provider: {70ED3308-C6DB-43AA-B371-E739E4BD3D7D}, version: 1.0.0.7, package: MyApplication
[29F0:2608][2018-09-24T11:42:08]i301: Applying execute package: MyApplication, action: Install, path: C:\ProgramData\Package Cache\{70ED3308-C6DB-43AA-B371-E739E4BD3D7D}v1.0.0.7\FlowNet Master.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7"'
[2074:1E98][2018-09-24T11:42:19]i319: Applied execute package: MyApplication, result: 0x0, restart: None
[29F0:2608][2018-09-24T11:42:19]i325: Registering dependency: {19af776a-0c57-4d9b-9cb3-f7b541bfe755} on package provider: {70ED3308-C6DB-43AA-B371-E739E4BD3D7D}, package: MyApplication
[29F0:2608][2018-09-24T11:42:19]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{19af776a-0c57-4d9b-9cb3-f7b541bfe755}, resume: ARP, restart: None, disable resume: No
[29F0:2608][2018-09-24T11:42:19]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{19af776a-0c57-4d9b-9cb3-f7b541bfe755}, resume: ARP, restart initiated: No, disable resume: No
[2074:1E98][2018-09-24T11:42:20]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
[2074:1E98][2018-09-24T11:42:21]i500: Shutting down, exit code: 0x0
[2074:1E98][2018-09-24T11:42:21]i410: Variable: EulaAcceptCheckbox = 1
[2074:1E98][2018-09-24T11:42:21]i410: Variable: Netfx4FullVersion = 4.7.03062
[2074:1E98][2018-09-24T11:42:21]i410: Variable: Netfx4x64FullVersion = 4.7.03062
[2074:1E98][2018-09-24T11:42:21]i410: Variable: SqlInstanceKeyFound = 0
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleAction = 5
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleElevated = 1
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleFileVersion = 1.0.0.1
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleInstalled = 0
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleLog = C:\Users\orhan12\AppData\Local\Temp\FLOWNETMASTER_20180924114204.log
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleLog_MyApplication = C:\Users\orhan12\AppData\Local\Temp\FLOWNETMASTER_20180924114204_000_MyApplication.log
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleManufacturer = Melina-Aero
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleName = FLOWNETMASTER
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleOriginalSource = C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\FlownetMasterSetup.exe
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleOriginalSourceFolder = C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleProviderKey = {19af776a-0c57-4d9b-9cb3-f7b541bfe755}
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleRollbackLog_MyApplication = C:\Users\orhan12\AppData\Local\Temp\FLOWNETMASTER_20180924114204_000_MyApplication_rollback.log
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleSourceProcessFolder = C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleSourceProcessPath = C:\Users\orhan12\source\repos\PropulsimCS\Propulsim\FlownetMasterSetup\bin\Debug\FlownetMasterSetup.exe
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleTag = 
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleUILevel = 4
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixBundleVersion = 1.0.0.1
[2074:1E98][2018-09-24T11:42:21]i410: Variable: WixStdBALanguageId = 1033
[2074:1E98][2018-09-24T11:42:21]i007: Exit code: 0x0, restarting: No

Редактировать: я отредактировал свой код и удалил условие обнаружения и установки, оно работает, оно не пропускает, но почему пропускает это условие, почему не работает

...