1
다음과 같은 경우가 있습니다.서비스 주요 업그레이드가 실패 할 때 이전 버전 설치
- MSI는 서비스를 설치합니다.
- MSI는이 설치된 서비스를 크게 업그레이드합니다 (이전 버전 제거 및 새 버전 설치).
- 주요 업그레이드 중에 실패하면 롤백되어 서비스가 완전히 제거됩니다.
서비스 주요 업그레이드가 실패하면 업그레이드를 제거하고 이전 버전의 서비스를 설치한다고 MSI에 알릴 수 있습니까? 그리고 어떻게?
<CustomAction Id="SetCustomActionDataValue" Return="check"
Property="RunCmdRollback" Value="[INSTALLDIR], [UPGRADINGPRODUCTCODE],
[OLDFOUND]" />
<CustomAction Id="RunCmdRollback" BinaryKey="OPGInstallerCA2.dll"
DllEntry="CustomAction1" Execute='rollback' Return="ignore"
Impersonate='no'/>
<CustomAction Id='InstallServiceSetProp' Property='InstallService'
Value='/installtype=notransaction /action=install /LogFile=
"[#WindowsService]" "[#ConfigFile]"' />
<CustomAction Id='InstallService' BinaryKey='InstallUtil'
DllEntry='ManagedInstall' Execute='deferred' Return='ignore'
Impersonate='no' />
<CustomAction Id='UnInstallServiceSetProp'
Property='UnInstallService' Value='/installtype=notransaction
/action=uninstall /LogFile= "[#WindowsService]" "[#ConfigFile]"' />
<CustomAction Id='UnInstallService' BinaryKey='InstallUtil'
DllEntry='ManagedInstall' Execute='deferred' Return='ignore'
Impersonate='no'/>
<CustomAction Id='CommitServiceSetProp' Property='CommitService'
Value='/installtype=notransaction /action=commit /LogFile=
"[#WindowsService]" "[#ConfigFile]"' />
<CustomAction Id='CommitService' BinaryKey='InstallUtil'
DllEntry='ManagedInstall' Execute='commit' Return='ignore'
Impersonate='no' />
<CustomAction Id='RollbackServiceSetProp'
Property='RollbackService' Value='/installtype=notransaction
/action=rollback /LogFile= "[#WindowsService]" "[#ConfigFile]"' />
<CustomAction Id='RollbackService' BinaryKey='InstallUtil'
DllEntry='ManagedInstall' Execute='rollback' Return='ignore'
Impersonate='no' />
<CustomAction Id='ConfigurePort' Execute='deferred'
Return='ignore' BinaryKey='HTTPCFG' ExeCommand='set urlacl -u
http://+:55555/OPGatewayService/ -a D:(A;;GA;;;NS)' Impersonate='no'/>
<CustomAction Id='UnConfigurePort' Execute='deferred'
Return='ignore' BinaryKey='HTTPCFG' ExeCommand='delete urlacl -u
http://+:55555/OPGatewayService/' Impersonate='no'/>
<CustomAction Id='RollbackConfigurePort' Execute='rollback'
Return='ignore' BinaryKey='HTTPCFG' ExeCommand='delete urlacl -u
http://+:55555/OPGatewayService/' Impersonate='no'/>
<CustomAction Id="StopVCA" Execute='rollback' Return='ignore'
ExeCommand="net stop OPGatewayService" Directory="TARGETDIR"
Impersonate='no' />
<InstallExecuteSequence>
<InstallValidate Sequence="1400" />
<RemoveExistingProducts Sequence="1402">OLDFOUND</RemoveExistingProducts>
<InstallInitialize Sequence="1500" />
<Custom Action="ConfigurePort"
After='InstallService'>$OPGatewayComponent>2</Custom>
<Custom Action="UnConfigurePort"
After='UnInstallService'>$OPGatewayComponent=2</Custom>
<Custom Action='InstallServiceSetProp'
Before='StartServices'>$OPGatewayComponent>2</Custom>
<Custom Action='InstallService'
After='InstallServiceSetProp'>$OPGatewayComponent>2</Custom>
<Custom Action='UnInstallServiceSetProp'
After='StopServices'>$OPGatewayComponent=2</Custom>
<Custom Action='UnInstallService'
After='UnInstallServiceSetProp'>$OPGatewayComponent=2</Custom>
<Custom Action='CommitServiceSetProp'
After='RollbackService'>$OPGatewayComponent>2</Custom>
<Custom Action='CommitService'
After='CommitServiceSetProp'>$OPGatewayComponent>2</Custom>
<Custom Action='RollbackServiceSetProp'
After='InstallService'>$OPGatewayComponent>2</Custom>
<Custom Action='RollbackService'
After='RollbackServiceSetProp'>$OPGatewayComponent>2</Custom>
<Custom Action="StopVCA"
After='RollbackService'>$OPGatewayComponent>2</Custom>
<Custom Action='RollbackConfigurePort'
After='StopVCA'>$OPGatewayComponent>2</Custom>
<Custom Action='SetCustomActionDataValue'
After='RollbackConfigurePort'>$OPGatewayComponent>2</Custom>
<Custom Action="RunCmdRollback" After='SetCustomActionDataValue'
>$OPGatewayComponent>2</Custom>
<Custom Action='AlreadyUpdated'
After='FindRelatedProducts'>SELFFOUND</Custom>
<Custom Action='NoDowngrade'
After='FindRelatedProducts'>NEWERFOUND</Custom>
</InstallExecuteSequence>
또 다른 질문 :
이
내 코드입니다. 이 아닌 실패한 업그레이드를 실행하는 롤백 작업 (RunCmdRollback)을 만들 수 있습니까? 당신이 윅스의ServiceInstall
및
ServiceControl
요소를 사용할 수없는 이유가 거기에 아드리아나