Oct 06 2020 11:09 AM
We are in an enterprise environment and would like to use the .appinstaller file to install a UWP app provisioned for all users to keep our in-house app up to date.
The reason we need the app provisioned for all users is the need to be on shared devices.
Is provisioning an MSIXBUNDLE through .appinstaller possible?
If so, how would you run the command line through SCCM to do the initial install so that it can poll the correct location?
If not, can the package installed directly via MSIXBUNDLE through SCCM with code in the app performed to activate the appinstaller API? Is there an example of this somewhere that I am missing?
Thank you in advance for your time
Oct 12 2020 03:24 PM - edited Oct 13 2020 11:47 AM
Hi @tjmullen2,
If I understand your request correctly, you wish to provision an app for all users, and make use of an auto-update feature, to prevent the need for re-deploying the application to client devices. If this is your desire, then the following options should be considered:
Add-AppxProvisionedPackage -SkipLicense -Online -PackagePath .\FileName.msixbundle
Add-AppxPackage -AppInstallerFile .\FileName.appinstaller
## Sets the Variable values
$AppInstallerLocation = "C:\Users\MSIX\Desktop\AppInstallers\HeadTraxPkg_x64.appinstaller"
[xml]$AppInstallerContent = [xml]$(Get-Content $AppInstallerLocation)
## Installs the AppxPackage
Add-AppxPackage -AppInstallerFile $AppInstallerLocation
## Forces the App to be Provisioned
$PackageFamilyName = $(Get-AppxPackage -Name $($AppInstallerContent.AppInstaller.MainPackage.Name) -Publisher $($AppInstallerContent.AppInstaller.MainPackage.Publisher)).PackageFamilyName
$PackageManager = new-object windows.management.deployment.packagemanager
$PackageManager.ProvisionPackageForAllUsersAsync($PackageFamilyName)
Option 3 will allow you to create a private instance of your business app for distribution only to users within your enterprise environment. Devices will connect into the store on a set frequency and will retrieve any new updates. This solution does not require the device to be within your network to receive updates. ConfigMgr inventory reports will allow for software version validation.
Answers to your question in-order:
I hope that you found this information useful.
Thank you,
Roy
Sep 05 2023 12:54 AM
Thank you for your reply on this topic - I encountered a similar issue requiring provisioning support for appinstaller, in order to be able to downgrade a provisioned package.
I tried using options 1 & 2 -
fails installing the lower-version package with Add-AppxProvisionedPackage with a "file already exists" error
Option 2 -
fails installing the lower-version package with Add-AppxPackage, with the following error
"Add-AppxPackage : Deployment failed with HRESULT: 0x80070005, Access is denied."
It is described more fully in this question
So my question is - how can I install a lower version of a provisioned msix package, without uninstalling the existing one, from command line?
Thank you!
Sep 14 2023 11:47 AM - edited Sep 14 2023 11:49 AM
@kerenor
To make Option 2 work, try running PowerShell in elevated mode i.e. Run as Administrator before running the command:
Add-AppxPackage -AppInstaller FileName.appinstaller -Path
-Fiza
PM, MSIX Team
Sep 14 2023 11:55 AM - edited Sep 14 2023 11:56 AM
Thanks
This was done in elevated mode. It also successfully installed a package of a higher version - just the lower version failed. Meaning (in some pseudo-code for clarity, I hope):
Add-AppxPackage -AppInstallerFile version_1.0.0.0.appinstaller # Works fine
$PackageManager.ProvisionPackageForAllUsersAsync($PackageFamilyName) # Works fine
# Upgrade
Add-AppxPackage -AppInstallerFile version_1.0.5.0.appinstaller # Works fine
$PackageManager.ProvisionPackageForAllUsersAsync($PackageFamilyName) # Works fine
# Downgrade
Add-AppxPackage -AppInstallerFile version_1.0.3.0.appinstaller # Fails as described
Sep 14 2023 05:52 PM
Sep 16 2023 02:48 AM - edited Sep 16 2023 02:48 AM
Thank you for your response.
I see you've mentioned it's likely not possible with a provisioned package version 1 - not sure what the versioning here means? and whether it's possible to use a different version?
Thanks
Sep 16 2023 08:41 AM