Click here to Skip to main content
15,906,625 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I need to get a Modern UI using Wix or WixEdit. Is it possible? If yes, how?

Also, I want to activate the installer using my server(Activation Key). How can this be made possible in Wix Toolset or using WixEdit?

What I have tried:

I have tried may 3rd party tools like Installforge & Inno Setup. But I came across Wix as a fully customizable installer creator. So I turned up to Wix.
Posted
Updated 15-Jul-20 3:31am
Comments
Richard MacCutchan 10-Jul-20 5:04am    
Check the documentation.
MadMyche 10-Jul-20 5:38am    
Your best bet would be to read the documentation and find some tutorials. Google may be of assistance.
D J Code 11-Jul-20 11:29am    
@MadMyche: I have already searched the web, google and also in the forums. I have also tried to find documentation related to customizing UI in Wix. But I could not find anything useful. Can you please comment me some link of Wix documentation related to my question?
frostcox 12-Jul-20 16:22pm    
HI, we used wix for a couple of years, we ended up moving away from it due to how difficult it was to customise. We then just purchased a perpetual licence for Install Shield for 50 bucks and it is 100 times easier to use and saved us countless hours.
johannesnestler 13-Jul-20 10:55am    
Hi DJ Code - I also use wix to make installers, I changed the Mondo_UI a Little (not quite what you have in mind though). Have a look at the wix tutorial how to customize your UI (not so easy...) but it was a great help to just look at (and copy Code) from the Mondo_UI Code (see https://github.com/wixtoolset/wix3). Don't listen to others suggesting "cheap" alternatvie like InstallShield (it's just a better copy tool, doesn't realy solve real "Installation" Problems, doesn't work great with sourcecontrol, ... - but i agree that for most people this is "enough" until problems occure..). I think wix is a great tech ;) - but to if i really Need an "designed" installer UI I would proably make a custom application to "Control" normal msi-packages (which you can create with wix) - just an idea…

Kind regards Johannes




1 solution

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; // don't break the custom action here
      }


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:
XML
<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:

XML
<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
XML
<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…
XML
<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
 
Share this answer
 
Comments
D J Code 15-Jul-20 10:29am    
Thanks for the solution! I will reply your comment if any problems persist.
johannesnestler 16-Jul-20 0:52am    
you are welcome - good luck with your project!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900