[wpkg-users] Amending package deployment after 50% of workstations done

Rainer Meier r.meier at wpkg.org
Wed Oct 28 08:38:21 CET 2009


Hi Simon,

simplesi wrote:
> I recently made up a package to deploy Scratch 1.4.
> 
> It had a check condition in to make sure it wasn't deployed if it already
> existed (some machines had been updated manually) and I deployed it to all
> my workstations and after I'd done about half the school I noticed that I'd
> forgotton to copy a shortcut to the desktop. :(

Well, no problem. Things like this happen and that's the reason WPKG ofers
upgrade commands ;-)


> What would you do to rectify this situation - the current package looks like
> this

Just increase the package revision, fix installation commands (add shortcut) and
add an upgrade command which adds the shortcut too.


> <package
>         id="scratchmsi"
>         name="Install Scratch from MSI"
>         revision="1"
>         reboot="false"
>         priority="0"
>         notify="false"
> 	execute="once">
> 
> 	<check type="file" condition="sizeequals"
> path="%PROGRAMFILES%\Scratch\scratch.exe" value="1045504" />
> 
>         <install cmd='msiexec /i "%PACKAGES%\scratchmsi\scratch1.4.msi"
> /qb-' />
> 
>         <upgrade cmd='msiexec /i "%PACKAGES%\scratchmsi\scratch1.4.msi"
> /qb-' />
> 
> </package>
> 
> My current thought is to change it to this
>  
> <package
>         id="scratchmsi"
>         name="Install Scratch from MSI"
>         revision="2"
>         reboot="false"
>         priority="0"
>         notify="false"
> 		execute="once">
> 
> 	<check type="file" condition="sizeequals"
> path="%PROGRAMFILES%\Scratch\scratch.exe" value="1045504" />
> 
>         <install cmd='msiexec /i "%PACKAGES%\scratchmsi\scratch1.4.msi"
> /qb-' />
>         <install cmd='%COMSPEC% /C copy "%PACKAGES%\scratchmsi\scratch.lnk"
> "%ALLUSERSPROFILE%\Desktop\Scratch.lnk" /y' />
> 
>         <upgrade cmd='%COMSPEC% /C copy "%PACKAGES%\scratchmsi\scratch.lnk"
> "%ALLUSERSPROFILE%\Desktop\Scratch.lnk" /y' />
> 
> </package>

Looks good.


> because I think that on clients where the package isn't installed - it will
> do the install and copy the shortcut.  And on existing clients, they will
> see the increase revision and do the upgrade.

This is exactly what WPKG will do.
In addition there might be a third "group" of clients. The ones which did not
install your package yet but alreadey have "Scratch" installed.
In such case WPKG will detect that the package is not yet installed (by WPKG)
but the checks already succeed. So it assumes the package is installed properly
and just adds it to local wpkg.xml without running any command. This prevents
unnecessary installs if clients already meet your requirements defined in checks.

In your case this could mean that some clients which already have Scratch
installed but no desktop shortcut (if users installed it manually without the
shortcut) will be left without the shortcut.
If this is a "problem" you might just add another check which checks for desktop
shortcut presence. In this case WPKG would re-execute the install commands even
on clients which already have Scratch installed. Re-running the MSI package is
usually not a problem in such cases.


> Have I got my logic right or would I be better off leaving original package
> alone and adding a new dependant package that just does the shortcut
> copying?

No I think this is not such a good idea. It complicates your package tree and
adds another package to maintain which just deals with the shortcut. I usually
prefer to do it in one package - exactly as you did in your proposal.


br,
Rainer



More information about the wpkg-users mailing list