Thanks for sharing!
I always introduce a property called “Applications - Uninstall Strings - Windows” that I use relevance like:
unique values of (it as string) of (value "displayName" of it as string | name of it as string, values "uninstallString" of it) of keys of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries; x64 registries)
This returns every single app and uninstall string including whether it ends with a null terminator or not.
A: 7-Zip 22.01 (x64), "C:\Program Files\7-Zip\Uninstall.exe"
A: Adobe Acrobat (64-bit), MsiExec.exe /I{AC76BA86-1033-1033-7760-BC15014EA700}%00
A: Adobe Refresh Manager, MsiExec.exe /I{AC76BA86-0804-1033-1959-018244601042}%00
This is great because when I want to build an uninstall fixlet I can go into web reports, search for entries that include “7-Zip” and instantly see all the different uninstall strings for that app in my environment. So for 7-Zip you’d find Uninstall.exe
for ones installed with the EXE installer and you’d see msiexec /x
for ones installed with the MSI installer. It also helps you figure out if you’ll need different handling across versions or x64/x86.
You can also get relevance to do some of the argument work for you in this with things like this:
(if (it ends with "}" and it as lowercase contains "msiexec") then (it & " /qn REBOOT=ReallySuppress /norestart") else (it)) of (concatenations "" of substrings separated by "%00" of concatenations "MsiExec.exe /x" of substrings separated by "MsiExec.exe /I" of it) of unique values of (it as string) of (value "displayName" of it as string | name of it as string, values "uninstallString" of it) of keys of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries; x64 registries)
You can use this to automatically switch it to uninstall instead of configure and add your required skip reboot and silence flags to the msiexec commands.
A: 7-Zip 22.01 (x64), "C:\Program Files\7-Zip\Uninstall.exe"
A: Adobe Acrobat (64-bit), MsiExec.exe /x{AC76BA86-1033-1033-7760-BC15014EA700} /qn REBOOT=ReallySuppress /norestart
A: Adobe Refresh Manager, MsiExec.exe /x{AC76BA86-0804-1033-1959-018244601042} /qn REBOOT=ReallySuppress /norestart
This is really great for beginners because it doesnt require them to know a lot about msiexec to get work done!
And if you really want to go big there’s an exercise left to the reader here where you pull these results from the REST API and use a script to automatically build and upload uninstall fixlets for every app in your environment 