Hi all, I think there should be a way to check if somebody has - perhaps accidentially - erased packages and re-install them if they are not installed any more. Sorry for the long mail, but I'd like to explain it in detail.
Recently I came across the following situation: in officexp.xml I have ---------------------------cut------------------------------------------------------------------------ <package id="msofficexp" name="Microsoft Office XP" revision="1" reboot="false" priority="49"> <check type="logical" condition="or"> <check type="uninstall" condition="exists" path="Microsoft Office XP Professional" /> <check type="uninstall" condition="exists" path="Microsoft Office XP Professional mit FrontPage" /> </check> </package> <package id="msofficexp-SP3" name="Microsoft Office XP SP3" revision="1" reboot="false" priority="49" > <depends package-id="msofficexp" /> <check type="logical" condition="or"> <check type="registry" condition="exists" path="HKLM\SOFTWARE\Classes\Installer\Patches\568E7574292040E449D0C91550A2D56D\SourceList\PackageName" /> <check type="registry" condition="exists" path="HKLM\SOFTWARE\Classes\Installer\Products\7040110900063D11C8EF00054038389C\Patches\Patches" /> </check> <install cmd='w:\updates\OfficeXP\OfficeXpSP3-KB832671-FullFile-DEU.exe /r:n /q /c:"msiexec /qb /l* %SystemDrive%\netinst\logs\kb832671.txt /p MAINSP3ff.msp REBOOT=ReallySuppress"' > <exit code="3010" /> <exit code="0" /> </install> <remove cmd='' /> <upgrade cmd='' /> </package> <package id="msofficexp-kb905758" name="Microsoft Office kb905758" revision="1" reboot="false" priority="49" > <depends package-id="msofficexp-SP3" /> <check type="registry" condition="exists" path="HKLM\SOFTWARE\Classes\Installer\Patches\6DA596CAD81FDD54C98C62D4BC87E46A\SourceList\PackageName" /> <install cmd='w:\updates\OfficeXp\officexp-KB905758-FullFile-deu.exe /r:n /q /c:"msiexec /qb /l* %SystemDrive%\netinst\logs\kb905758.txt /p PPINTLff.msp REBOOT=ReallySuppress" '> <exit code="3010" /> <exit code="0" /> </install> <remove cmd='' /> <upgrade cmd='' /> </package> ----------------------------------------------------------------------- ------------------------------- So this should check if Office is installed, and if yes, install the recent patches. As you can see, Office XP SP3 depends from Office XP, and msofficexp-kb905758 depends from msofficexp-SP3, so all looks good if installed with wpkg. In the meantime someone has deinstalled Office manually (yes, there are guys out there doing this ;-) and wpkg didn't notice this - or he upgraded to Office 2007 Beta, or whatever. If I've set "quitonerror = true" all is fine: ------------------------------------------------------------------------------------------------------ checking existence of package:Microsoft Office XP Uninstall entry for Microsoft Office XP Professional missing: test failed Uninstall entry for Microsoft Office XP Professional mit FrontPage missing: test failed Result of logical 'OR' check is false Installing Microsoft Office XP... checking existence of package:Microsoft Office XP Uninstall entry for Microsoft Office XP Professional missing: test failed Uninstall entry for Microsoft Office XP Professional mit FrontPage missing: test failed Result of logical 'OR' check is false Installation error while synchronizing package Microsoft Office XP, synchronizat ion aborting. Could not install Microsoft Office XP. ------------------------------------------------------------------------------------------------------ with quitonerror = false ------------------------------------------------------------------------------------------------------------- checking existence of package:Microsoft Office XP Uninstall entry for Microsoft Office XP Professional missing: test failed Uninstall entry for Microsoft Office XP Professional mit FrontPage missing: test failed Result of logical 'OR' check is false Installing Microsoft Office XP... checking existence of package:Microsoft Office XP Uninstall entry for Microsoft Office XP Professional missing: test failed Uninstall entry for Microsoft Office XP Professional mit FrontPage missing: test failed Result of logical 'OR' check is false checking existence of package:Microsoft Office kb905758 The registry path 'HKLM\SOFTWARE\Classes\Installer\Patches\6DA596CAD81FDD54C98C6 2D4BC87E46A\SourceList\PackageName' does not exist: the check failed Installing Microsoft Office kb905758... executing command : w:\updates\OfficeXp\officexp-KB905758-FullFile-deu.exe /r:n /q /c:"msiexec /qb /l* %SystemDrive%\netinst\logs\kb905758.txt /p PPINTLff.msp R EBOOT=ReallySuppress" command returned result: 0 checking existence of package:Microsoft Office kb905758 The registry path 'HKLM\SOFTWARE\Classes\Installer\Patches\6DA596CAD81FDD54C98C6 2D4BC87E46A\SourceList\PackageName' does not exist: the check failed checking existence of package:Microsoft Office kb916519 The registry path 'HKLM\SOFTWARE\Classes\Installer\Patches\7D1EDB07CFE3D9943966F 5425B1FFF2A\SourceList\PackageName' does not exist: the check failed Package name: Microsoft Office XP Could not install Microsoft Office XP. Failed checking after installation. Package name: Microsoft Office kb905758 Could not install Microsoft Office kb905758. Failed checking after installation. Package name: Microsoft Office kb916519 Could not install Microsoft Office kb916519. Failed checking after installation. Package name: Microsoft Office kb917335 Could not install Microsoft Office kb917335. Exit code returned non-successful value: -2147023829. ----------------------------------------------------------------------------------------------------- ... and so on - every patch hit the client with a dialog box and notified him of not being able to install the upgrade patch since the underlying product isn't installed. The problem here is, that a) wpkg didn't notice that Office XP isn't installed any more, and b) if I manually remove e.g. msofficexp-SP3 with /remove, the dependent packages aren't deinstalled, too. And c) if I manually reinstall with /install, wpkg "thinks" that the patches for Office are installed, but does not reinstall them Only solution was to use /force, but this even tries to remove things which aren't installed - not wanted here. I'd suggest - implement dependencies for removal, too (this hits another thing again: priorities for removal in opposite order to installation ...) - if the dependencies work, I can have something like <check ... everytime="true" ... /> or <package id="...." ... check="always" ... /> in a package, like the "msofficexp" package above. So, every time wpkg is run, this check is done, and if the condition isn't met, the package isn't there, and can be removed, and all packages which depend from it, too. What do you think? Falko Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ wpkg-users mailing list wpkg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wpkg-users