WiX toolset: How to execute multiple exe files with MSI package - wix

I am working on my first MSI builder with WiX. I am hoping that I can receive some help on what I am trying to achieve.
For my app, the user has to have Visual Studio Code (latest) and a couple of other applications on the local machine. Therefore, I included .exe file in the MSI package like the screenshot below.
I am wondering if there is a way to run those execution files as a part of Microsoft Installer download...?
I am using Visual Studio 2017 and WiX toolset to build a Microsoft installer.
I appreciate any comments or resource that I can look into.
Best regards,

You'll need a bootstrapper (setup.exe) to properly get them preinstalled along with installing your app's MSI. You can generate a bootstrapper using a WiX bundle.

Related

How to find the Windows Installer XML node in Visual Studio 2019 after toolset and extension installation?

I am trying to create an installer with Wix and Visual Studio 2019. I am a Wix newbie so I just started to get something really simple working, from scratch. Therefore, I read this explanation. I use Windows 10 build 19042.
Creating the winforms project does work fine for me but the next project does not. This is because of this step.
Choose the Windows Installer XML node in the Project types tree,
then select Setup Project
I can find Wix projects.
And I installed the Wix toolset.
So creating a very simple installer should be very simple. But in fact, it is not as I fail to do one tutorial step referring to a project type I cannot find.
You can help in these ways:
Tell me what to do the make sure the Windows Installer XML node
becomes visible.
Provide the step to do the same without the Windows Installer XML node.
And logically, I double checked if the Windows Installer XML node is really not there. And it really is not.
VS2017 vs VS2019: I guess that explanation was written for Visual Studio 2017 - which is quite different for the "New Project" dialog. You can select "WiX" in the drop down button that says "All languages" in that dialog
WiX Project Types: Just double click the "Setup Project for WiX v3" - this is the project type that creates an MSI. The "Bootstrapper Project for WiX v3" is for making setup.exe bundles.
WiX Downloads: For the record, make sure you have installed both WiX itself and the WiX Visual Studio Extension. It looks like you already have (just mentioned for others who see this).
WiX Training: I have a few answers on WiX crash course and training material:
Short WiX sample links
Long WiX Tips and Tricks and samples links
A few selected examples from github (there are more WiX projects at the root level):
https://github.com/glytzhkof/WiXDefaultDialogsSample
https://github.com/glytzhkof/WiXLaunchConditionTest

VS2017 Bootstrapper: Engine/setup.bin missing

I have moved to a new machine and upgraded with this MSVC 2015 to MSVC2017. Now I wanted to build a new (WiX) installer for our project. But I don't find current Bootstrapper location.
C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper does not include Engine/setup.bin, which WiX will have.
Windows 10 SDK (10.0.16299) is installed.
Any idea which software I have to install to obtain required setup.bin? (Searched my whole PC for a setup.bin, but not a single setup.bin exists, so it's not just on a "wrong" oath)
OK, not sure why you refer to ClickOnce and WiX together - I am not aware of any connections here - they are different technologies - but maybe there are connections I am not aware of (something relating to AppX maybe).
The file you refer to: setup.bin is installed via two MSI files on my system:
Microsoft.ClickOnce.BootStrapper.Msi.msi (installed from source at C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.ClickOnce.BootStrapper.Msi,version=15.0.27005.2)
Microsoft.ClickOnce.SignTool.Msi.msi (installed from source at C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.ClickOnce.SignTool.Msi,version=15.0.27005.2)
Did you go to Tools => Get Tools and Features => Individual Components and select "ClickOnce Publishing"? I would try that first. There is no clear match between the actual MSI names and these "Individual Components" that I can see.
I believe "Microsoft Visual Studio 2017 Installer Projects", "WiX Toolset Visual Studio 2017 Extensions" and "IsWiX" (front end for WiX) can be installed from the Tools => Extension and Updates. Or you can install the WiX 2017 extension from here.
You also obviously need to install the WiX toolkit itself to be able to make WiX installers. Here is the download location: http://wixtoolset.org/releases/ (and a WiX quick start suggestion answer).

Using Windows SDK Bootstrapper Packages with WiX

In tracking down another issue I came across the folder C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages that looks like it contains a number of pre-made installer items for various programs. I have a project I am on now that requires Crystal Reports and would like to know:
1) Can I use the "Crystal Reports for .NET Framework 4.0" installer project found in this directory to install Crystal Reports using a WiX bootstrapper (exe output) or WiX project (msi output)?
2) How would I go about including this Crystal Reports installation package in the bootstrapper or msi project?
1) You can use pretty much any msi/exe setup into bootstrapper
2) If you want to include EXE/MSI into bootstrapper then have a look at the documentation http://wixtoolset.org/documentation/manual/v3/xsd/wix/packagegroup.html and i believe what you need is MsiPackage Element for .msi or if it's exe setup then you use ExePackage Element.

Sample application for WiX bootstrapper for beginners

I'm very new to WiX based applications, and I need to create an MSI file where it has to check for .NET Framework 4.0 and SQL Server 2008. If they are not installed, I have to get them installed first and then have to install my application's EXE file and one more VBScript agent. It must be done like when you install WiX 3.7 setup (if we double click the setup file, it will show a UI as shown below!
Where do I start? Is there any step-by-step guide to develop this kind of application?
You'll need the following projects. They can be created from project templates in Visual Studio. Each of them would probably have separate tutorials that you might find with a Web search.
A WiX Setup project to build an .msi. The source files for such a project declare a WiX/Product. It could have conditions that check for .Net Framework4.0 and SQL Server 2008. If a check fails, installation of the .msi will fail, which is all that can be done in an .msi. The project would include your application .exe as a Component.
A WiX Bootstrapper project to build an .exe. The source files for such a project declare a WiX/Bundle. In the bundle is a Chain of installers, which would include .Net Framework4.0, SQL Server 2008, your .msi, and your VBScript Agent.
A WPF Library project to provide a BootstrapperApplication implementation with a custom UI for the bootstrapper project.
Your best bet is to consult the documentation, the WiX source code and various tutorials. Keep in the mind that tutorials might be out-of-date--in most cases WiX has gotten simpler with each version.

Integrating Wix with MSBuild

we are looking to automate an MSI generation for a product we are developing. Currently we have MSBuild building out the source to a network location, this is fine for testing but when it comes to releasing the software we will need to wrap it in an MSI.
The software is all .Net bar 1 COM component that will need registered on each machine it gets installed to.
What I was wondering was how to integrate Wix with MSBuild so that a new wix script will get generated along with an MSI that is able to handle fresh and upgrade installs.
Any help with this is very much appreciated.
Thanks,
Brendan
Sure, there are tasks in MS Build that can do all you need to build an MSI from WiX. Can you integrate this on a build / integration server?
Newer builds of Wix actually include a file called "wix.targets", which should get you started.
Also check out these fine articles on the topic:
Building with Wix.Targets (by Heath Stewart)
Wix Target for MSBuild (by Willem Meints)
Automate Releases With MSBuild And Windows Installer XML (by Sayed Ibrahim Hashimi) (Web archive link for archived msdn magazine)
They cover the topic in much more detail and are extremely helpful to get started.
You should download and install Votive. This will create a Visual Studio project file which you can use with MSBuild to create a WiX-based MSI.
There is also a topic in the WiX manual about how to integrate with MSBuild called Using WiX with MSBuild.