> Dear all, > > find attached a modificated version of wpkg 0.9.10. > > What have I done: > > Modifications: > - moved it from .js to .wsf type, adding XML-Tags so that windows script > host can create Usage message based on those tags. > - streamlined parameter handling by using WScript.Named.Exists() function > - removed duplicate code blocks in installPackage, upgradePackage & > removePackage by creating new function calls > - created additional functions to, in my opinion, increase readability > > New Functionality: > - I added functionality to process the <supercedes> tags which are > introduced in the web-interface. > > Assume you have the following situation (e.g. ClamWin) > > ClamWin is creating cwupdate-packages which only update the clamwin > executables, e.g. > - from version 0.9.1.1 to version 0.9.2 > - with this new functionality you are able to create the following packages > entry's: > > <package id='ClamWin_0_90_1' name='ClamWin' revision='1' priority='0' > reboot='false' > > <check type='file' condition='versionequalto' path='c:\program > files\clamwin\bin\clamscan.exe' value='0.90.1' /> > <install cmd='clamwin-0.90.1-setup.exe SP- /SILENT /NORESTART /NOCANCEL > /D=C:\Program Files\ClamWin' /> > <upgrade cmd='cwupdater-901to9011.exe /S /D=C:\Program Files\ClamWin' > > <exit code="0" /> > <exit code="1" /> > </upgrade> > <supercedes package-id='ClamWin_0_90_0' /> > </package> > > <package id='ClamWin_0_90_1_1' name='ClamWin' revision='1' priority='0' > reboot='false' > > <check type='file' condition='versionequalto' path='c:\program > files\clamwin\bin\clamscan.exe' value='0.90.1.1' /> > <supercedes package-id='ClamWin_0_90_1' /> > <upgrade cmd='cwupdater-9011to902.exe /S /D=C:\Program Files\ClamWin' > > <exit code="0" /> > <exit code="1" /> > </upgrade> > </package> > > <package id='ClamWin_0_90_2' name='ClamWin' revision='1' priority='0' > reboot='false' > > <check type='file' condition='versionequalto' path='c:\program > files\clamwin\bin\clamscan.exe' value='0.90.2' /> > <supercedes package-id='ClamWin_0_90_1_1' /> > </package> > > 1.) Assuming package with Id 'ClamWin_0_90_1_1' is installed on your system > the /synchronize-job would > upgrade clamwin to version 0.90.2 using the > -- cwupdater-9011to902.exe' > > 2.) Assuming package with Id 'ClamWin_0_90_1' is installed on your system > the /synchronize-job would > upgrade clamwin to version 0.90.2 using the > -- cwupdater-901to9011.exe > -- cwupdater-9011to902.exe' > in this order > > 3.) Assuming NO clamwin is installed on your system the /synchronize-joub > would > install clamwin version 0.90.2 using > -- clamwin-0.90.1-setup.exe > -- cwupdater-901to9011.exe > -- cwupdater-9011to902.exe > in this order. > > Please feel free to comment. > > Best Regards > Roman > > > <<wpkg.wsf.txt>> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20070509/3c5a3b6c/attachment.html> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: wpkg.wsf.txt URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20070509/3c5a3b6c/attachment.txt> |