Can I convert a sequence of wxi files to a Visual Studio Wix Project? - wix

I have a lot of wxi files for a Wix setup.
All together works great as a setup but I think But it works good.
But with changes and extensions it is extremely confusing.
Looks like:
Product.wxs
App.wxi
CustomAction.wxi
Firewall.wxi
Feature.wxi
en-us.wxl
Can I convert all these somehow to a Visual Studio Wix Project? And if yes how I can do it?

Short Version: Below is an attempted generic answer: 1) You can use another tool such as Advanced Installer or Installshield, 2) you can find help with WiX to continue to use it, and 3) you can even use dark.exe to convert other MSIs to WiX format (this can help you with WiX markup syntax - you can implement in another tool and covert to WiX - then the markup will work).
WiX is particularly good - I think - for corporate in-house use (large companies) where expertise is readily available and can be maintained over time. For a lone developer who does setups once a year it might be too much to handle with all the flexibility and syntax?
Alternative Tools: I forget my ad-hoc quick overview of MSI tools in the comments above. Both Advanced Installer (help portal) and Installshield have excellent features that makes you able to deliver setups quicker than with WiX.
Advanced Installer and Installshield should have features to import many project types. I have not tested lately, there could be changes.
Update: https://www.advancedinstaller.com/import.html
VS Installer Projects Limitations: WiX has the flexibility needed to make pretty much anything you need, Visual Studio Installer Projects have many limitations (short list form). I would not recommend going for a conversion - especially since this setup looks to be complicated enough to require WiX's flexibility.
WiX Quick Start Material: If you go here and click the "WiX Samples" entry there is a list of WiX resources in the grid. Also, have a look at "WiX Quick Start" section here.
Dark.exe: In fact, WiX has a tool called Dark.exe which can be used to decompile an MSI file to WiX markup. In other words it is generally easier to move to WiX than from it - although Advanced Installer and Installshield should be able to import WiX and other project files and also import MSI files.
Dark.exe, Sample Syntax:
dark.exe -x outputfolder MySetup.msi
An answer on MSI files and viewers: How can I compare the content of two (or more) MSI files?

Related

Wix : Package MSI into another MSI

I have question regarding WiX/MSI packaging, wanted to check feasibility, I have Installer1 bundle with n number of files(probably 100) and have another small installer2 with less no of files(near about 20 files). Now my question is can I package small installer2 into bigger installer1. This is similar approach as most of installers package vcruntime installers in their installers.
Experts do you see any issues in this approach?
You may want to ask question, what type components installer2 has- so it kernel mode drivers and user mode services and some DLLs.
Also you may suggest why we are not bringing one by one component, instead packaging one installer into another installer.
Chained Setups: WiX's Burn module can create setup.exe files with embedded installers that can run in sequence. Installshield also has a feature for this called Suite Projects - see screenshot here.
Hello Burn: Here is a small, hands-on example of a Burn source.
More on Burn: Some more details on WiX / Burn versus other deployment tools.
Two, separate answers here on Burn, Installshield and Advanced Installer
Short, ad-hoc list of various common MSI tools here.
Links:
WIX Toolset I want the ActionData log to continue to be written as a scroll
WIX Installer with modern look and feel

Package existing exe and folder with Wix?

