Forum Discussion

nanvik's avatar
nanvik
Iron Contributor
Oct 09, 2020

Machine-wide Package Provisioning (Install for All Users)

Is there no other way to provision (and uninstall) a package for all users other than to use the PowerShell commands (Add-AppProvisionedPackage, Remove-AppPackage)?

 

Context:

  • We are building an ASP.NET Core application hosted as a windows service.
  • Need to display a notification icon in the tray for all users (needs to run at login time)
  • Need to deploy a WPF UI application for all users
  • All components need to be deployed in a single side-loaded MSIX package for all users.

 

As far as I can tell PowerShell is the only way to accomplish this. Unfortunately that is not acceptable for non-technical end users who are used to simply double-clicking on the setup.exe to install software.

 

Does this go against MSIX fundamentals, or is this something that might be possibly added in the future?

 

If there's no other way to do this, could I suggest we introduce an 'AllUsers' restricted capability to the appxmanifest file that flags the package so that when a user double-clicks the package to install it, it gets provisioned for all users (naturally would require prompting for elevated privileges). Similarly, any user who tries to uninstall the package should get prompted for elevated privileges - once elevated, the uninstall should uninstall for all users.

 

Without this functionality, I think we will be stuck using MSI well into the future for our nice new .NET Core applications.

  • Hi nanvik,

    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.

    Have you considered using the following PackageManager API to force the provisioning of your MSIX app package to your devices, making it accessible to all users?

     

    I hope this was helpful.

     

    Thanks,

    Roy

    • nanvik's avatar
      nanvik
      Iron Contributor

      Roy_MacLachlan 

       

      Thanks for the reply. I wasn't aware of the API, but if I understand the documentation correctly the only way to achieve the 'double-click to install' that we get with MSI is to create a bootstrapper application that has the MSIX package embedded in it (like a setup.exe does with MSI package). That would imply needing to build out the UI experience and handling of install progress etc (assuming the API supports that). While it may be technically possible, it's not the type of software we'd want to spend our time building out and maintaining.

       

      This seems like the type of thing a 3rd party vendor like Advanced Installer, or Flexara should be tackling rather than an independent ISV. Even better would be to have built-in support for it as I suggested above.

       

      Is it worth me adding an entry into the ideas area of the MSIX Tech Community for future consideration? Or is there a technical/business reason that it's not made it into the queue? Seems like a fairly common thing for an ISV to install an app for all users - I'm surprised it isn't easily supported.

       

      Nels.

      • Roy_MacLachlan's avatar
        Roy_MacLachlan
        Icon for Microsoft rankMicrosoft

        nanvik 

        I would always recommend creating a feature improvement idea and putting it out to the MSIX Tech Community for their input. I have created a backlog item to provide the User / IT Pro with the option to selectively install an MSIX app for current / all users when double-clicking on the MSIX app installer.

Resources