Page 2 of 2

Re: Problem with install_msi_if_needed and msix file

Published: November 10, 2023 - 4:03 PM
by t.heroult
Test result: it only works if the user is an admin of the machine.

Re: Problem with install_msi_if_needed and msix file

Published: November 10, 2023 - 4:05 PM
by sfonteneau
On a forum obviously it indicates that you have to use Add-AppxProvisionedPackage

Currently the installation of an MSIX app to all users does require the use of the Add-AppxProvisionedPackage PowerShell cmdlet, or the use of the DISM parameter /add-appxprovisionedpackage.

https://learn.microsoft.com/en-us/power ... escription

Re: Problem with install_msi_if_needed and msix file

Published: November 10, 2023 - 4:29 PM
by t.heroult
Good call on the cmdlet!
However, this cmdlet must be executed with an admin account, but for this, the LOCAL SYSTEM account is authorized.
Here is the complete setup.py file for those who are interested:

Code: Select all

from setuphelpers import *
PackageName = "MSTeams_23285.3604.2469.4152_x64__8wekyb3d8bbwe"
def install():
    print("Installation du Nouveau Teams")
    cmd = r'powershell Add-AppxProvisionedPackage -Online -SkipLicense -PackagePath "MSTeams-x64.msix"'
    run(cmd)

def uninstall():
    cmd = r'powershell Remove-AppxPackage -AllUsers %s' %(PackageName)
    run(cmd)
Reminder :
- "-Online" to integrate with the current Windows installation
- "-SkipLicense" otherwise the cmdlet fails because it normally requires a license file which is not provided.

Thanks Simon, thanks to you, I'm going away for the weekend having finished this!

Have a great weekend!


For those who are interested:
x86: https://go.microsoft.com/fwlink/?linkid=2196060
x64: https://go.microsoft.com/fwlink/?linkid=2196106

Re: [SOLVED] Problem with install_msi_if_needed and msix file

Published: November 14, 2023 - 11:35 AM
by jpele
Hello,
The package will soon be available on the Store and is already available on the Testing repository: https://wapt.tranquil.it/wapt-testing/t ... EPROD.wapt

Regards,
Jimmy