Search code examples
uwpwindows-installercustom-actionappx

How do I add custom actions to UWP installer like we do for normal desktop application installers?


I want UWP installer to detect the installed .net version, handle uninstalling of an older build before installing the new one, allow system administers to do a mass install to PCs within their network. All the three things were easy to do for normal desktop application as we could create custom actions and do silent installations. But how do I achieve these with the appx file?


Solution

  • You simply cannot. The installation process of uwp apps is standartized to work on all devices supported by the OS. Custom install actions do not make sense when writing the app for e.g. Hololense, PC, mobile and XBOX. You'll get nowhere.

    detect the installed .net version

    Why would you worry about this? You ship your application compiled for a certain CLR version. If a PC is missing this version, the administrators are at fault.

    uninstalling of an older build before installing the new one

    This will happen automatically when installing a newer version.

    allow system administers to do a mass install to PCs within their network

    This is possible, but not an integrated part of the installation process. Your administrators have to apply a certain deployment process in order to role out the app to all computers.