Can I run 2 actions on a single task?

Hey everyone. I have a task that I need to run two actions.
Action 1 is a PowerShell to stop services, uninstall a software, delete any reg of folders left behind.

Action 2 is installing a newer version of the software which I uploaded using the webui > software packages > add package. So for that I have the actual bigfix action script.

When I take action it shows an option to either deploy on or the other action.

image

Is this possible or not understanding how multiple actions work?

Thanks

Add the two items into a baseline, then run the baseline.

To understand what you’re saying…create two separate fixlets, create a baseline ie: , add both fixlets to baseline and apply baseline to endpoints.

I am new to this, sorry for being redundant.

And in general you can’t have two actions in a fixlet\task? Any time you need two actions you must create a baseline.

Its up to you if you have separate tasks or combine scripts into a single task. Either way works.

Sometimes it makes sense to separate them to make your jobs more modular/re-useable.

I see where breaking them out into separate would be beneficial.

How about relevance? Do I make the relevance of the baseline “True” and then each fixlet\task has their own relevance or do I apply the relevance at the baseline and the 2 actions running to “True”?

I am targeting Win10 and Win11 and that it doesn’t have a particular version of the software, if True then applicable to the baseline

Here’s what I am using at the baseline and the uninstall action1:

(version of client >= “6.0.0.0”) AND ((exists true whose (if true then (exists (operating system) whose (it as string as lowercase contains “win1” as lowercase)) else false)) AND (exists true whose (if true then (exists file “C:\Program Files (x86)\Printer Properties Pro\Printer Installer Client\bin\PrinterInstallerClientLauncher.exe” whose (version of it as string != “25.0.0.973”)) else false)) AND (exists true whose (if true then (exists (computer name) whose (it as string as lowercase contains “IT-” as lowercase)) else false)))

Action2 which is the install part is whatever relevance was built by bfix once I created the software package via webui:

(((((if(name of operating system starts with “Win”) then free space of drive of client > 83396608 else if ((mac of it) of operating system) then free space of filesystem of folder (pathname of client) > 83396608 else free space of filesystem of client > 83396608)) AND (version of client >= “8.2”)) AND (windows of operating system AND (if( name of operating system starts with “Win” ) then platform id of operating system != 3 else true))) AND (exists file “msiexec.exe” of system folder)) AND (/* Relevance generated from file “PrinterInstallerClient.msi” */ (disjunction of (NOT exists keys “{A9DE0858-9DDD-4E1B-B041-C2AA90DCBF74}” whose ( value “DisplayVersion” of it as string as version >= “25.0.0.973” as version AND value “Language” of it as string = “1033”) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of ( x32 registry; (if exists x64 registry then x64 registry else nothing) ))))

There are different schools of thought and strategies on how to use baseline relevance vs task/fixlet relevance. In a simple use case, ‘true’ is a valid option, but will not drop out of relevancy when your action is taken.

What I like to do is make the task or fixlet relevance focused on the specific item being accomplished, then use the baseline relevance as more of a process flow or metadata check. Simple example for a patch baseline: fixlets are relevant when the patch has yet to be applied. Patch baseline relevance might check department, business unit, machine type, patch flag status, etc.

@JonL so I can target the baseline for example machines that start with a department name like accounting (ie: acct- )

then for the fixlets\tasks within it I set those relevance as I would want to apply if I was applying them individually but the difference being that they will be part of a baseline.

Not sure if it’s my relevance or maybe the way I set up the overall baseline but I know there’s a machine that does not have the software and it doesn’t come up relevant in the baseline. If I go to the fixlet that performs the installation the machine does shows up as relevant. Where’s my disconnect?

The baseline has the uninstall fixlet first as Action1 and the deploy task as Action2.

Thanks!

Sure, you can, but it’s best to maintain the basic relevance for broader coverage, such as Windows of operating system. Still, you can make it more restrictive if that’s what you’d like.

Baseline handles fixlets and tasks independently. When you add a fixlet, it automatically check the fixlet’s relevance based on applicability option; however, this isn’t the case when you add tasks; instead, you must manually choose the relevance based on applicability of the source task when adding tasks.

image

image

The above-mentioned option is by default enabled in fixlet cases, but not in task cases. Try turning it on for tasks and observe the changes in baseline applicability behavior.

2 Likes

THIS is exactly what I needed! I checked the box on the Task within the baseline components and now the correct machines were showing as relevance. When I took action it didn’t show me two options and the baseline itself ‘knew’ exactly to either take the uninstall fixlet or the installation task based on weather the endpoint had or did not have the software installed.

Thanks so much for the assist @vk.khurava !