[wpkg-users] How to remove the package but leave the software installed
David Petterson
david at ifm.liu.se
Sun Jul 4 11:55:35 CEST 2010
Rainer Meier wrote:
> Hi David,
>
> On 04.07.2010 01:40, David Petterson wrote:
>> I have been using WPKG to force installation of Windows XP updates, and
>> are now switching to a WSUS server.
>>
>> So the question for you all:
>> Is there a way to force remove the package information from the clients
>> without running any remove commands?
>>
>> Solutions I have though of and why they wont work.
>> 2.
>> Solution: Create a new revision of all packages and remove the
>> "remove"-entries. Then after all clients have got the new revision,
>> remove the packages from the computer profile and remove/rename the
>> packages to force removal of the package on the client.
>>
>> Problem: We have a lot of users working on laptops, some are away for
>> months (up to a year in some cases) and I have no idea when all
>> computers have received the updated packages. (this was the first reason
>> why I started to use WPKG to force install updates on the computers when
>> they get back to campus. With WSUS I can force install critical updates
>> by setting a deadline)
>
> Solution 2 looks more the way I would recommend you to go.
>
> In fact you could rely on the upgrade-before-remove feature of WPKG to achieve
> this. WPKG will always upgrade to the latest package revision before performing
> the remove. So you might use this upgrade to replace the package definition with
> a package which removes cleanly without touching the system.
>
> Package mock-up:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <packages>
>
> <package id='KBxxxxxx' name='Windows update KBxxxxxx' revision='2' priority='50'
> reboot='false' >
> <check type='file' condition='exists' path='%TEMP%\KBxxxxx' />
>
> <install cmd='%COMSPEC% /c echo installed > "%TEMP%\KBxxxxxx"' />
> <upgrade cmd='%COMSPEC% /c echo installed > "%TEMP%\KBxxxxxx"' />
> <remove cmd='%COMSPEC% /c rm "%TEMP%\KBxxxxxx"' />
> </package>
>
> </packages>
>
>
>
> Then remove the package reference from the profile.
> Please note that you should do this with all your update packages.
> When WPKG runs it will detect that all update packages are supposed to be
> removed (removed from profile). Then it will first check if there is an update
> to these packages. Since you incremented the revision there will be an update to
> all these packages.
>
> All of them will now simply replace the package with the "dummy" entry I
> proposed above. The upgrade will succeed since the upgrade command writes a
> dummy file in %TEMP%. Now the packages are ready to be removed without
> performing any real action on the system. WPKG will (immediately after the
> upgrade) start the remove process. As defined above it will delete the temporary
> file and after remove the check is supposed to fail -> package removed successfully.
>
> As all this happens in one step you do not have to wait until all your hosts
> processed the upgrade. Just leave this dummy entries in your package database
> and whenever a client connects (might happen after months) the package will
> simply be removed from the client without performing any uninstall of the patch.
>
>
> Please carefully test it. I never had to do it since I always thought deploying
> software/patches which can be automatically deployed with update mechanisms like
> Windows-Update is a bad idea. In fact I hope that Microsoft will extend Windows
> Update to a kind of "app-store" and open it for 3rd party suppliers so users can
> simply click on the apps they would like to install and automatically get
> updates for all of them. This would render WPKG obsolete as long as all
> applications you need are in the app-store.
>
> br,
> Rainer
Thank you! This may be a "better looking" solution then just erasing the
wpkg.xml since it is all wpkg. The problem with just erasing the
wpkg.xml is that you depend on another script to have run first, and you
cant be sure of that with laptop users.
Do I need to enable this "upgrade-before-remove" or is it default?
I would like windows update to become the only update manager for
Windows. It sucks to have like four different update clients running on
the same machines. I usually disable them on our clients and install
program updates with wpkg when possible.
/David
More information about the wpkg-users
mailing list