0
我正在使用WIX創建用於創建數據庫的安裝程序。但是我無法找到在升級期間運行udate腳本的方法。在升級過程中使用WIX安裝程序在現有數據庫上運行更新sql腳本
代碼創建DB
<Directory Id="DFDB" Name="DealFoundryDataBase" FileSource="$(var.SolutionDir)DealFoundrySetup/DataBaseScripts">
<Component Id='SqlComponent_Files' Guid='{07DB58E6-5AFC-4BB0-84EC-C5EC6B0E5CA7}' KeyPath='yes'>
<File Id="CreateTable_sql" Name="CreateTable.sql"/>
<File Id="InsertStatements_sql" Name="InsertStatements.sql"/>
<File Id="DFCoreScript_sql" Name="DFCoreScript.sql"/>
</Component>
<Component Id='SqlComponent' Guid='{C5412828-84FB-4CC5-AC71-AC246B9D09E8}' KeyPath='yes'>
<Condition><![CDATA[NOT OLDER_VERSION_FOUND]]> </Condition>
<sql:SqlDatabase Id='SqlDatabase' Database='[PRO_DFDATABASE_NAME]' User='SQLUser' Server='[PRO_DFDATABASE_SOURCE]'
CreateOnInstall='yes' DropOnUninstall='yes' ContinueOnError='yes'>
<sql:SqlScript Id='CreateTable' BinaryKey='CreateTable' ExecuteOnInstall='yes' />
<!--<sql:SqlScript Id='InsertStatements' BinaryKey='InsertStatements' ExecuteOnInstall='yes'/>-->
</sql:SqlDatabase>
</Component>
</Directory>
<Binary Id ='CreateTable' SourceFile='$(var.SolutionDir)DealFoundrySetup/DataBaseScripts/DFCoreScript.sql'/>
<Binary Id ='InsertStatements' SourceFile='$(var.SolutionDir)DealFoundrySetup/DataBaseScripts/InsertStatements.sql'/>
<Binary Id ='MasterData' SourceFile='$(var.SolutionDir)DealFoundrySetup/DataBaseScripts/MasterData.sql'/>
<util:User Id='SQLUser' Name='[PRO_DFDATABASE_USERID]' Password='[PRO_DFDATABASE_PASSWORD]' />
上面的代碼行工作正常進行creting數據庫上安裝,但我要對現有的DB PLZ幫我升級過程中運行更新腳本。 在此先感謝。