Hi, ds10...@cam.ac.uk wrote: > Thanks Rainer > > I'm writing a script for Acrobat reader security updates using examples > suplied. > > It need to look like:- > > While latest version of Acrobat reader is NOT install > Remove old version > Install new version > Install any patches > Endwhile > > Cobverting this into WPKG XML > > > If the check is false how best to group codes together?
There is no repeating of commands in WPKG during install/upgrade/downgrade/remove. WPKG will just execute the checks, then run appropriate commands and then check again to verify the commands did what they are supposed to. So the checks defined in WPKG should just verify that your desired version of the Adobe reader are installed correctly. For example by verifying that an uninstall entry like "Adobe Reader 9.1.2" is installed. If the check is not true, then the install commands are run (if there is a previous version installed already - see entry in local wpkg.xml - it will run the upgrade commands instead). The commands specified should make sure the updgrade went smoothly. My Adobe reader package looks as follows: <?xml version="1.0" encoding="utf-8" ?> <packages> <package id='AcrobatReader' name='Adobe Acrobat Reader' revision='912' priority='50' reboot='false' > <!-- Adobe Acrobat Reader --> <check type='logical' condition='or'> <check type='uninstall' condition='exists' path='Adobe Reader 9.1.2' /> <check type='uninstall' condition='exists' path='Adobe Reader 9.1.2 - Deutsch' /> </check> <install cmd='"%SOFTWARE%\software.free\Adobe Acrobat Reader v.9.1\unattended.cmd"' > <exit code='3010' /> </install> <remove cmd='"%SOFTWARE%\software.free\Adobe Acrobat Reader v.9.1\unattended-uninstall.cmd"' > <exit code='3010' /> </remove> <upgrade cmd='"%SOFTWARE%\software.free\Adobe Acrobat Reader v.9.1\unattended.cmd"' > <exit code='3010' /> </upgrade> </package> </packages> So if the "Adobe Reader 9.1.2" uninstall entry does not exist it runs my unattended.cmd (I use the same script for upgrade and installation from scratch). My "unattended.cmd" will in my case just run the MSI installer to install the reader (it does automatically upgrade old versions if they exist). If you like you can also specify a number of commands to remove previous versions but then I guess you have to care about a number of previous versions (users might have version 5.x 6.x, 7.x, 8.x or older 9.x installed). After the install/upgrade command is run WPKG will check again (using the specified checks) if the software is installed properly. If yes, then it adds the XML node to the local wpkg.xml and reports success. If the checks fail, then WPKG will not add the XML node to wpkg.xml and on next WPKG execution the game starts over. So make sure your commands (multiple ones might be specified and they are executed in the order they appear within the XML definition) do a one-shot upgrade to the desired version. After executing the commands your new version should be in place. br, Rainer ------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list email@example.com http://lists.wpkg.org/mailman/listinfo/wpkg-users