117
edits
Changes
Added /FORCEINSTALL and uninstall before upgrade. Fixed uninstall before install re exit codes.
Note that the uninstall string is "PDFCreator" for both versions, so I added a check on the executable version number just to make sure.
Note also the call to unins000.exe before install/upgrade. This should solve the "package already installed" problem mentioned above. This also serves to remove any previous versions that may have been manually installed.
<source lang="xml">
<check type="file" condition="versionequalto" path="%PROGRAMFILES%\PDFCreator\PDFCreator.exe" value="0.9.0.7"/>
</check>
<install cmd='%PROGRAMFILES%\PDFCreator\unins000.exe /VERYSILENT' > <exit code="any" reboot="false" /> <!-- 0 = previous installation successfully removed. undefined = no previous installation --> </install> <install cmd='%SOFTWARE%\PDFCreator\PDFCreator-0_9_7_setup.exe /LOADINF="%SOFTWARE%\PDFCreator\PDFCreator-0_9_7_setup.inf" /VERYSILENT /NORESTART /FORCEINSTALL /SP-' /> <upgrade cmd='%PROGRAMFILES%\PDFCreator\unins000.exe /VERYSILENT' /> <upgrade cmd='%SOFTWARE%\PDFCreator\PDFCreator-0_9_7_setup.exe /LOADINF="%SOFTWARE%\PDFCreator\PDFCreator-0_9_7_setup.inf" /VERYSILENT /NORESTART /FORCEINSTALL /SP-' />
<remove cmd='%PROGRAMFILES%\PDFCreator\unins000.exe /VERYSILENT' />
</package>