2

So I need to create an installer for a .NET project I'm working on with a custom window for a license validation and activation. This means that I would need to validate some user input (I need a valid License Key) to activate the license before proceeding with the instalation. I've tried multiple approaches but so far nothing is working. Here's what I tried:

  1. Using the Microsoft Setup Project for Visual Studio, I tried calling a WPF window during the instalation process. However, the window just does not show up, as I've explained in my issue here. So far, I've found no workaround for this.
  2. Still using the Microsoft Setup Project for VS, I can add custom dialogs to the installer but it is apparently not possible (see here and here) to validate user input of this dialog before continuing with the instalation process.
  3. I've also tried implementing a WiX installer but I cannot access the WiX Editors and it seems that Add-In Express's Designer for WiX Toolset has been discontinued. Would what I need even be possible to implement if I had access to the editors?

How should I do this? I would be thankful for any suggestion.

SofiaFeist
  • 53
  • 4
  • 1
    [I prefer to put license validation in the application for many reasons](https://stackoverflow.com/a/24360658/129130). Please skim. However, it is certainly technically possible to do this in the setup - I have done so myself (enough to conclude that you should put this in the application you install - if possible). Installshield and Advanced Installer have ready-made dialogs for this purpose, and WiX can certainly to it, however I don't have a sample ready for you I am afraid. – Stein Åsmul Sep 23 '22 at 15:22
  • 1
    These samples relate to WiX GUI, but they don't deal with licensing: https://github.com/glytzhkof/WiXCustomDialog, https://github.com/glytzhkof/WiXOpenLogFile, https://github.com/glytzhkof/WiXViewLogExperiment - and [an old answer on WiX / MSI GUI](https://stackoverflow.com/questions/52654935/changing-text-color-to-wix-dialogs/52674815#52674815). – Stein Åsmul Sep 23 '22 at 15:37
  • Keep in mind that you need to set a new UPGRADEGUID in some of these samples to make them compile. You will see the field say "PUT-GUID-HERE" or similar. – Stein Åsmul Sep 23 '22 at 15:48
  • @SteinÅsmul Thank you for your answers! I will check the documentation you provided and reconsider putting license validation in the application, instead of the setup. – SofiaFeist Sep 23 '22 at 15:56
  • 1
    Hope the samples help. Please test what works for your purpose. More links on my experimental site: https://www.installdude.com/jumpgate.php. The [answer with rationales for validation put in the application instead of the setup](https://stackoverflow.com/a/24360658/129130) could help managers accept the change? – Stein Åsmul Sep 23 '22 at 15:59

0 Answers0