Nice detection method.
Also late to the party I would like to add that you can use the following now.
Also late to the party I would like to add that you can use the following now.
Execute-MSI -Action "Patch" -Path "$dirfiles" -Patch "IE9-Windows6.1-KB2962872-x64.msu"
I tried it without -Path "$dirfiles" but it failed because it is not the default value for the parameter in the Execute-MSI function.