Package existing exe and folder with Wix? - 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.

Related

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

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?

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

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...

installshield - how to let user add files to program files folder in the install

I am trying to create an installer that will get the project to install from my server. The project will be chosen dynamically by the user (the user has access to the server), so I can't copy the files to the installer when I create it.
I want that the files will add to to ProgramFilesFolder in the installer.
How can I do this?
Not entirely sure what you want to do. Do you want to automatically add files to a project that they select and then build and MSI? Installshield can be run via automation (i.e via VBScript, VB, C# etc...), and you can achieve what you want using this approach. To work with a project you start from the ISWiProject Object. See this answer: Installshield Build Automation. And for C#: Getting Started with InstallShield Automation and C#.
Personally I would use Wix instead and automate via the Heat.exe tool and standard XML editing via code.
See how Installshield compares to other setup tools: What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Learn about Wix:
Windows Installer and the creation of WiX
MSI vs nuget packages: which are is better for continuous delivery?
Newer answer on automation

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