Tuesday, 31 January 2012
Files to update in a patch
Thursday, 3 November 2011
Wix: Set MSI filename based on version
A nice post on how to change the output MSI file name in Wix project based on the primary assembly’s version:
Friday, 21 October 2011
Wix: Showing debug information on dialog boxes
In Wix, a property value can be <empty> or with some value.
One way to find debugging information in Wix is to show it on the setup dialog boxes. For instance, we can show the product code on the welcome dialog box if we find any previous version of the product. We can do this as follows:
<!-- FOR DEBUGGING --><Control Id="Debug1" Type="Text" X="135" Y="150" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.Debug.WelcomeDlgTitleForUpgrade)" ><Condition Action="show">DEBUGGING</Condition><Condition Action="hide">NOT DEBUGGING</Condition></Control>
Now we can pass the DEBUGGING parameter as one of the console argument:
msiexec /i "TestApp.msi" DEBUGGING=X ------when we want to show debugging information
(you can assign any value to DEBUGGING even 0 (zero), it will work as long as it is not empty)
msiexec /i "TestApp.msi" DEBUGGING=
or msiexec /i "TestApp.msi" ------when we want it to run the normal way
Happy Wixing!
Sunday, 18 September 2011
Wix: How to hide the License Agreement dialog in Mondo UI
We are using the WixUI_Mondo in our setup so that we could allow the users to select/de-select features. However the app is installed on intranets so we did not want to show the License Agreement dialog box. A few pp. suggested downloading the Wix source code and manually changing the part which shows up the LA dialog box.
I found out that we could also, change the click event action of Next and Back button controls using Publish tag.
So we changed the Next button click event action of the ‘Welcome dialog’ (WelcomeDlg) to show directly the second dialog box. For .e.g:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="ConnectionPortsDlg" Order="3">1</Publish>
And of course also the Back button event action to display the ‘Welcome dialog’.
The full <UI> tag code:
<UI Id='MyAppWix_UIMondo'><UIRef Id="WixUI_Mondo" /><UIRef Id="WixUI_ErrorProgressText" /><DialogRef Id="ConnectionPortsDlg" /><DialogRef Id="FileModeMSMQInfoDlg" /><Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="ConnectionPortsDlg" Order="3">1</Publish><Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="DBConfigurationDlg">1</Publish></UI>
If you are not using custom dialogs, here is the string:
<UI Id='Mondo'><UIRef Id="WixUI_Mondo" /><UIRef Id="WixUI_ErrorProgressText" /><Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg" Order="3">1</Publish><Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3">1</Publish></UI>
Happy Wix coding!
Thursday, 18 August 2011
Advantages of Wix over Visual Studio setup and deployment project
Why are we using Wix over VS setup projects:
- VS setup projects are buggy:
For e.g. we noticed that when an assembly is referenced by two different projects which reside in different folders, then after adding it in separate folders the VS setup project doesn't add the file in the second project's folder. - VS Setup projects require Visual Studio to be installed on build server and with that come the licensing issues
- No scripts needed to change set up settings: Wit Wix we do not need scripts which change the ProductName with the version info (which shows up on the UI) in the set up project file. You can pass in the new product name as a parameter to Wix.
- Upgrades: It is really cool to tell users that they don't need to uninstall the application to get the one - it saves time and energy. They don't need to backup important data, they can trust us. Upgrades allow easy configuration file updates as they can be migrated to the new version without losing data. (Upgrades were possible with VS Setup projects as well, but I find with Wix it is much more easier)
- Patch creation: With Wix you can create .MSP patches. It's a little complicated but is quite useful when you have an urgent quick fix to deliver and you don't want the user to go through again with uninstall-install process. Also patches could be uninstalled, so it is useful if the user only wants to test something - and if it doesn't suit him then he can uninstall the patch.
- Run your application after installation: How many times did we think about adding that check box on the last screen of installation which says 'Run this application'? Well Wix allows you to do that.
- Feature selection: If your application can have different sub-projects or modules and there are scenarios where some users may not use at all some of these modules then it is a good idea to not install them. For that you can use Wix and define features. You can set some features as not installed by default and some as mandatory.
- It's all XML: Who doesn't like XML? No need of that fancy setup editor, but at the same time even the UI dialog boxes are in XML - so you need to spend some time to get the right layout.
- Finally it is about control: Wix gives you the power and absolute control how you want the setup experience to be. But at the same time you also have a big responsibility to make sure that everything goes well. VS setup projects are good when the application is not used by many users, there are no frequent upgrades, no urgent quick fixes to deliver.
Shorts - week 3, 2022
Post with links to what I am reading: 1. A very good post on different aspects of system architecture: https://lethain.com/introduction-to-a...
-
Let’s look at another often used control in business applications – TreeView. It is a great control to visualise hierarchical data. Take an ...
-
Many times we use delegates such as Action<T> or Func<T, TResult> and we do not want to pass in any argument. For instance, let’...