Forum Discussion
Provisioning support for .appinstaller?
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 -
- Option 1 -
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 https://learn.microsoft.com/en-us/answers/questions/1359804/how-to-downgrade-a-provisioned-package-(with-add-a
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!
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
- kerenorSep 14, 2023Copper Contributor
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 15, 2023While there is an option to replace a package with a lower version, I don't believe you can do so with a provisioned package (Version 1). But you could use a powershell script to look for any version of the app other than the one you now want, remove it if installed, then provision the version you need.
- kerenorSep 16, 2023Copper Contributor
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