wix,bootstrapper , Wix Managed Bootstrapper Application: When do the Detect* events fire?


Wix Managed Bootstrapper Application: When do the Detect* events fire?

Question:

Tag: wix,bootstrapper

As soon as my Wix MBA starts up (actually in the main view's codebehind constructor), I set event handlers for a bunch of Detect* events in the BA:

LogDetect("Setting bootstrapper detection handlers");
bootstrapperApplication.DetectRelatedBundle += BootstrapperOnDetectRelatedBundle;
bootstrapperApplication.DetectPackageComplete += BootstrapperApplicationOnDetectPackageComplete;
bootstrapperApplication.DetectRelatedMsiPackage += BootstrapperOnDetectRelatedMsiPackage;
bootstrapperApplication.DetectPriorBundle += BootstrapperOnDetectPriorBundle;
bootstrapperApplication.DetectMsiFeature += BootstrapperApplicationOnDetectMsiFeature;
bootstrapperApplication.DetectComplete += BootstrapperApplicationOnDetectComplete;
bootstrapperApplication.DetectBegin += BootstrapperApplicationOnDetectBegin;

then I make the call to Detect():

LogDetect("Beginning detection of existing installations...");
bootstrapperApplication.Engine.Detect();

Inside of these handlers I only make calls to LogDetect(). I know that LogDetect() works because those two calls I have outside of the handlers do log the messages, however no other messages are logged by LogDetect() which means the handlers are never called.

I figured at least DetectBegin and DetectComplete would fire.

I thought the events would be fired shortly after I make the call to Detect(). When does it actually happen?

Edit: If I look in the logfile in the user's temp directory it does show that Detect is happening. Those log entries are not mine (they are marked iXXX where the i stands for internal I presume).


(Sidenote: there's this somewhat related question, the fact that it hasn't been answered is not very promising... Wix Bootstrapper: Sequence of Bootstrapper events)


Answer:

It looks like they were firing all along; they were simply trying to do work on a different thread :/


Related:


No environment variable set after installation of MSI generated by WIX


wix,environment-variables
My WSX file looks like this: https://gist.github.com/pyeremenko/891eceb779197e4be240#file-sample-wxs-L23-L25 Copying works fine, i.e. exe file available in Program Files/test/my_test folder, but I can't access TEST env variable after installation via echo %test% (of course I reload cmd) I tried also to look for it in System Properties > Environment Variables, but there...

Change Wix Product version number using NANT XmlPoke


build,wix,nant,wix3.9
I ran into this issue recently - when I try to replace the Wix Product version number using NANT XMLPOKE task, it returns the following error message "No matching nodes found". <xmlpoke file="..\Setup\abc.wxs" xpath="//Wix/Product[@Version]" value="${version.label}" > Initially I thought that this was an issue with XPATH statement that I wrote....

Namespace prefix 'bal' is not defined


wix
I've got this error. Since I put below code in the Bundle.wxs. <BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.Hyperlink2License"> <bal:WixExtendedBootstrapperApplication ThemeFile="Resources\COTheme.xml" LicenseUrl="http://xxxxxx /> </BootstrapperApplicationRef> Could please anyone help me?...

How to change Install button display text conditionally


wix,windows-installer,wix3.8
Is it possible to change the "Install" button display text based on some condition i.e if fresh install then "Install" if upgrade then "Update"? Basically, on major upgrade i am skipping some of my custom dialogs (which are shown on fresh installation) so on InstallReady dialog i want to show...

Speed up Build-Process of WiX-Installer


visual-studio,wix,windows-installer,installer,heat
For my Wix project I am harvesting 4 directories, via the pre-build-event of visual studio, which will result in about 160mb of data, and about 220 files, but the build process tooks very long. How can i speed that process up? I have one embedded media.cab file which will hold...

Single Package Authoring


wix,windows-installer
I am trying to create Single Package Authoring installation using following tutorial - http://www.egoroff.spb.ru/blog/62003.html Main wix file is following: <?xml version='1.0' encoding='windows-1252'?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> <Product Name='Foobar 1.0' Id='GUID' UpgradeCode='GUID' Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme Ltd.'> <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer" Comments='Foobar is a registered trademark of Acme Ltd.'...

How to add assemblies to WiX toolset setup, which comes from a nuget package?


c#,.net,wix
I use the Votive-project type to create a setup with the WiX toolset. I know, that I can add an assembly like this to the setup: <File Id="FILE_myproject.dll" Source="$(var.myproject.TargetPath)" KeyPath="yes" /> What I don't know is, how can I add referenced assemblies to the setup, which comes in a nuget...

executing an vb script from another project bud in the same solution in C#


c#,vb.net,wix
i am trying to call a VB script that i made that in the same solution bud in another project, it is a C# project with windows forms and WIX. i am building an .MSI installer and when i arrive at a certain form i want it to execute a...

Trigger uninstall and Repair of previously installed product


wix,windows-installer,wix3.8
i am new to Wix toolsets. i have successfully made my first installer in Wix but now i am confused about my software updates which usually are minor. in my installer i want to check if user have any older version installed then i want to show him three options...

WIX XMLConfig Different Root Element Names


wix
I'm running into an odd issue with a "config" msi I'm writing in WIX that uses XMLConfig to check for, delete and then create the new values in a single xml file. Since I Discovered WIX I've been packaging a lot of our manual configuration processes so this is my...

Module failed to register HRESULT / Error 1001


wix,managedinstallerclass
My first question is about the error below : Module [Path/Name of dll].dll failed to register. HRESULT -2147024769. Contact your support personnel. I can continue the installation but i want to get rid of this error if possible. The second question is about the following error : Error 1001. Exception...

How to launch executable after installation (exe is delivered by .msm)


wix,custom-action
I did everything as explained in tutorial, but my executable wasn't launched after product installation completed. There is a nuance that my executable is delivered with .msm module, so in .wxs file for .msi I do the following to launch application: <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product> <!-- I omit here features and...

WIX-Installer ServiceControl “sufficient privileges” error


c#,windows-services,wix,installer,visual-studio-2015
Visual Studio 2015 RC Wix v3.10.0.1726 I am creating a installer for a windows services. I've tested the service with InstallUtil and it runs fine. Unfortunately I'm having a bit of troubles with wix, here is the exact error - "Service 'Service Name' failed to start. Verify that you have...

Cant find File System, Registry icon in WIX setup project in Visual Studio


visual-studio-2012,wix
I installed WIX in my machine. I followed the video of https://www.youtube.com/watch?v=CoFPyIbcqN8enter link description here I can not find any way to add File Systems, no icon for it, no context menu entry on project. I am using Visual Studio 2012....

command line Start.Info.Argument error


c#,command-line,wix,heat
I would like run this command with C# : "%WIX%/bin/heat.exe" dir "C:\Documents and Settings\APP" -gg -sfrag -cg Appli -out wixappli.wxs I have this code (Program.cs) : System.Diagnostics.Process process1 = new System.Diagnostics.Process(); process1.StartInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe"); process1.StartInfo.Arguments = String.Format("/k \"%WIX%/bin/heat.exe\" dir \"{0}\" -gg -sfrag -cg Appli -out wixappli.wxs ", @"C:\Documents and...

Wix- Unable to write to XML file when using Property Name as Value


wix,windows-installer,wix3.7
I am trying to write a value into an XML file during the installation, this value comes from a text field which user fills it during the installation stage. In my GUI file for the installer I have the following EditField: <Control Id="LogEdit" Type="Edit" X="45" Y="155" Width="100" Height="18" Property="LOGVALUE" Text="{80}"...

WiX error build target


msbuild,wix,installer
I'm trying to create my MSI setup with WiX and MSBuild command which deploy my img.png into a repertory and i have this error : "MSB4019: project imported "C:\Program Files\MSBuild\Microsoft\WiX\v[[Version.M ajor]].x\Wix.targets" was not found. " Make sure that path of declaration are correct In this line : <Import Project="$(WixTargetPath)" />...

Wix Toolset install C++ 2010 Redistributable


wix,visual-c++-2010,wix3.8,wix3.9
I can integrate together on installation package Wix Toolset the installer Microsoft Visual C ++ 2010 redistributable? I tried this with a custom action, but it does not install if another installation is in progress. Someone would have any suggestions of how to do? Also another question. I can call...

How to add several ports to FirewallException in Wix?


installation,wix,windows-installer,installer,custom-action
I use property PORTS to pass some http ports to my installation. Then these ports will be stored into init file and used by the application. I need to add these ports to FirewallException? But following code does not work: <Component Id="fwException" Guid="MyGUID"> <Condition>Privileged</Condition> <RegistryKey Root="HKCU" Key="Software\Company\[ProductName]"> <RegistryValue Name="fwException" Value="1"...

Wix - copy file based on combobox property


wix
When installing an application using Wix, I would like to copy a file to a location based on a ComboBox property then a PushButton with <Publish Event="DoAction" Value="CustomAction">1</Publish>. If I use a Custom Action for this and set Execute="immediate", then the file copy fails with the error UnauthorizedAccessException was unhandled...

Create a new user with an underscore in the name


xml,wix,windows-installer
I am trying to create a user in WiX, using the following XML: <Component Id="cmp_MyNewFolder" Guid="*"> <util:User Id="MyNewUser" CreateUser="yes" Name="DUMMY&#95;USER" Domain="[ComputerName]" Password="" PasswordNeverExpires="yes" RemoveOnUninstall="yes" UpdateIfExists="yes" /> <CreateFolder> <util:PermissionEx GenericAll="yes" User="DUMMY&#95;USER"/> </CreateFolder> </Component> I've removed the GUID and password for this post, so the issue isn't with those. The problem is...

How to change text style of the Title & Description text controls of a WiX dialog?


wix
Where can I find information of the Style values for a text control of a WiX dialog? For example, the default text style used for the WiX dialog Title control is {\WixUI_Font_Title} & I would want to use the same style but to change the color to White. For the...

Msi & exe singing Microsoft Authenticode requirments


wpf,winforms,deployment,wix
I am trying to sign my small application, following this tutorial: In the tutorial they did not ask me to purchase Microsoft Authenticode Certificates I need to Removes "Unknown Publisher" security warnings; after I signmy msi and exe files I still have "Unknown Publisher" Can I sign my msi or...

Error allocating file install folder in WIX 3.9


directory,wix,windows-installer
I am setting up the installation locations for my installer. However, it throws an error when I try to set the locations. Source code: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" Name="Wix_setup" Language="1033" Version="1.0.0.0" Manufacturer="Frank Jansen" UpgradeCode="37a42e55-dea8-47da-8f4f-fb065dd38a9e"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of...

How do I install the Wix extension on after a Visual Studio 2013 Update?


visual-studio-2013,wix
I have installed Wix 3.9 on VS 2012. Recently, I just got VS 2013 and I am not sure how to install just the extension on there? How do I do without uninstalling wix 3.9 and reinstalling it back again?...

Creating a silent installer for a MSI


wix,nsis,msiexec,silent-installer
What is the best way to make a silent installer (or unattended) for a program that was already created and has a msi installer? At work I'm told to create an installer that is automated and does all the interaction with the user automatically so that the user essentially just...

WixSharp inject multiple Custom CLR Dialogs


c#,wix,windows-installer,wixsharp
Using WixSharp, we can insert a custom System.Windows.Forms window as dialog . project.InjectClrDialog("ShowCustomDialog", Dialogs.InstallDirDlg, Dialogs.VerifyReadyDlg); [CustomAction] public static ActionResult ShowCustomDialog(Session session) { return WixCLRDialog.ShowAsMsiDialog(new MyCustomDialog(session)); } The MyCustomDialog is derived from WixCLRDialog class. If I have consecutive custom dialogs ( done in System.Windows.Forms ) to show. How do I insert...

SHFileOperation cannot remove folder


c++,wix
I am writing a C++ Custom action for WiX that will be called during installation to remove any leftovers installed by the installer. Consider the following code: UINT __stdcall DeleteResidue(MSIHANDLE hInstall) { HRESULT hr = S_OK; UINT er = ERROR_SUCCESS; LPWSTR lpFolderPath = NULL; std::wstring temp; SHFILEOPSTRUCT shFile; hr =...

How to change $(var.Platform) from x86 to Win32 in Wix


c++,wix,platform
I have a Visual C++ 2013 solution including many C++ projects and a WIX installer project. On x64 platform, everything is okay. But On x86 platform, $(OutDirectory)$(Platform)$(Configuration) of C++ projects is ...Win32..., but $(OutDirectory)$(Platform)$(Configuration) of WIX is ...x86... What can I do?

Why is my Wix Custom Action is breaking my installer


windows,batch-file,elasticsearch,wix,windows-installer
I had a perfectly good wix installer when it came to moving files from the cab file to the hard drive. The problems are all being caused by the way I am writing my custom action. First, I will show the culprit, then explain the symptoms. <CustomAction Id="InstallElasticWithProvidedBatch" FileKey="fil85D231A31B2F8EB99C6B9EA4B95A354C" Impersonate="no"...

ExePackage does not run elevated although PerMaschine is set to “yes”


wix,bootstrapper,elevated-privileges
In my WIX-Bundle, i have an ExePackage like the following: It executes a ConsoleApplication which tries to open an write to a HKLM-Registry entry which fails when triggered out of the bundle. In cmd, everything works fine when executed as admin: <ExePackage Id="SqlServerAuthConfig" DisplayName="Configuration of SQL-Server Auth-Mode" Compressed="yes" PerMachine="yes" Vital="yes"...

Database changes management in installer updates


sql,wix,windows-installer,wix3.8
How can I run a series of database scripts depending on some condition? Basically I want to check build installed on user's machine and then want to run all the scripts till the build in the installer. Say user has build number 4.10 installed and if he goes to install...

how to skip dialog based on selected feature


wix,windows-installer,installer,msi-gui
I want to add a custom dialog in the UI sequence after the Feature selection (Customize) dialog. The feature selection is done through a Feature tree. How can I figure out if a particular feature was selected and launch the custom dialog? Right now I am having the following codes...

Set location of binaries in wixproj file


wix
I am using Wix 3.9 and when I run a continuous integration build in TFS I get an error heat.exe: The directory could not be found because TFS is putting binaries in a different location to my local machine, so the project will build locally but not on TFS. In...

How can I change the text in the Wix installer dialog?


wix,windows-installer,wix3
My text message is stuck to "Install My Product to:" How can I change this? ("My Product" is the name of my product and the string above is resolved based on the Name attribute in my Product.wxs). I have 2 dialogs and the second requires a different message....

Package the .Net redistributable in my burn bootstrapper


wix,burn,wix3.9
I'm trying to package the .Net 4.5.2 redistributable into my burn application, by following the instructions on this page. But it fails to find the file in the temp burn location. According to the log burn tries to find the file here: [0A14:09C4][2015-05-12T16:48:52]w343: Prompt for source of package: NetFx452Redist, payload:...

Is Component/@Guid attribute is a MUST in case of producing MergeModule


wix
In my .wxs file for components, there are only components with single file, and this is the case for generatable GUIDs. But it seems to me that for .msm (merge module), component's GUID should be explicitly specified. Or I'm free to use Guid="*" and that would be OK? I tried...

Retrieve x64 Program Files path from 32-bit process


c#,wix,64bit
First some background. I have created a WPF bootstrapper application for my WiX installer where I need to retrieve and display the default install location. Unless I am doing something wrong it appears the executable created by WiX is always 32-bit even if my Visual Studio configuration is set to...

Service dependencies are causing my wix msi to force a reboot on uninstall


wix,windows-installer
I have spent the past 3 days running in-place while tracking down the cause of forced reboots on my system, but have finally narrowed it down to a very specific cause. I have a service suite that I am working on in Wix. There are 10 msi's that are all...

Deploy Any CPU build with WiX to x86 using MSBuild


visual-studio-2013,tfs,msbuild,wix
I have a set of solutions that build a complete .NET Any CPU application. I have a WiX project that will deploy that application as x86 and I can run this all manually in Visual Studio 2013 without any issues. Now I'm trying to get this to work in MSBuild...

WiX - upgrade services


wix,installer
I Installed my application in 1.0.0.0 version. Services have been installed on the user account (with username / password). How to make an update, so the user does not have to specify login and password again? <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />   <Component Id="MyService" Guid="MyGUID"...

WiX: Install component based on ComboBox selection


combobox,wix,condition
I'm trying to create an installer which installs some components based on the selection of a Combobox but it seems like the condition isn't working. I declared the Combobox as the following: ... <UI> <ComboBox Property="Option"> <ListItem Text="Red" Value="red" /> <ListItem Text="Blue" Value="blue" /> <ListItem Text="Green" Value="green" /> </ComboBox> ......

WiX – copy arbitrary files


c#,wix
The folder where my setup.exe is located contains a subfolder CALhaving files named something like xyz1234.cal – their names vary from customer to customer. These files have to be copied into a folder CAL in the target directory. So I created a CustomAction and a C# dll which uses the...

Detect if 32 or 64 bit windows and define var


wix
I want to install Visual C++ 2012 redistribute with my app. I would like to install the appropriate version based on the architecture of the machine. eg if platfrom is x86 vcredist_filename = Microsoft_VC120_CRT_x86.ms else vcredist_filename = Microsoft_VC120_CRT_x64.ms Ive tried to accomplish in many differents ways but I cant get...

Dealing with shared registry values


wix
I'm working on an installer that's creating registry values and deleting them on uninstall. However some of the registry values I'm working with could be shared with other companion applications. I only want it to remove the registry values if it's the only component using those registries. If other apps...

How to define WIX agent requirment in TeamCity?


msbuild,wix,teamcity
I have add a WIX installer project to solution in Visual Studio 2013. The project is built with every commit on TeamCity. There are several build agents connected to TeamCity cloud, but only some have WIX installed. Usually I would add the build agent requirement, so only the computer with...

WiX - not executing custom action during update


wix,windows-installer,installer,custom-action
I have two custom actions (immediate and deferrend). I would like to skipping actions during upgrade. I tried: <Product Id="*" Name="$(var.ProductName)" Language="1033" Version="$(var.Version)" Manufacturer="$(var.Manufacturer)" UpgradeCode="{GUID}"> <MajorUpgrade DowngradeErrorMessage="Newer version is already installed." /> <Custom Action='CAa' After='InstallInitialize'>NOT Installed AND NOT PATCH</Custom> and: <Custom Action='CAa' After='InstallInitialize'>NOT Installed AND NOT...

WiX: VS2013 How to change output directory


visual-studio-2013,wix,windows-installer
I have a WiX project in VS2013. The output directory in wixproj is: bin\$(Platform)\$(Configuration)\ by fact it is \bin\x64\Release\en-us How and where I can change the real output to \bin\x64\Release\ ?...

Should a WiX web installer and stand-alone installer both show up in Add/Remove programs?


wix,wix3.9
We have two WiX installers that use our own BA. One installer gets all the packages from the web, while the other gets all the packages from the exe. We call them "Web" and "Full" installers. We have a case where a user might install one package from the web...