我正在使用wix工具集开发.net应用程序的安装程序,我想创建一个UI对话框进行升级。
暂时,我已经使用wix为UI创建了对话框。像这样:
<Dialog Id="ResumeDlg" Width="370" Height="270" Title="QCStats Setup" NoMinimize="yes">
<Control Id="Install" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="[ButtonText_Install]">
<Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfRbDiskDlg"><![CDATA[OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)]]></Publish>
<Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"]]></Publish>
<Publish Event="EnableRollback" Value="False"><![CDATA[OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"]]></Publish>
<Publish Event="SpawnDialog" Value="OutOfDiskDlg"><![CDATA[(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")]]></Publish>
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="[ButtonText_Cancel]">
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
</Control>
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="[DialogBitmap]" />
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="[ButtonText_Back]" />
<Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="30" Transparent="yes" NoPrefix="yes">
<Text>The Setup will complete the installation of QCStats on your computer. Click Install to continue or Cancel to exit the Setup.</Text>
</Control>
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes">
<Text>{\VerdanaBold13}Resuming the QCStats Setup</Text>
</Control>
</Dialog>
我想做什么?
我想检测是否已安装一个版本,以及新版本是否大于当前版本,以显示带有某些选项的升级对话框(例如保留旧日期并删除或不删除数据库)。
我不想删除旧版本并安装没有该对话框的新版本。
也许我可以在InstallUISequence中定义一些内容?
<InstallUISequence>
<Show Dialog="FatalError" OnExit="error" />
<Show Dialog="UserExit" OnExit="cancel" />
<Show Dialog="ExitDialog" OnExit="success" />
<Show Dialog="PrepareDlg" After="LaunchConditions" />
<Show Dialog="WelcomeDlg" After="MigrateFeatureStates">NOT Installed</Show>
<Show Dialog="ResumeDlg" After="WelcomeDlg">Installed AND (RESUME OR Preselected)</Show>
<Show Dialog="MaintenanceWelcomeDlg" After="ResumeDlg">Installed AND NOT RESUME AND NOT Preselected</Show>
<Show Dialog="ProgressDlg" After="MaintenanceWelcomeDlg" />
</InstallUISequence>
有人知道我该怎么做或是否有可能这样做?
谢谢