Managed Software Delivery - Dependency Tasks (and other)
I'm having a couple of problems creating a Managed Software Delivery policy, related to aditional tasks besides the software installation itself. The story goes like this:
I've been asked to install Java 7 in my organization.
Because we have a lot of different Java versions on our computers (pre Altiris era...) I wrote a vbs script to uninstall any java that is present on the a machine and the corresponding "run script" task (JRE-Uninstall) . Then I created the package delivery task to install Java.
When I ran the tasks using a job on a single computer, it worked like a charm.
Then, when I scaled up and tried the job a bunch of computers at once, I realized that there was a significant number of computers that were'nt picking up the task (for several different reasons). After searching for a bit I was convinced that a Managed Software Delivery policy was the way to go.
I properly configured the software resource (including detection rules), created a policy just with the install, and sure enough, when I test it it works fine (i.e. when java is detected it marks the computer as compliant and when not it runs the installer, good times).
The problem arose (and sorry for the long introduction) when I try to add the JRE-Uninstall task to the policy. I tried adding it as a task before the java software and tried adding it as a Dependency Task. in either case the task is run wether or not the compliance rule checks out.
What am I missing ??
TLDR: Detection rule works fine, software installation works fine (only runs when necessary), but aditional tasks (uninstall script in this case) always runs, even if machine already compliant