Update Task versus Install Task

When I package software, I usually create an update task and an install task. The update task is for updating existing installs that need to be updated and the install task is for any system that does not have the software installed. The only difference between the two tasks is one relevance statement that checks for the install of the old version of the software.

I was just wondering if others do the same thing, or is there another method that others use.

I typically create 1 single task that can install OR update the software for software that should be installed everywhere.

Most of my examples on BigFix.Me are written this way.

Example: https://bigfix.me/cdb/fixlet/6079

This one set of relevance handles both installs and updates:

not exists keys whose (value "DisplayName" of it as string starts with "BleachBit" AND (value "DisplayVersion" of it as string as version) >= "1.6" as version) of keys "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registries;x32 registries)

If you wanted it to be relevant ONLY for installs, and not updates, you could just add a check that ANY version is already installed as well, and that would limit the scope. You could technically do this with a baseline, or by changing the relevance above by removing: AND (value "DisplayVersion" of it as string as version) >= "1.6" as version

So really you can create 3 different types:

  • Only for new installs
  • Only for updates
  • For both updates and installs

And you really need all 3 for different reasons.

If a package is required on all machines, then the all-in-one task works, but if a package is only required for a subset of machines, then you need two separate tasks: one for install and one for update.

1 Like