I have a folder containing an exe file and a bunch of other files and a couple other folders. I want to be able to either:
A) Package this all into an installer
or
B) Package the exe and the other files into one singular exe file.
From what I've read, I'm not sure how I'd accomplish either of these with WIX, and I'm 99% sure it's not possible with WIX. Before I dismiss the possibility, I'd like to ask experienced people if I'm right or wrong.
If I can't use WIX, Is there a better alternative?
Thanks for all help.
WiX / Burn: WiX / Burn can indeed make MSI installers or setup.exe wrappers, but it is not trivial to use the toolkit for inexperienced people, and if you have never made a setup before there will be a learning curve. WiX quick start tips.
Burn: Burn is the WiX toolkit's bootstrapper / downloader / chainger tool which allows multiple MSI or setup.exe files to be run in sequence. It allows the creation of a setup.exe which wraps all installer components. Not trivial to learn and use.
Commercial Tools: Quick descriptions of commercial tools Advanced Installer, InstallShield, PACE Suite and some other tools can be found here: Brief descriptions of deployment tools.
And a more elaborate presentation: How to create windows installer.
WIX is highly configurable, and therefore requires some overhead to learn, but it is also very well documented, and gives pretty direct access to windows API's, which are also very well documented.
Packing Existing Files
It is 100% possible to package your files + dependencies into an installer with WIX.
There is a tutorial
Building and Packaging
There is also integration with Visual studio, allowing you to build and run WIX as part of your build.
If you are not using visual studio, that is fine, you can package things with WIX directly, here is
Another tutorial
GUI Installer Creators
If you are completely against the idea of creating your own WIX files and learning the tool set, Advanced installer is a pretty vanilla alternative with a nice GUI
If you really are against making any kind of installer, you can also zip everything up and distribute it that way, can possibly automate this using python.

How to uninstall a non-msi InstallShield setup in Wix toolset

I have an old installer that is made with InstallShield 2015, its non-MSI based (I tried opening it with 7zip and could not --> non-MSI based, am I right?).
In general, I need to stop using InstallShield and migrate to Wix.
Is it possible some how to convert InstallShield it to Wix?
Using Wix, I need to detect if a previous version (the InstallShield version) is currently installed and automatically uninstall it and then continue with the normal Wix process. Is such a thing possible?
Thank You :-)
I'll add a quick answer for reference, though the problem appears solved already.
If the old Installshield setup is an MSI, you can use dark.exe from the WiX toolkit to "disassemble" an MSI into WiX source code (dark.exe can also decompile WiX setup.exe bundles - there is a somewhat messy description of this here: How can I compare the content of two (or more) MSI files?).
After some cleanup you can compile the WiX source to a new WiX-built MSI. A bit of knowledge and experience is needed for the cleanup to be successful (eliminating GUI sections, add a WiX GUI, realign source paths, clean up binary stream tables, etc... - not trivial, but not rocket science :-).
If the old setup was a legacy installer (not MSI), you can convert it to MSI by using a repackager tool to capture changes done to the system during installation and convert them to an MSI. A lot of knowledge is required to clean up such a capture. If you know the product it is often better to code a new setup "by hand". Or if you are in a large corporation chances are you will have a "repackaging team" available somewhere who will have the expertise to do this job for you.
Yes, old setups can be uninstalled as part of your new MSI.
As you discovered if the old setup was an MSI you can simply use a major upgrade to remove it during the new WiX install.
If the old version was a legacy setup things can get considerably more involved often requiring you to "record" a dialog response file to feed to the uninstaller function of the old setup.exe file. Not at all trivial, and quite error prone. Incidentally one of the major benefits of MSI is the completely suppressible GUI.
For reference, here is an old answer with information on dealing with the infamous setup.exe files that we frequently have to uninstall and upgrade:
How can I use powershell to run through an installer? The setup.exe can be many different things: Installshield Setup, Advanced Installer Setup, Inno Setup, Self-Extracting Zip-Archive, a proprietary setup format, the list goes on...

How to create .msi installer with WiX

