<< Edit: Prior to following instructions in this posting, please review http://support.microsoft.com/kb/974524 regarding Vista and Server 2008 >>
I frequently use task sequences to quickly and easily chain multiple, unrelated, software distributions together for deployment during our business scheduled maintenance window. One of the powerful things about using a task sequence is that a particular software install task can be limited to only run if certain criteria is met, such as only run the install of hotfix XYZ if Outlook 2010 is currently installed (otherwise skip). This can be done by using a WQL query that says “Select * from Win32_Product where Name = ‘Microsoft Office Professional Plus 2010’“.
In working on a new distribution of updates, I was met with a new situation for limiting software execution to only run if a particular software was NOT installed. Still using the same WQL query as an example above, it simply doesn’t suffice to replace the equals with “not equals” or “<>” because there will always be at least one installed software that is not Office 2010. Thus the logic fails and the task would execute…but we want it to NOT execute.
Instead, I used an If condition – that If none of the WQL query is true (e.g. installed) then DO execute. I tested this on a computer that already had the software (it skipped) and one that did not (it ran). So all is good! It was just a new thing I had not done in a task sequence before that I thought I’d share with everyone…..