(2017-03-23, 17:17)Rechi Wrote: I now changed the check to not call powershell.
For anyone interested in the changes, they are https://github.com/xbmc/xbmc/commit/36abacf.
I really don't see that this helps at all. It still depends on PATH; the only difference is that PATH must now include the folder where wmic.exe lives (C:\Windows\System32\Wbem in my case). If that is missing, the installer will still fail. Moreover, unless I am mistaken, it will still give the wrong error message, telling the user that the hotfix is not installed, where the real problem is that wmic was not found. This is exactly the same situation as you had originally, except with wmic substituted for powershell.
In my view, whether you call powershell or wmic or anything else, you must first run it with null parameters and use some test to see whether it was able to run at all. Then if you were able to run it, run it again for your intended purpose of checking for the hotfix. This way you can report errors separately and without being misleading: an error telling the user if your executable is missing; and a separate error if it is present, ran successfully, and really did report that the hotfix is missing.
Being short of time, I have done minimal testing on this latest change, just looked at the code, so apologies if I have missed something.