I want the installer to skip showing setup type screen (where you can choose Typical, Custom, Complete features), How can I do this?
I provided only one feature set named product.
And I also want the user be able to change the installation directory.
If you only require the user to customize the installation folder, use:
<UIRef Id="WixUI_InstallDir" />
If you don't permit customization of the installation folder, use:
<UIRef Id="WixUI_Minimal" />
Chances are you're using one of the built in libraries that does include the Feature Tree selction, i.e.
WixUI_Mondo
WixUI_FeatureTree
WixUI_Advanced
My application only has a licence screen then installation directory screen, and I use this configuration block to-do it:
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
just before the end of my </Product> tag. All the application installs into INSTALLLOCATION in the <Directory> section.
The WixUI dialog library guide might help explain the options
Related
I'm using Wix Toolset for my installation package. I want the user to select the installation path and install my application to that directory but I'm unable to do that. I've tried a few things but they did not worked out. I'll share some of my wix project code and write what I tried. First my code :
<wix>
<Property Id="WIXUI_INSTALLDIR" Value="APPROOTFOLDER" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
</wix>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="APPROOTFOLDER" Name="MyApp">
.
.
.
<SetDirectory Id="APPROOTFOLDER" Value="[WindowsVolume]MyApp\[ProductName]"/>
</Fragment>
I dont share the whole project because I think the rest is not relevant to this part. Right now with this setup I can show to user C:\MyApp\test as default path and user can change that by clicking browse. but since I set the directory with <SetDirectory Id="APPROOTFOLDER" Value="[WindowsVolume]MyApp\[ProductName]"/> this line, when the user change the path the installer is still using C:\MyApp\test. I tried to remove that line and it worked, I was able to install where ever I browse but then the installer pick a random default path. Basically I just want to provide a default path as [WindowsVolume]MyApp[ProductName] and also let the user to change that path and install to that path.
How can I achieve that?
I found the solution, I'll write it down instead of deleting the question maybe someone will be in the situation I am right now.
I've changed the
<Property Id="WIXUI_INSTALLDIR" Value="APPROOTFOLDER" />
line with
<Property Id="WIXUI_INSTALLDIR" Value="TARGETDIR" />
and instead of setting the directory of APPROOTFOLDER I set TARGETDIR.
so instead of this :
<SetDirectory Id="APPROOTFOLDER" Value="[WindowsVolume]MyApp\[ProductName]"/>
I did this:
<SetDirectory Id="TARGETDIR" Value="[WindowsVolume]MyApp\[ProductName]"/>
I'm not 100% sure what was the problem here tbh, I think the problem was I was not using my root directory Id both in WIXUI_INSTALLDIR property and SetDirectory, I was using a sub directory in my root so probably that was the problem. So if you face a similar problem like this be sure you work with your root..
I'm trying to optionally install a virtual directory if IIS is installed. If it's not installed, then just skip it.
I've got this check:
<Fragment>
<Property Id="IIS_MAJOR_VERSION">
<RegistrySearch Id="CheckIISVersion"
Root="HKLM"
Key="SOFTWARE\Microsoft\InetStp"
Name="MajorVersion"
Type="raw" />
</Property>
<iis:WebSite Id='DefaultWebSite' Description='Default Web Site' Directory='INSTALLFOLDER'>
<iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>
</Fragment>
and based on the IIS_MAJOR_VERSION being present, I install the feature:
<Feature Id="ProductFeature2" Title="Setup" Level="1">
<ComponentRef Id="AppIIS" />
<Condition Level="0">NOT IIS_MAJOR_VERSION</Condition>
</Feature>
This part seems to work, however, the iis:WebSite node is causing issues. I only want to locate it if IIS_MAJOR_VERSION is present as well.
If I move the iis:WebSite node into the component group it works, but then iis:WebSite is not in 'locator' mode and gets installed and uninstalled (which is bad).
Is there a way I can conditionally run the check for iis:WebSite?
When you add any element from IIS extension (like <iis:WebSite>), a special custom action called ConfigureIIs is added to the InstallExecuteSequence table. This custom action is a so-called entry point to everything related to IIS management with the help of WiX IIS extension.
Fortunately, ConfigureIIs custom action is conditioned by default the way to skip it if need be. If you open the resulting MSI package with Orca and navigate to InstallExecuteSequence table on the left pane, you'll see the condition uses SKIPCONFIGUREIIS property. Thus, the idea is to set it to something (e.g. 1) in case you don't need to perform any IIS related activities.
It can be done with SetProperty element:
<SetProperty Id="SKIPCONFIGUREIIS" Value="1">NOT IIS_MAJOR_VERSION</SetProperty>
I have created a wix build, which does the following
1. Install the files in temporary location.
2. Then I call a custom Action to copy the files into a different location and does messaging of some of the config files.
3. Display a message to user that installation is complete.
4. and then Exit the MSI.
PROBLEM: The reference to the MSI exists in control panel add remove program.
How can I remove the reference of the project from add remove program?
Is it possible within the same WIX build?
What are the alternatives to achieve it?
Thanks,
M
Assuming that you want to prevent your application from being displayed in the Add or Remove Programs list of Control Panel.
Then you need to set property ARPSYSTEMCOMPONENT in to 1.
<Property Id="ARPSYSTEMCOMPONENT" Value="1" />
Read more about ARPSYSTEMCOMPONENT
And also if you want it to show into add or remove programs, but remove or modify functions disabled then use ARP ENTRY properties.
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="ARPNOREPAIR" Value="1" />
<Property Id="ARPNOREMOVE" Value="1" />
Refer for More Info: ARP ENTRY
And if you don't want your program to be uninstall using msiexec also you can add condition like
<Condition Message="Uninstall is not supported">REINSTALL or Not Installed</Condition>.
Uninstall using msiexec.exe /x will give pop-up saying uninstall is not supported and will quit.
My Installer required all the wizard options so I used WixUI_Mondo. That displays all the setup optoins: ( Typical, Custom and Complete ).
As per my requirement the Custom type shouldn't be displayed. By default the package so install under program files.
How can I disable this feature also just would like to display like "C:\Program Files\MyProduct" in the setup type screen?
<Feature Id='MainProgram' Title='Program' Description='The main executable.' Level='1'>
<ComponentRef Id='MainExecutable' />
</Feature>
<UIRef Id="WixUI_Mondo" />
<UIRef Id="WixUI_ErrorProgressText" />
If you don’t want to use Custom Setup, then go for WixUI_InstallDir. It has Install Directories option.
If you want to modify anything in Custom Setup, use Wix Source code. Inside the Source code you can find the UI WXS files in below location.
src\ext\UIExtension\wixlib
Open WixUI_Mondo.WXS file and Copy all coding inside the Fragment and use it in your project. If you modify the Dialog publish sequence you can do anything, (Adding Custom dialog or disabling existing dialog, etc.)
Note: You can download the Source Code from here.
Newbie to WiX here... I have created my WiX installer package, and it installs all features correctly. Then I try adding a UI to it with the following:
<UIRef Id="WixUI_Minimal" />
<UIRef Id="WixUI_ErrorProgressText" />
and I link with "light -ext WixUIExtension -cultures:en-us". It finds this extension because it will give an error if I try it with a non-existent name, but the resulting msi package is only 30kb. I assume this should be slightly larger if the UI extension is correctly linked?
When I run the msi, it just gives the normal progress bar and no additional UI that I am expecting from WixUI_Minimal.
All the references seem to claim that a simple UIRef is all you need to get a UI when the package is linked correctly... Is there a known way for the linking to not happen correctly with no errors being thrown (even when I link with -pedantic)?
The MSI may not be significantly larger when you add the UI. There are not many graphics provided by default. However, if you are not seeing UI during the install, that does mean the UI is not being linked in.
The UIRef needs to be in a referenced section. The first section the linker starts with is the Product element. If your UIRef is a child of Product then it will definitely get linked in. The linker then walks through all the references in the Product element (anything that ends in a Ref is a reference as are many other attributes) looking for needed elements in other Fragment elements. The linker then pulls in everything in those Fragment elements. For example:
<Product>
<DirectoryRef Id='TARGETDIR' />
</Product>
<Fragment>
<Directory Id='TARGETDIR' Source='SourceDir' />
<BinaryRef Id='icon' />
<Fragment>
<Fragment>
<Binary Id='icon' Source='path\to\my.ico' />
</Fragment>
<Fragment>
<UIRef Id='WixUI_Minimal' />
</Fragment>
In the above example, the first three sections will be included by the linker. The section with UIRef='WixUI_Minimal' however is left out because nothing references it. To fix it, the UIRef could be moved to any of the other Fragment elements.
To test, try moving your UIRef to your Product element. If that doesn't work, provide more details in your question about where your UIRef is for us to help further.