Jean Le Bail wrote: > Hi, > > Mark Nienberg a écrit : >> I haven't found anything in the wiki that really describes how to use exit codes in >> the "packages.xml" file. I have studied some of the examples of silent installers, >> but I still don't get it entirely. >> >> As an example, here is a package I have set up: >> >> <package id="sunbird" name="Mozilla Sunbird" revision="3" priority="0"> >> <check type="uninstall" condition="exists" path="Mozilla Sunbird (0.5)" /> >> >> <install cmd='"%SOFTWARE%\sunbird\sunbird-0.5.en-US.win32.installer.exe" -ms' /> >> <install cmd='cmd /c del /q "%ALLUSERSPROFILE%\Desktop\Mozilla Sunbird.lnk"' /> >> >> <upgrade cmd='"%PROGRAMFILES%\Mozilla Sunbird\uninstall\uninst.exe" /s' /> > >> <upgrade cmd='cmd /c rmdir /S /Q "%PROGRAMFILES%\Mozilla Sunbird"' /> > > could be replaced with : > <upgrade cmd='cmd /c if exist "%PROGRAMFILES%\Mozilla Sunbird" rmdir /S /Q "%PROGRAMFILES%\Mozilla Sunbird"' /> > >> <upgrade cmd='"%SOFTWARE%\sunbird\sunbird-0.5.en-US.win32.installer.exe" -ms' /> >> <upgrade cmd='cmd /c del /q "%ALLUSERSPROFILE%\Desktop\Mozilla Sunbird.lnk"' /> >> </package> >> >> >> The upgrade command for "rmdir /S /Q" works fine unless the directory was completely >> removed by the uninstall command preceding it, in which case it fails with error code >> 2. Is it possible to accept this and continue with the remaining upgrade commands by >> inserting and error code statement? Alternatively, I guess I could write a vbs >> script with more complicated conditional statements in it. > > Alternatively you can use exit code : > > <upgrade cmd='cmd /c rmdir /S /Q "%PROGRAMFILES%\Mozilla Sunbird"'> > <exit code="0"/> > <exit code="2"/> > </upgrade> I see what you mean, thanks. Mark wpkg-users mailing list wpkg-users at lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users |