I am trying to remove the license agreement from the built-in WixUI_InstallDir dialog set. I found some helpful instruction here
I've added this to the Product.wxs
<UI Id="InstallDir">
<UIRef Id="WixUI_InstallDir" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">NOT Installed</Publish>
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
</UI>
The next button on the welcome dialog happily goes to the install directory dialog, but the back button of InstallDirDlg goes to the license agreement.
Any ideas would be appreciated.
I posted this question in the WiX-user mailing list. The consensus was that trying to change some of the publish commands in a built-in dialog set is not a "recipe for success". Instead I got the source wxs for the WixUI_InstallDir, made a copy of it (WixUI_NOEULAInstallDir), modified it and included in my project. I was trying to avoid having a custom dialog file in all my solutions, but I was able to export a project template that has the custom dialog included, so it's not so bad.
Related
I have following code snippet to open a Browse Dialog
<Control Id="ChangeFolder" Type="PushButton" X="500" Y="142" Width="56" Height="20" Text="Browse" />
And other publish code to make sure that it calls for default BrowseDlg
<Publish Dialog="InstallLocationDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="InstallLocationDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
However, when I build and click the Browse button, following screen pops up with icons failing to load.
What would you think is the cause of this?
I have used WixUI_InstallDir and saw the icons.
It is just when I want to call BrowseDlg from my UI that is having issue.
Any suggestion would be appreciated.
Thank you.
I was missing <UIRef Id="WixUI_Common"/> by adding it, everything is resolved.
I am using the WIX default BrowseDlg to capture a value to insert into the web.config file. I am using code that I have seen in numerous places now.
<Control Id="btnDirBrowse" Type="PushButton" Width="56" Height="17" X="260" Y="57"
Text="!(loc.DataDialog.BrowseCaption)" >
<Publish Property="_BrowseProperty" Value="DATALOCATION" Order="1">1</Publish>
<Publish Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
</Control>
The problem I have is that when I click ok after navigating to a file location, I get error 2727:
The directory entry '[2]' does not exist in the Directory table.
The value I am getting represents the location of data files that have already been installed on the system. This location has nothing to do with the installer other than being a string value to write to web.config. If I don't use BrowseDlg and just enter a string in the textbox of my custom dialog, everything works fine, but if I use BrowseDlg, I get this error.
The location of the existing data files could be anywhere on the network, so I have no idea how to establish a reference in the Directory table.
What can I do to make BrowseDlg happy?
I just wanted to provide an fix that worked for me. I was having the same issue but with the default directory browser in wix.
My problem was that my "WIXUI_INSTALLDIR" property was something other than "TARGETDIR". Essentially, from what I'm guessing the "Directory table" must reference a directory created by a Directory tag.
For example:
<Directory Id="TARGETDIR" Name="SourceDir">
The below fixed my issue
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
I have two Wix projects - one that creates the MSI and the other that bootstraps it into an exe.
Using the exe, I can install the application with no issues, but when I try to uninstall the application, I get my installer's setup menu again and it attempts to install itself again.
If I cancel the re-install, and attempt to uninstall again, it works as expected.
If I perform the same workflow with the msi, it works as expected.
Here's what my bootstrapper looks like:
<Bundle Name="name" Version="2.0.0.0" Manufacturer="company" UpgradeCode="guid" IconSourceFile="icon.ico" DisableModify="yes">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="license.rtf" SuppressOptionsUI="yes" SuppressRepair="yes" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage SourceFile="application.msi" DisplayInternalUI="yes" EnableFeatureSelection="yes"/>
</Chain>
</Bundle>
Any ideas?
Update
As per suggestions, I've modified my bundle to the following (set EnableFeatureSelection to no), but it's still showing the same behavior.
<Bundle Name="name" Version="2.0.0.0" Manufacturer="company" UpgradeCode="guid" IconSourceFile="icon.ico" DisableModify="yes">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="license.rtf" SuppressOptionsUI="yes" SuppressRepair="yes" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage SourceFile="application.msi" DisplayInternalUI="yes" EnableFeatureSelection="no"/>
</Chain>
</Bundle>
Update #2
I noticed that when I uninstall for the first time and it launches the install setup, if I cancel the setup, it fails, but it has already removed all the files and registry keys. Running the uninstall the second time removes the entry from the Add/Remove programs (successfully).
Update #3
Here's the UI sequence for the msi
<UI>
<DialogRef Id="WelcomeDlg"/>
<DialogRef Id="LicenseAgreementDlg"/>
<DialogRef Id="VerifyReadyDlg"/>
<DialogRef Id="ErrorDlg" />
<DialogRef Id="FatalError" />
<DialogRef Id="FilesInUse" />
<DialogRef Id="UserExit" />
<DialogRef Id="SelectDbDlg" />
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg"></Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">NOT Installed</Publish>
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="SelectDbDlg">NOT Installed</Publish>
<Publish Dialog="SelectDbDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish>
<Publish Dialog="SelectDbDlg" Control="Next" Event="NewDialog" Value="DbCreateCredDlg">NOT Installed</Publish>
<Publish Dialog="DbCreateCredDlg" Control="Back" Event="NewDialog" Value="SelectDbDlg">NOT Installed</Publish>
<Publish Dialog="DbCreateCredDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">NOT Installed</Publish>
<Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="DbCreateCredDlg">NOT Installed</Publish>
<Publish Dialog="SetupTypeDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg">NOT Installed</Publish>
<Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="FeaturesDlg">NOT Installed</Publish>
<Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="VerifyReadyDlg">NOT Installed</Publish>
<Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="VerifyReadyDlg">NOT Installed</Publish>
<Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg">NOT Installed</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg">NOT Installed</Publish>
<Publish Dialog="ExitDialog" Control="Back" Event="EndDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
</UI>
This sounds like there is an issue with the MSI. Since you have DisplayInternalUI="yes", the UI belonging to the MSI is what you see when the application is being added or removed. My guess is that there is some issue with the order in which the MSI install dialogs are being displayed, or with the conditions on which the MaintenanceTypeDlg dialog is displayed. Without seeing the options set on the MSI, or the publish order for the UI dialogs and the conditions under which they are displayed it is hard to say where the problem lies specifically. An example of what your UI fragment for the MSI looks like would help further diagnose if this is the issue.
----Edit----
As I expected the only path for your UI to follow is the install path, and the condition on the WelcomeDlg element forces it down that path. To fix this, remove the current WelcomeDlg and replace with the following two lines:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed AND NOT PATCH</Publish>
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
This will use the bootstrapers welcome screen to determine if the user wants to uninstall and, since there is no Installed condition to publish the VerifyReadyDlg, skip right to the unistallation without publishing any of the MSI's UI dialogs. This appears to be what you are looking to do, however, if you did want to set a sequence of dialogs in the MSI to guide the user through the uninstall, you could add those dialogs here.
After a couple more days of poking at it, I found the problem and it was due to the MSI throwing an error upon uninstall (silently). I have some custom actions defined, but I did not have them set to run only upon install.
So I had this before:
<InstallExecuteSequence>
<Custom Action="ServerName.Set" Before="AdjustConfigurationFile"/>
<Custom Action="AdjustConfigurationFile" Before="InstallFinalize"/>
<Custom Action="CreateDatabase" After="InstallFinalize"/>
</InstallExecuteSequence>
Upon uninstall though, the custom action would run to adjust the configuration file (which would fail becaue the file no longer exisited) which would cause the application to rollback, which would cause the installer to run again.
Changing the Install sequence to the following fixes this issue:
<InstallExecuteSequence>
<Custom Action="ServerName.Set" Before="AdjustConfigurationFile">NOT Installed</Custom>
<Custom Action="AdjustConfigurationFile" Before="InstallFinalize">NOT Installed</Custom>
<Custom Action="CreateDatabase" After="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
The takeaway here is that if you're uninstalling the bootstrapper and the installer UI shows up again, THE MSI THREW AN ERROR and you should double check that logic.
Add to your MsiPackage element InstallCondition attribute with NOT Installed. If you want run install on upgrade then ypu have to add or UPGRADINGPRODUCTCODE.
i have created a custom action for getting sites from IIS server.when i run it in my local machine it's working perfectly.but when i run it in another machine it's not working.
locator for custom action
<"Binary Id ="IisManager" SourceFile="$(var.SourceDir)\bin\CustomActions.CA.dll"/>
("used for foarmat this)
<UI Id="MyWixUI_Mondo">
<UIRef Id="WixUI_Mondo"/>
<UIRef Id="WixUI_ErrorProgressText" />
<DialogRef Id="IisSettings" />
<Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="IisSettings" Order="3">LicenseAccepted = "1"</Publish>
<Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="IisSettings">1</Publish>
<InstallUISequence>
<Custom Action="GetIISWebSites" After="CostFinalize" Overridable="yes">NOT Installed</Custom>
<Custom Action="GetIISAppPools" After="CostFinalize" Overridable="yes">NOT Installed</Custom>
</InstallUISequence>
</UI>
have i done something wrong? working only in my machine...
Your custom action is crashing because it's referencing a COM class that is not registered on the other machine. Apparently that CLSID belongs to Microsoft.ApplicationHost.WritableAdminManager and the ServerManager managed API, so if they are not present on the target machine your code will fail. A web search for -CLSID {2B72133B-3F5B-4602-8952-803546CE3344- may get you some more info, but this isn't a WiX or Windows Installer issue as far as I can tell.
Running Setup file with Administrative privileges resolved the issue.
CMD ->>Run As administrator -> Go To setup file and Run it.
WiX is shipped with some UI options. I created a test project to try upgrade.
I use Mondo UI for this matter. The upgrade runs fine, the question is, the UI does not react to it as upgrade but as plain installation. I don't know if upgrade has supported UI or not and this is mainly the question:
Is it supported or am I missing something?
Try to add your own chain of dialogs. For example:
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="20">
( Installed AND (PATCH OR REINSTALL ) ) OR WIX_UPGRADE_DETECTED
</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">REINSTALL OR WIX_UPGRADE_DETECTED</Publish>