Cleanup package

Don't uninstall the service manually before proceeding with the upgrade
And run msiexec in %COMSPEC% /C
tags/wpkg-zabbix_agent-3.4.3-0.beta1
Daniel Berteaud 8 years ago
parent 12d6137aaf
commit 4d5ff41725
  1. 5
      packages/zabbix_agent.xml

@ -11,9 +11,6 @@
<check type="uninstall" condition="versiongreaterorequal" path="Zabbix Agent" value="%PKG_VERSION%"/> <check type="uninstall" condition="versiongreaterorequal" path="Zabbix Agent" value="%PKG_VERSION%"/>
<install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.exe" -c "%PROGRAMFILES%\Zabbix Agent\zabbix_agentd.conf" --uninstall'>
<exit code="any" />
</install>
<install cmd='msiexec /qn /i "%MSI%" SERVER=%ZBX_SERVER_IP% RMTCMD=0' /> <install cmd='msiexec /qn /i "%MSI%" SERVER=%ZBX_SERVER_IP% RMTCMD=0' />
<install cmd='netsh advfirewall firewall add rule name="Zabbix Agent" dir=in action=allow protocol=TCP localport=10050 enable=yes remoteip=%ZBX_SERVER_IP%' /> <install cmd='netsh advfirewall firewall add rule name="Zabbix Agent" dir=in action=allow protocol=TCP localport=10050 enable=yes remoteip=%ZBX_SERVER_IP%' />
<install cmd='%COMSPEC% /C sc start "Zabbix Agent"'> <install cmd='%COMSPEC% /C sc start "Zabbix Agent"'>
@ -33,7 +30,7 @@
<remove cmd='%COMSPEC% /C sc stop "Zabbix Agent"'> <remove cmd='%COMSPEC% /C sc stop "Zabbix Agent"'>
<exit code="any" /> <exit code="any" />
</remove> </remove>
<remove cmd='%COMSPEC% /C msiexec /qn /norestart /x "%MSI%"' /> <remove cmd='msiexec /qn /norestart /x "%MSI%"' />
<remove cmd='netsh advfirewall firewall del rule name="Zabbix Agent"' /> <remove cmd='netsh advfirewall firewall del rule name="Zabbix Agent"' />
</package> </package>

Loading…
Cancel
Save