Time-Tested Relevance Not Working

Hi,

I’m trying to create a fixlet to uninstall Quicktime from Windows. I created a task with the following relevance, which I have used successfully on other applications, but nothing is showing up. Further odd, the task disappears completely from my site in Bigfix, even though I created it in my own site.

Relevance

((windows of operating system) AND (exists key whose (value "DisplayName" of it as string equals "Quicktime 7" AND (it <= "7.79.80.95") of (value "DisplayVersion" of it as string as version)) of key "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" of native registry)

Action Script

waithidden "{pathname of system wow64 folder}\msiexec.exe" /x {{FF59BD75-466A-4D5A-AD23-AAD87C5FD44C} /passive /norestart

What am I doing wrong?

Does it show up if you click ‘Show Non-Relevant Content’ in the console?

It does! A BIG DUH!!! on my part. Thanks.

Why would it not be relevant? I’m looking at one client that fits the bill right now.

Here’s the output from QnA. I have no idea what it means.

Q: exists key whose (value “DisplayName” of it as string equals “QuickTime 7” AND (it <= “7.79.80.95”) of (value “DisplayVersion” of it as string as version)) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall{FF59BD75-466A-4D5A-AD23-AAD87C5FD44C}” of native registry
E: Singular expression refers to nonexistent object.

Try changing native registry to just registry for the 32 bit registry.

q: exists key whose (value “DisplayName” of it as string as lowercase contains “quicktime”) of key “hklm\software\microsoft\windows\currentversion\uninstall” of registry
A: True
T: 20.779 ms

Then for the uninstall action you can use something like this:

waithidden cmd /C msiexec /x {(name of it) of key whose (value “DisplayName” of it as string as lowercase contains “quicktime”) of key “hklm\software\microsoft\windows\currentversion\uninstall” of registry} /qn

What about the 64-bit PCs? That the majority of what I have.

Most of our pc’s are x64 also, but the app is installed in the x32 registry from what I’ve noticed. For thoroughness you could use the relevance:

exists keys whose (value "DisplayName" of it as string as lowercase contains "quicktime") of keys "hklm\software\microsoft\windows\currentversion\uninstall" of (native registry;registry)

And an action like:

if {exists key whose (value "DisplayName" of it as string as lowercase contains "quicktime") of key "hklm\software\microsoft\windows\currentversion\uninstall" of native registry}
waithidden cmd /C msiexec /x {(name of it) of key whose (value "DisplayName" of it as string as lowercase contains "quicktime") of key "hklm\software\microsoft\windows\currentversion\uninstall" of native registry} /qn
endif
if {exists key whose (value "DisplayName" of it as string as lowercase contains "quicktime") of key "hklm\software\microsoft\windows\currentversion\uninstall" of registry}
waithidden cmd /C msiexec /x {(name of it) of key whose (value "DisplayName" of it as string as lowercase contains "quicktime") of key "hklm\software\microsoft\windows\currentversion\uninstall" of registry} /qn
endif

Nice!! That works great! Thanks

I like the relevance, but the actionscript can be reduced a bit.

When a plural query has zero results. You can use the possible multiple results from the relevance query to reduce the action script a bit as well. I have a pattern I often use -

delete __appendfile

appendfile {concatenation "%0d%0a" of ("msiexec.exe /x" & name of it) of keys whose (value "DisplayName" of it as string as lowercase contains "quicktime") of keys "hklm\software\microsoft\windows\currentversion\uninstall" of (x32 registries; x64 registries)}

delete remove.cmd

move __appendfile remove.cmd

waithidden cmd /c remove.cmd
1 Like

That does look a lot better. Thank you.

The only time that doesn’t work well is when there are zero answers :smile:

1 Like

There should be no case for zero answers - the original relevance should guarantee at lease one answer, or the Action wouldn’t execute at all. That said, if the relevance is incorrect and the relevance substitution in the action script yields zero answers, you simply end up with an empty appendfile, and a .cmd script that does nothing - it does not trigger an error or otherwise cause harm.

1 Like

For uninstalling you might want to uninstall the other two installers from Apple

//Uninstall Quicktime and Apple Support and Apple Application
//x64
delete __appendfile
appendfile @ECHO OFF
appendfile {concatenation "%0d%0a" of ("start /w msiexec /x" & name of it & " /qn") of (keys whose (value "DisplayName" of it as string contains "Apple Application Support") of key  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry)}
delete uninstallQuicktimeAAS64.bat
copy __appendfile uninstallQuicktimeAAS64.bat
wait "{pathname of client folder of site "BESSupport"}\RunQuiet.exe" uninstallQuicktimeAAS64.bat

//x64
delete __appendfile
appendfile @ECHO OFF
appendfile {concatenation "%0d%0a" of ("start /w msiexec /x" & name of it & " /qn") of (keys whose (value "DisplayName" of it as string contains "Apple Software Update") of key  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry)}
delete uninstallQuicktimeASU64.bat
copy __appendfile uninstallQuicktimeASU64.bat
wait "{pathname of client folder of site "BESSupport"}\RunQuiet.exe" uninstallQuicktimeASU64.bat

//x64
delete __appendfile
appendfile @ECHO OFF
appendfile {concatenation "%0d%0a" of ("start /w msiexec /x" & name of it & " /qn") of (keys whose (value "DisplayName" of it as string contains "QuickTime 7") of key  "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry)}
delete uninstallQuicktime764.bat
copy __appendfile uninstallQuicktime764.bat
wait "{pathname of client folder of site "BESSupport"}\RunQuiet.exe" uninstallQuicktime764.bat
action may require restart