UWP installer without powershell

I am looking for a more user friendly way to make an installer for my UWP application. I do not want to distribute through the repository, and I know that you need to set the developer option to enable application downloads.

Is it possible, in C #, to mimic the execution of a PowerShell script that deploys an appx package to a system? And if so, how does it work if you want to upgrade the appx package instead of a new installation?

It seems a little strange that my users must manually execute the powershell script command to install the application. Therefore, I would like to create an installer.

EDIT: for development, I'm looking for a C # way to install the appx package. I do not want to use any command line / external tools

thanks

+6
source share
2 answers

You can install the appx package from code using the Windows.Management.Deployment.PackageManager AddPackageAsync object . This is demonstrated for C ++ and C # in Add Sample Application Package Package on MSDN.

To upgrade an existing PackageManager. UpdatePackageAsync

+4
source

Microsoft has now added its own graphical installer. You can simply double-click the appxbundle file.

If you use a self-signed certificate, it must be installed as trusted on the system. The cer file is also located in the zip archive, which is created by Visual Studio.

+1
source

All Articles