Can someone help me understand how WiX works? I have a directory structure which I would like to create an installer for. I have generated the for the directory structure with heat.exe and when I build the setup project it generates an .msi file but I don't think it installs anything.
Maybe someone can walk me through the steps of generating a .msi installer.
Any advise is appreciated,
Thank you
If you're using Visual Studio:
Install the WiX Toolset V3 Visual Studio plugin.
Install the Wax interactive editor.
Build your project if you haven't already.
Add a new project to the solution containing the project you want to create an installer for.
Choose the template Setup Project for WiX v3.
Name the installer. A personal convention is the name of the project plus ".Setup"
A Product.wxs file will open up. Change the Manufacturer="" value to something like your company name or your name. Keep the file open.
Go to Tools -> WiX Setup Editor
On the left under Root Directory choose InstallFolder
Under Projects to install, choose the project you want to install.
In the red area to the right, you'll see a list of files. These are the output results of your build from step 3.
Click the plus sign next to files you want to copy. They should turn white and change to a Resolved state.
This might look daunting, but you're just telling it what to copy--which would be your project's executable, configs, dll libraries, and images it's dependent upon.
You typically want to copy everything. If there are dll's you know you don't need, it's better to remove them as a dependency from the Visual Studio.
Notice the Product.wxs has changed. It now has the files you checked off in the Setup Editor GUI added to the <Wix><Fragment><ComponentGroup> section. Save that file.
Close the Setup Editor.
Build the setup project you just configured.
Open Windows explorer and go to that project's bin/Debug or bin/Release folder, depending on what mode you built in. There you'll see the .msi that you can copy to where you need.
To make an update, make the necessary changes and then change the version number in that project's Properties -> Application -> Assembly Information. Then also change it in Product.wxs <Wix><Product.Version>. Then just build your setup project again.
Good tutorial here:
http://wix.tramontana.co.hu/
http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with
They should get you started.
If you learn something about the MSI log that will also help - install the MSI with a command line that includes /L*vx
And "doesn't install anything" should be easy to check - are there are any files installed, or did it create an entry in Programs&Features?
WiX is a language (XML/XSD) that serves as a way of authoring (compiling) Windows Installer (.MSI) databases. WiX doesn't install anything, MSI does.
I maintain an open source project called IsWiX. The concept is simple. IsWiX provides additional WiX project templates (scaffolding) and graphical designers to assist you in creating installer. Then as you gain knowledge of WiX and MSI you can make additional tweaks of the WiX XML by hand and go beyond what IsWiX currently knows how to author.
Here's a video showing how to author, build and test an MSI to deploy an IIS website in a mere 3 minutes.
Update: IsWiX has tutorials now.
After a few 'false starts' trying to learn WiX from online tutorials I noticed that on http://wixtoolset.org/ there is a link to the book "WiX 3.6: A Developer's Guide to Windows Installer XML". You can buy it pretty inexpensively in E-book form from Packt, or also Amazon if you like the easy interface with Kindle.
I found this book to be VERY helpful with every little step regarding the .msi creation process. The book will guide you to create your first .msi in the very 1st chapter! Granted, you have to continue a little more to have a fully functioning .msi, but given the complexity of Wix, this book is terrific. It may not be for the gurus among us, but for those of us who need a little more help to understand the material it's wonderful. I've seen many posts speak to the 'steep learning curve' regarding WiX and it is a complicated process to create a valid .msi, but this book goes a long way toward making that learning curve very bearable.
If you are using the build system 'cmake', then you can use cpack to generate .msi file by setting the cpack generator to wix.
What worked for me best, was this fantastic tutorial video: https://www.youtube.com/watch?v=6Yf-eDsRrnM
Its best selling points for me was
independent of visual studio version
it describes deploying a .NET (Core) app also
it focuses on what an average app's installer should be capable of (including heat, icon, background image and banner)
you don't have to learn another layer on wix
it gives you good practices on easy package generation and future maintenance
it gives an installer project template which you can reuse: https://github.com/angelsix/youtube/tree/cecd38ea3d5eea11cc75fc0123297ffc3b5e662b/C%23%20General/Windows%20Installer%20Wix%20DotNet%20Core/ConsoleApp1.Installer

Experiences with Wix# WixSharp compared to WiX

