This is an answer to your last comment - because it's kind of a "solution".
@Wix: Tutorial: I think it's quite "good" because you have small "snippets" with examples for concret requirements - it's not required to read it as a "whole".
@CustomActions: See the tutorial at
Extra Actions[
^] as a reference.
Start to add a "C# Custom Action Project for Wix v3" from VisualStudio (wix installed all the project templates for you)
this should be easy - it pre-generates code for one action - just fill in your code for licence check and you are good.
You can also use the Setup-Variables (have to be uppercase to be "global" in wix) to communicate "back" to the setup with the "session" object.(example taken from one of my action which can read and edit the app.config Files)
session.Log(strFilePath);
if (File.Exists(strFilePath))
{
session["CONFIGURATION_FOUND"] = "1";
ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = strFilePath;
if (map == null)
{
session.Log("map null");
session["CONFIGURATION_INVALID"] = "1";
return ActionResult.Success;
}
The "difficult" part is to find the right "place" in the setup sequence, i think a good place for your licence check could be after "FindRelatedProducts" at the beginning of the setup... (but that depends when you want to make it)
<InstallUISequence>
<Custom Action='MyLicenceCheckAction' After='FindRelatedProducts'>LICENSEOK</Custom>
@Custom UI: You can get an idea about the basic workings of the Installer UI here
A Single Dialog[
^] - as I mentioned before (in the comments) have a look at the code under
wix3/src/ext/UIExtension/wixlib at develop · wixtoolset/wix3 · GitHub[
^] to change (as example) the Mondo_UI. You will "Publish" your dialogs then always with the same (clumsy, error-prone process) - Find the place where your dialog should appear in the sequence (this can depend on conditions), change the "Publishing" of the dialogs before and after the new one to correctly navigate "back" and "next".
Example from my codebase: (I have a custom configuration Dialog "injected" after you select "Custom Installation"
The publishing of my dialog is like this:
<Publish Dialog="DialogUpdatingConfiguration" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">WixUI_InstallMode = "InstallCustom"</Publish>
<Publish Dialog="DialogUpdatingConfiguration" Control="Back" Event="NewDialog" Value="DialogSetupOptions">1</Publish>
The Publishing of the dialog before that changed to:
<Publish Dialog="DialogSetupOptions" Control="Next" Event="NewDialog" Value="DialogUpdatingConfiguration" Order="2">EDIT_CONFIGURATION = 1</Publish>
and the publishing of the dialog after my custom one (the Default VerifyReadyDlg) changed to
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DialogSetupOptions" Order="5">WixUI_InstallMode = "InstallCustom"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="DialogUpdatingConfiguration" Order="6">EDIT_CONFIGURATION = 1</Publish>
You see that in case EDIT_CONFIGURATION == 1 I know that I came from my "DialogUpdatingConfiguration" so "Back" means go back to that dialog, in ohter cases I will go back to other Dialogs, for each condition/Navigation you have to add a "Publish" entry…
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">WixUI_InstallMode = "Update"</Publish>
If you reached this point, I think from here everything is just more of the same. Feel free to ask further questions, I will try to help ;)
Just play arround a little with wix - I hope you will come to the same conclusion as I did: Wix is great and it solved all my setup "problems" in one way or the other. I never found a "show-stopper" that didn't let me realize what I wanted (Firewalls, COM-Server registration, Lic-Checks, Custom-Config, Localization of setups, dependency checks, and a myriad other things where the robocopy-based setup "solutions" find their limits ;) - sorry for sounding like an advertiser (I'm not associated or work on wix in any form) - I think in my current codebase I have arround 50 wix based setups :D (not so small software-suite)
Kind regards Johannes