Machine-wide Package Provisioning (Install for All Users)

%3CLINGO-SUB%20id%3D%22lingo-sub-1766287%22%20slang%3D%22en-US%22%3EMachine-wide%20Package%20Provisioning%20(Install%20for%20All%20Users)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1766287%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20no%20other%20way%20to%20provision%20(and%20uninstall)%20a%20package%20for%20all%20users%20other%20than%20to%20use%20the%20PowerShell%20commands%20(Add-AppProvisionedPackage%2C%20Remove-AppPackage)%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EContext%3A%3C%2FP%3E%3CUL%3E%3CLI%3EWe%20are%20building%20an%20ASP.NET%20Core%20application%20hosted%20as%20a%20windows%20service.%3C%2FLI%3E%3CLI%3ENeed%20to%20display%20a%20notification%20icon%20in%20the%20tray%20for%20all%20users%20(needs%20to%20run%20at%20login%20time)%3C%2FLI%3E%3CLI%3ENeed%20to%20deploy%20a%20WPF%20UI%20application%20for%20all%20users%3C%2FLI%3E%3CLI%3EAll%20components%20need%20to%20be%20deployed%20in%20a%20single%20side-loaded%20MSIX%20package%20for%20all%20users.%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20far%20as%20I%20can%20tell%20PowerShell%20is%20the%20only%20way%20to%20accomplish%20this.%20Unfortunately%20that%20is%20not%20acceptable%20for%20non-technical%20end%20users%20who%20are%20used%20to%20simply%20double-clicking%20on%20the%20setup.exe%20to%20install%20software.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20this%20go%20against%20MSIX%20fundamentals%2C%20or%20is%20this%20something%20that%20might%20be%20possibly%20added%20in%20the%20future%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20there's%20no%20other%20way%20to%20do%20this%2C%20could%20I%20suggest%20we%20introduce%20an%20'AllUsers'%20restricted%20capability%20to%20the%20appxmanifest%20file%20that%20flags%20the%20package%20so%20that%20when%20a%20user%20double-clicks%20the%20package%20to%20install%20it%2C%20it%20gets%20provisioned%20for%20all%20users%20(naturally%20would%20require%20prompting%20for%20elevated%20privileges).%20Similarly%2C%20any%20user%20who%20tries%20to%20uninstall%20the%20package%20should%20get%20prompted%20for%20elevated%20privileges%20-%20once%20elevated%2C%20the%20uninstall%20should%20uninstall%20for%20all%20users.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWithout%20this%20functionality%2C%20I%20think%20we%20will%20be%20stuck%20using%20MSI%20well%20into%20the%20future%20for%20our%20nice%20new%20.NET%20Core%20applications.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1776977%22%20slang%3D%22en-US%22%3ERe%3A%20Machine-wide%20Package%20Provisioning%20(Install%20for%20All%20Users)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1776977%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F809707%22%20target%3D%22_blank%22%3E%40nanvik%3C%2FA%3E%2C%3CBR%20%2F%3E%3CBR%20%2F%3ECurrently%20the%20installation%20of%20an%20MSIX%20app%20to%20all%20users%20does%20require%20the%20use%20of%20the%20Add-AppxProvisionedPackage%20PowerShell%20cmdlet%2C%20or%20the%20use%20of%20the%20DISM%20parameter%20%2Fadd-appxprovisionedpackage.%3CBR%20%2F%3E%3CBR%20%2F%3EHave%20you%20considered%20using%20the%20following%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fuwp%2Fapi%2Fwindows.management.deployment.packagemanager.provisionpackageforallusersasync%3Fview%3Dwinrt-19041%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EPackageManager%20API%3C%2FA%3E%20to%20force%20the%20provisioning%20of%20your%20MSIX%20app%20package%20to%20your%20devices%2C%20making%20it%20accessible%20to%20all%20users%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20this%20was%20helpful.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3ERoy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1780726%22%20slang%3D%22en-US%22%3ERe%3A%20Machine-wide%20Package%20Provisioning%20(Install%20for%20All%20Users)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1780726%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F449344%22%20target%3D%22_blank%22%3E%40Roy_MacLachlan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20reply.%20I%20wasn't%20aware%20of%20the%20API%2C%20but%20if%20I%20understand%20the%20documentation%20correctly%20the%20only%20way%20to%20achieve%20the%20'double-click%20to%20install'%20that%20we%20get%20with%20MSI%20is%20to%20create%20a%20bootstrapper%20application%20that%20has%20the%20MSIX%20package%20embedded%20in%20it%20(like%20a%20setup.exe%20does%20with%20MSI%20package).%20That%20would%20imply%20needing%20to%20build%20out%20the%20UI%20experience%20and%20handling%20of%20install%20progress%20etc%20(assuming%20the%20API%20supports%20that).%20While%20it%20may%20be%20technically%20possible%2C%20it's%20not%20the%20type%20of%20software%20we'd%20want%20to%20spend%20our%20time%20building%20out%20and%20maintaining.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20seems%20like%20the%20type%20of%20thing%20a%203rd%20party%20vendor%20like%20Advanced%20Installer%2C%20or%20Flexara%20should%20be%20tackling%20rather%20than%20an%20independent%20ISV.%20Even%20better%20would%20be%20to%20have%20built-in%20support%20for%20it%20as%20I%20suggested%20above.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20worth%20me%20adding%20an%20entry%20into%20the%20ideas%20area%20of%20the%20MSIX%20Tech%20Community%20for%20future%20consideration%3F%20Or%20is%20there%20a%20technical%2Fbusiness%20reason%20that%20it's%20not%20made%20it%20into%20the%20queue%3F%20Seems%20like%20a%20fairly%20common%20thing%20for%20an%20ISV%20to%20install%20an%20app%20for%20all%20users%20-%20I'm%20surprised%20it%20isn't%20easily%20supported.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENels.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1780856%22%20slang%3D%22en-US%22%3ERe%3A%20Machine-wide%20Package%20Provisioning%20(Install%20for%20All%20Users)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1780856%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F809707%22%20target%3D%22_blank%22%3E%40nanvik%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20would%20always%20recommend%20creating%20a%20feature%20improvement%20idea%20and%20putting%20it%20out%20to%20the%20MSIX%20Tech%20Community%20for%20their%20input.%20I%20have%20created%20a%20backlog%20item%20to%20provide%20the%20User%20%2F%20IT%20Pro%20with%20the%20option%20to%20selectively%20install%20an%20MSIX%20app%20for%20current%20%2F%20all%20users%20when%20double-clicking%20on%20the%20MSIX%20app%20installer.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1781462%22%20slang%3D%22en-US%22%3ERe%3A%20Machine-wide%20Package%20Provisioning%20(Install%20for%20All%20Users)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1781462%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F449344%22%20target%3D%22_blank%22%3E%40Roy_MacLachlan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%20I've%20submitted%20a%20suggestion%20to%20the%20community%20as%20well.%20In%20addition%20to%20optionally%20allowing%20it%20for%20the%20end%20user%20%2F%20IT%20Pro%20to%20enable%2C%20I%20think%20it's%20also%20important%20to%20allow%20the%20vendor%20to%20flag%20the%20package%20at%20development%20time%20so%20that%20the%20end%20user%20doesn't%20have%20to%20be%20forced%20with%20making%20the%20decision%2C%20or%20worse%2C%20making%20it%20incorrectly%20and%20having%20to%20remove%2Fre-add%20the%20package%20to%20get%20it%20as%20they%20expect%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20love%20to%20see%20this%20move%20forward.%20MSIX%20is%20a%20big%20step%20forward%20from%20MSI%2C%20but%20without%20this%2C%20I%20just%20can't%20see%20it%20taking%20over%20MSI%20for%20independent%20software%20vendors%20who%20license%20their%20software%20based%20on%20machine%20rather%20than%20a%20Microsoft%20account.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENels.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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.

4 Replies
Microsoft Verified Best Answer

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

@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.

@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.

@Roy_MacLachlan 

Thanks! I've submitted a suggestion to the community as well. In addition to optionally allowing it for the end user / IT Pro to enable, I think it's also important to allow the vendor to flag the package at development time so that the end user doesn't have to be forced with making the decision, or worse, making it incorrectly and having to remove/re-add the package to get it as they expect it.

 

Would love to see this move forward. MSIX is a big step forward from MSI, but without this, I just can't see it taking over MSI for independent software vendors who license their software based on machine rather than a Microsoft account.

 

Nels.