We are using Inno Setup and are planning to replace this with WiX. But when evaluating and playing around with WiX, I felt the declarative manner has some limitations compared to programmatic setup solutions.
Moreover I found out that the WiX documentation is rather sparse. So I came across Wix# (WixSharp) which promises to create WiX source code programmatically via script files written in C#.
However we've had some negative experiences with very small companies and even 'one-man-shows'. Therefore I just wanted to ask about your experiences with Wix# (WixSharp) or even other good alternatives out there. Can you report some advantages or limitations?
Wix# looks like an improvingly good bet on the "Will it be around next year" score; see below. And note that Custom Actions are now quite straightforward to build in Wix#.
From this article:
http://www.codeproject.com/Articles/31407/Wix-WixSharp-managed-interface-for-WiX
In July 2014 Wix# was rereleased under more liberal MIT license and it is now hosted on CodePlex.
https://wixsharp.codeplex.com/
In August 2014 UI Extensions to Wix# were released and described in this CodeProject article: "Wix# (WixSharp) UI Extensions".
http://www.codeproject.com/Articles/804584/Wixsharp-WixSharp-UI-Extensions
The fact that new Wix# features are coming out bodes well for the product.
Since Wix# is built on top of WiX and Windows Installer technology, it can only do things that are possible in WiX. When Wix# runs out of gas... WiX can do a lot of things that aren't directly available in the Wix# C# syntax, so you can generally use WiX XML technology directly to bridge the gap. Also see my answer here for additional examples of making Wix# generate the .wxs XML, and then including additional WiX XML code and invoking Candle and Light to build the resulting combined XML into an MSI.
Programatically building an MSI
Below is a quick, non-exhaustive list of WiX and Wix# pros and cons that I have experienced thus far.
WiX/Wix# Pros:
It generates real Windows Installer MSI files.
The uninstall feature is "free"; you automatically get a reliable uninstaller.
The Server Admins in my environment readily accept MSI files for things I as a developer want to install, because they trust the MSI technology and the uninstall feature.
Windows Registry entries are included in the "free" uninstall you get, as long as you create them using WiX or Wix# native syntax and don't merge .reg files--you won't get a registry entry uninstall that way.
WiX/Wix# Cons
Because it's limited to the Windows Installer feature set, some
"procedural" things are harder to do in WiX and Wix#
WiX Pros
Lots of great examples and support resources ("How do I .. in WiX") are available on the Web.
The utilities for harvesting registry entries and putting in XML WiX statements work well.
WiX Cons
As a C# developer, I found WiX XML to be unintuitive to get started
with, working directly with XML files. Wix# and C# made more sense
than WiX at the start.
Wix# Pros
Custom Actions are now simple to implement in Wix#.
Wix# integrates neatly with Visual Studio. I'm currently using it with VS2013.
Wix# and C# made more sense than WiX XML at the start. Better starting point.
Wix# is helping me learn WiX in a more approachable way. Seeing what does and doesn't work in Wix# helps in understanding WiX.
Wix# Cons
Wix# examples are currently a lot harder to come by on the Web. Often it is necessary to research the WiX how-to and then figure out how to apply it to Wix#.
I didn't find an automated path for harvesting registry entries and expressing in WiX# C# code. I translated the .reg file entries manually. It's necessary to have registry entries in Wix# "RegValue(" statements to get the automatic uninstall capability for registry entries.
Note: Developer added this feature in a January 2015 release. I haven't tried it yet.
I will say, doing things in WiX/Wix# that were simple & obvious in procedural installers, like NSIS, and past generation script-based installers (e.g., older Wise editions) often takes extra research and creativity in WiX/Wix#.
Overall, I'm betting on Wix# as a growth technology and a safe bet for current and future use. Worst case, you'd still have your .wxs files, and could change over to using a straight WiX XML approach to building installers, and you'd still be getting value out of the Wix# time investment.
RECENT UPDATES TO THE Wix# Product for Common Installer Tasks
As of January 2015. See: [https://wixsharp.codeplex.com/releases/view/610843][1]
Can now import a .reg registry settings file instead of hand-coding registry class entries
Additional support for Windows Config file modifications
Specific support for Windows Service installations
Support for passing parameter values to Deferred Custom Actions, with all WiX supporting infrastructure properly auto-generated
Support for absolute path in target system directory, with all WiX supporting infrastructure properly auto-generated
WiX has been around for quite a while and has a lot of community support. I've been doing setup (in my spare time :) ) for about 8 years and have never found anything I couldn't reasonable do in WiX.
This is the first time I've seen WixSharp. My first reaction would be how stable is it given it's 0.1.42 at the moment. I'd also be concerned about how much of the MSI schema is actually implemented in WixSharp. It looks interesting, but I'd be more comfortable with an XML file. I don't really see any advantage to do it in C#.