Fixlet for Microsoft.HEIFImageExtension

I require a fixlet to update Microsoft.HEIFImageExtension

Below one not working, please advice

Relevance 1
((name of it = “Win10”) OR (name of it = “Win11”)) of operating system AND (not exists regapp “Microsoft.HEIFImageExtension”)

Action:
prefetch 034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c sha1:034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c size:1595687 http:\xxxxxxxx:52311/Uploads/034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c/Microsoft.HEIFImageExtension_1.0.50272.0_x64__8wekyb3d8bbwe.Appx.tmp sha256:04be844e7dedda508c20cc9bef414189d2ee1c1021cbeafaae674d83d639f535
extract 034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c
wait __Download\Microsoft.HEIFImageExtension_1.0.50272.0_x64__8wekyb3d8bbwe.Appx

I’m not real familiar with appx installation, but likely you need to find silent install command lines instead of just trying to launch the .appx file.

1 Like

Ok Thanks, but these all are for the Microsoft Store updates, do you recommend any fixlets to update the Microsoft store updates"

Appx packages are inherently per-user. I’m not sure whether the ‘regapp’ relevance is valid for these, have you tested in Fixlet Debugger?

Have a read at https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-app-package--appx-or-appxbundle--servicing-command-line-options for how to provision appx packages or bundles for all users on the system. The command lines vary greatly depending upon the package type.

When you have tested a command line that provisions the package correctly (and test that installing the provisioned app appears correctly for the next user that logs on), post the command line here and we can help you with how to deploy it via BigFix.

1 Like

I tried below one but in Debugger it fails,Please advice

prefetch 9e991ba42c234708243cbdbbdbe84af9bb13fbcd sha1:9e991ba42c234708243cbdbbdbe84af9bb13fbcd size:3119049 http://*****:52311/Uploads/9e991ba42c234708243cbdbbdbe84af9bb13fbcd/Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe(1).Appx.tmp sha256:1a2ee958fa1291380e2bb337b81f2ab09824e2d71a399eb4fe79053aa6432c36
extract 9e991ba42c234708243cbdbbdbe84af9bb13fbcd
wait “__Download\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx”

copy “__Download\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx” “C:\Temp\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx”

waithidden powershell.exe -Add-AppxPackage -Path “C:\Microsoft.HEIFImageExtension_1.0.43012.0_arm64__8wekyb3d8bbwe (1).Appx”


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

i executed below one

Attached the fixlet, it completes but with exit code 1 also checked the powershell log in C:\windows\temp\ it says that -Add-AppxPackage is not a recognized as name of cmdlet

i checked in powershell AddAppxPackage is a valid command

PS C:\Users\abc> Add-AppxPackage

cmdlet Add-AppxPackage at command pipeline position 1
Supply values for the following parameters:
Path:

I based my command lines on your earlier post. It looks like there should be no hyphen in front of “-Add-AppxPackage”

Yes Sir I edited that still, it results in Non-zero( 1 ) as the exit code.
Debugger is successful but in console it says completed or waiting with exit code 1

This time the log says A positional parameter cannot be found that accepts argument ‘$null’…
At Line:1 Char:1

Hi,

Did you ever get this to work? If so, how did you resolve?

I am working on this right now and I will give an example of what I am doing using your prefetch.

prefetch 034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c sha1:034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c size:1595687 http:\xxxxxxxx:52311/Uploads/034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c/Microsoft.HEIFImageExtension_1.0.50272.0_x64__8wekyb3d8bbwe.Appx.tmp sha256:04be844e7dedda508c20cc9bef414189d2ee1c1021cbeafaae674d83d639f535
extract 034f9ca0e59c0a0a1a6d7c11b285f7719bb2ea3c
wait __Download\Microsoft.HEIFImageExtension_1.0.50272.0_x64__8wekyb3d8bbwe.Appx

delete __createfile
createfile until END_OF_FILE

Add-AppxProvisionedPackage -Online -PackagePath “__Download\Microsoft.HEIFImageExtension_1.0.50272.0_x64__8wekyb3d8bbwe.Appx” -skiplicense

END_OF_FILE

delete powershell.ps1
move __createfile powershell.ps1

waithidden { pathname of file ((it as string) of value “Path” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell” of native registry) } -ExecutionPolicy Bypass -File powershell.ps1