Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create a custom WPF setup wizard

i've built my first wpf application, nothing fancy, but i wanna make it look cool by adding a setup, ive researched in the internet about some free utilites to do it, but since its a wpf app, i wat the setup to go along those lines... any idea how i can create a custom wpf setup wizard?

like image 607
Dabiddo Avatar asked Mar 26 '26 03:03

Dabiddo


2 Answers

When building a WPF setup, you neet to solve the problem of .Net bootstrapping - if the client does not have .Net, your setup will not work.

Once you solve that, your setup will need to do couple of things:

  • request admin elevation to access certain file and registry locations
  • deploy all necessary files in %ProgramFiles%\
  • create proper entry in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall (if your application is compiled explicitly for x86, you'll need to do it in the Wow6432Node on 64-bit machines)
  • create a shortcut in All Programs\
  • do additional stuff like COM registration, file association and so on depending on what features your app provides

Most of these are provided for free by Windows Installer (MSI). You should really use something like WiX to build regular installer, even though it's not going to be as snazzy as WPF can be.

If you really want to be fancy, you could actually build custom WPF UI that's driven by the MSI engine, but the overhead of doing this is probably not worth it.

Update: Here are couple of links that can help if you still decide to build a WPF UI Setup:

  • Monitoring and Installation Using MsiSetExternalUI
  • MsiSetExternalUI
  • Installer Functions Reference
like image 85
Franci Penov Avatar answered Mar 28 '26 16:03

Franci Penov


Either:

a deployment project in visual studio

ClickOnce

Wix

deployment projects have been around the longest. microsoft seems to be pushing clickonce the most for .net wix gives you the most control over msi

like image 38
Mark Synowiec Avatar answered Mar 28 '26 17:03

Mark Synowiec



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!