Visual Studio 설치 프로젝트를 사용할 때 설치가 실패하면 이전 버전의 설치로 되돌아가 이전 파일을 복원합니다. 그러나 WiX 설치 프로그램을 사용할 때 설치가 실패하면 WiX 설치 프로그램이 설치된 폴더의 모든 파일을 제거합니다. 설치가 실패 할 때 WiX installer가 이전 파일을 복원하도록하려면 어떻게합니까?이전 버전의 wix installer 되돌리기
감사합니다.
이
는 Windows 서비스에 대한 윅스 설치의 Product.wxs에 있습니다<Product Id="*" Name="WixWindowsService2012" Language="1033" Version="1.0.0.1" Manufacturer="aaa" UpgradeCode="blabla">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platforms="x64"/>
<Upgrade Id="blabla">
<UpgradeVersion OnlyDetect="no" Property="PREVIOUSFOUND"
Minimum="1.0.0.0" IncludeMinimum="yes"
Maximum="99.0.0.0" IncludeMaximum="no" />
</Upgrade>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="WixWindowsService2012" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
:
<Component Id="ProductComponent" Win64="yes">
<File Id="WixWindowsService2012.exe" Name="WixWindowsService2012.exe" Source="$(var.WixWindowsService2012.TargetPath)" Vital="yes" KeyPath="yes" DiskId="1"/>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="WixWindowsService2012"
DisplayName="WixWindowsService2012"
Description="A test for WiX installation for Windows Service"
Start="auto"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no"></ServiceInstall>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="WixWindowsService2012" Wait="yes" />
</Component>
빠른 답장을 보내 주셔서 감사합니다. 아래처럼 MajorUpgrade 요소에 Schedule = "afterInstallInitialize"를 추가하면 필요한 작업이 수행됩니다. 다시 한 번 감사드립니다. –
faujong