Fixlet for Microsoft.HEIFImageExtension

What happens if you run that powershell command manually, does it install? I’d try each of these -

  • Use the 64-bit version of powershell explicitly, by adding action uses wow64 redirection false to the action script, before executing the ‘waithidden’ command.

  • Produce a log of the powershell command output by wrapping in a cmd.exe shell and using cmd to save the stdout and stderr to a log file, like I do at Unzip via PowerShell

Also apply the PowerShell parameters to bypass the ExecutionPolicy, run in non-interactive mode, and run commands from command line, while using the CMD output redirection to save the output and error messages to a log file. Review the log file after running to see whether PowerShell itself gave any errors.

action uses wow64 redirection false

waithidden cmd.exe /c ""powershell.exe" -ExecutionPolicy Bypass -NonInteractive -C -Add-AppxPackage -Path "C:\Temp\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx" > c:\windows\temp\powershell-log.txt 2>&1"
  • Check the BES Client Log to see what return code was given by the ‘waithidden’ command.

  • Try running this in the context of the logged-on user instead of LocalSystem context. I don’t know whether this package installs per-user or per-machine, but I think Appx generally installs per-machine. There may be DISM commands to stage it for all users though instead of using powershell. I also have tips for running commands in user context at Tip - Action Override User settings

edit: also you seem to be referencing the wrong path in the powershell command. You’ve copied the downloaded file to c:\Temp in the command copy “__Download\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx” “C:\Temp\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx” but then you’re trying to reference it at C:\

edit2: I’m not sure what you’re trying to do with this statement

wait “__Download\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx”
I think we already said just trying to execute the .Appx is not correct