our company is using WiX to create our (currently pretty simple) setup. We have a bootstrapper project which installs the .Net 4.0 Framework and runs our MSI package (WiX setup project). We now want to access the filename of the bootstrapper (Setup.exe) during runtime and save it to a file. Just for background: The filename is not fixed and will be changed by our download server frequently, so we have to access it during runtime.
Unfortunately I didn't find any solution to accomplish this with WiX. Can someone help me? Maybe you have some ideas?
Thanks in advance!
This is your own bootstrapper, right? If so, the bootstrapper either knows its own name, or can detect it at runtime (::GetModuleFileName()). When the bootstrapper runs the .msi install, have it pass its name as a public property on the command line:
msiexec /i OurPackage.msi IWASBOOTSTRAPPEDBY=bootstrappername.exe
The property IWASBOOTSTRAPPEDBY is then available to the WiX-based .msi package to do with as it pleases.
For that matter, the bootstrapper program itself could write its name to a text file, and not even bother the .msi package with the task.
Related
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.
I created already a SQL Installation with my sqlinstalltionCommand using Wix Bootstrapper and I want to pass this exe to my WIX installer as a Prerequisite.
if I opened the SQL Installation it works very fine, but when I call it from WIX Installer it does not work. I know this is not ideal but i need it with my files. Any IDEA??
Running one installer from inside another is not supported. The bootstrapper project can run your prerequisites and your package in one. Do that instead.
in our bootstrapper WIX project, we have a lot of prerequisites, .MSI and .EXE files. Most of these will install just fine using the InstallCommand parameter in an ExePackage and the DisplayInternalUI parameter in the MsiPackage.
However, there is one program, namely Adobe iFilter, which is a .msi file, which has an installer that for some reason will NOT install with the parameter /quiet, but only /passive. The problem is, that trying to install the file using DisplayInternalUI="no" in WIX does not work, and there is no InstallCommand parameter for .msi files, so I can't silently install the program.
Is there any solution to this, as in, any way to give the .msi installer a "/passive" parameter through WIX? I didn't find anything like this in the documentation.
Thanks in advance.
On the topic of Adobe iFilter itself, interestingly enough, using /quiet DOES install the iFilter application, but DOES NOT set a link to Programs and Features, so you will not see it there or as an installed application in general. However, you can still find the installation files in its default install directory.
On installing something as quiet or passive in general, I have not found anything that allows this specifically, BUT normal Windows Installer Properties can be set using the
<MsiProperty Name="PropertyName" Value"PropertyValue"/>
tag within an MsiPackage.
See documentation here: http://wixtoolset.org/documentation/manual/v3/xsd/wix/msiproperty.html
This includes the "UILevel" property, which is found in every Windows Installer.
See documentation here:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa372096(v=vs.85).aspx
With this, you can set the installer to a reduced UI level, which I assume is the same as calling it with /passive.
My build system creates a MSI using Wix, it then uses WIX to bundle that into another EXE that acts as a bootstrapper. The bootstrapper makes sure all the dependencies are installed (.NET and so forth).
I would like to change some properties inside the MSI depending on who downloads it. I won't know the settings until long after the build is complete.
I am able to do that with the MSI by editing the properties DB. However when I try the same technique with the bundle, it (WIX interop libarary) says it can't open the file.
So, how can I do one of these things:
Edit a property inside the WIX bundle EXE (that I can then pass to the bundled package)
Extract and re-insert the bundled MSI
You can pass properties using commandline to wix bundle. The bundle then can pass the property to MSI.
WiX Bootstrapper: How do I set burn variables from the command line?
Pass parameters from bootstrapper to msi bundle package
The other solution I can think of: If you write your own custom bootstrapper, you'll have access to IBootstrapperEngine::SetVariable, and you can do whatever you want with that, including setting properties that MSI can read. https://wixwpf.codeplex.com/ should be pretty easy.
If you are asking if there is such tool like orca.exe for Wix burn, then I would say no.
Potential options:
Generate wix burn installer on the fly (including compilation)
Split up executable: set the Compressed attribute to "no". You'll have access to *.msi then.
I have created a bootstrpper using the dotNetInstaller tool. The created bootstrapper internally has these installers:
.NET Framework 4.0
SQL Server Express
Now through WiX, what are the steps that I need to follow to invoke the above Bootstrapper from WiX?
You should not invoke a bootstrapper from WiX - that has no sense. The idea behind the bootstrapper is to "bootstrap" the prerequisites of the installation (.NET and SQL Express in your case) and the main installation package. The main package you generate with WiX should be launched from inside the bootstrapper when the prerequisites are checked and optionally installed.
See this article for better understanding how to start with bootstrapper authoring with WiX.
If you are using WiX to create installers, I would suggest using WiX to create your bootstrapper as well.
http://wix.sourceforge.net/manual-wix3/authoring_bundle_intro.htm
You can only invoke packages from using bootstrapper, you can't invoke it from WiX. By the use of dotNetInstaller you can easily invoke one after another. One of the process as #Yan introduced. By the help of prerequisites folder. It is a very efficient and popular process. But what can I suggest for you, invoke link instead of folder. So your installation full package wouldn't not so bulky. Whatever the msi need it can directly download from internet and install it one after another. Follow the link.
http://www.codeproject.com/Articles/5116/dotNetInstaller-Setup-Bootstrapper-for-NET-Applica