AirGapped - Fixlet Powershell Add-AppxProvisionedPackage

Trying to install APPX unable to get this to work. I am not sure what I am doing wrong.
The download of the files work, but I am unable to get the Fixlet to complete on the client machine.
It just fails.
I would appreciate any help possible.
Thank you…

Using the following Fixlet example:

“prefetch” to __Download the file (this is working)

action uses wow64 redirection false

delete __createfile
createfile until END_OF_FILE

Add-AppxProvisionedPackage -Online -PackagePath "__Download\"filename".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

At minimum you’ll need to fix the quoting on the filename in the PowerShell script

Actually that is just an example of what I typed. Filename is bogus. This actually have the name of the appx file. the only quotes are on the outside " "

I work on more than one network using IEM on the other. My Task on that systme work.
There is something with BigFix in running this task. I am not sure what the issue is.
The download is happening but the powershell command is failing.

This is a better example of the fixlet I am using:

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

Hi @darkhorse,

Did you manage to resolve this one? I have the same issue at the moment where it works when running via PS on the system but not BigFix.

Thanks!

The two likely causes are

  • BigFix runs in 32-bit mode by default. Add action uses wow64 redirection false before executing the script. (This applies only to ‘BigFix ActionScript’ action type; the native ‘PowerShell’ action type runs in native mode by default).

  • The script is running in the LocalSystem user context. Some PowerShell scripts behave differently when run by LocalSystem versus run by an interactive user account.

Thanks for the insights, @JasonWalker.

The actual script we are using now is:

action uses wow64 redirection false 
override wait 
runas=localuser  
completion=job 
password=required  
user=.\admin 
wait {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 "C:\Temp\run.ps1" 

Still not getting any positive results from tests done so far.

Hi @anademayo ,

Let’s look into the following request -

Airgapped Environment and the which to Install Appx Applications.

I’m always tackling this issue in the following manner -

  1. Copy the Microsoft Store link of the application -
    Google - Microsoft Store Microsoft.HEIFImageExtension
    Actual Link - HEIF Image Extension - Microsoft Apps

  2. Search for Offical Links of the AppxBundle / Appx files
    Microsoft.HEIFImageExtension_1.2.16.0_neutral_~_8wekyb3d8bbwe.appxbundle
    https://store.rg-adguard.net/
    http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/ca7ae9ec-10e3-45a7-9dea-6c4504867809?P1=1748858691&P2=404&P3=2&P4=LEQ6GtedUnt2Rmx4EMPKwdISDjLlC9RSGsUCfz%2BS0YA9y12wp2QRABiFtB%2Bn67bmh%2BlELMBgF8%2Fg4SatkQgsUw%3D%3D
    Download the AppxBundle

  3. Check if the are some Dependencies for the Installation - I can share my experience, each edition of Microsoft Version may require different Dependencies.
    Before Deploying on the Environment, I’m always deploying it on several TEST machines

DISM.exe /Online /Add-ProvisionedAppxPackage /PackagePath "C:\Temp\AppxInstallation\Microsoft.HEIFImageExtension_1.2.16.0_neutral_~_8wekyb3d8bbwe.appxbundle" /SkipLicense

If There are any required Dependencies, you can download them and Assign the on the command with /DependencyPackagePath

So let’s say that as of right now everything is working correctly manually - Let’s create a BigFix script.

ActionScript:

prefetch ...
folder create "C:\Temp\AppxInstallation\"
extract ... "C:\Temp\AppxInstallation\"

delete __Download\installAppx.bat
createfile until __END__
pushd "C:\Temp\AppxInstallation\"
DISM.exe /Online /Add-ProvisionedAppxPackage /PackagePath ".\Microsoft.HEIFImageExtension_1.2.16.0_neutral_~_8wekyb3d8bbwe.appxbundle" /SkipLicense
popd
__END__\
move __createfile __Download\installAppx.bat
wait __Download\installAppx.bat

Additional Information:

Adds one or more app packages to the image.

The app will be added to the Windows image and registered for each existing or new user profile the next time the user logs in. If the app is added to an online image, the app will not be registered for the current user until the next time the user logs in.

Provision apps on an online operating system in Audit mode so that appropriate hard links can be created for apps that contain the exact same files (to minimize disk space usage) while also ensuring no apps are running for a successful installation.

4 Likes

Tested this option but still not getting any results from tests done on multiple devices. Logged out and logged back in, even tried rebooting the device, still nothing. Running the command interactively works smoothly on the device and with no dependency issues. But it doesn’t work when we do the non-interactive way… Will need to further troubleshoot.

As always, you have been very helpful, @orbiton! :slightly_smiling_face: Thank you very much for your inputs!