MSI Installer error-dialog localization (WiX) - wix

I have created an MSI installer for a .NET 3.5 application written in Visual Studio Express 2008. The installer UI is localized (to danish) and looks fine. My problem is that errors, say a previous version is installed and needs to be removed first, the error dialog is in english. How do I localize error-dialogs too?

I'm not familiar with Visual Studio, but have you checked out http://www.tramontana.co.hu/wix/lesson2.php#2.3 - you need to ensure you specify the correct language and codepages in the Product and Package tags. You might need to edit the source wxs file if VS doesn't provide a GUI for this.

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

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.

Installing Visual Studio Snippets with Wix

I created an installer for MVVM Light and part of the installation is about code snippets for Visual Studio 2010, 2010 Express and 2008. Unfortunately, the code snippets are installed into a folder with a LCID (culture code, for instance 1033 for en-US). If the snippets are not in the correct folder/LCID, Visual Studio doesn't load them (yes, utterly stupid I know. But this is what we have...)
When VS is installed in English, all is well. However when a Geman (for instance) version of VS is found, the snippets fail to register in VS.
Is there a way in Wix to detect the LCID and to use that as a property, in other words to install the snippets in the correct folder depending on the LCID? I know about multilanguage installers but it seems like a bazooka to kill a fly. Any other idea?
Thanks,
Laurent
The user's locale is available in the UserLanguageID property. You need a SetDirectory to assign the runtime value to a directory's name.

What are the options to build an installer on a build-server without Visual Studio

It seems like it's still not possible to build .vdproj on a build-server without having Visual Studio installed. However, using Wix seems to be a lot more complicated.
Are there any other options to do the following task:
Visual Studio 2010 Solution with multiple projects (.csproj)
Many loose content files (not inside assemblies)
Installer must be built on Build-server without Visual Studio on it (devenv.exe / devenv.com)
Installer must create Registry keys
Installer must associate file extensions with installed product
Installer must support upgrades (version upgrades)
Installer should be able to register COM components
Installer should be able to pre-JIT assemblies
My goal is:
Effort to maintain installer is low
Minimal changes if new project (assembly) is added to solution
Ideal: no changes if new content files are added to any of the projects
Maybe I just did not get the point with Wix, but including project output (like in .vdproj) seems very complicated.
Any suggestions very much appreciated!
OK I decided to go with Wix. Found out that using Votive it's possible to include project output like in .vdproj (Binaries, Content, Symbols and even Source Code).
If I run into more complicated situations where this isn't sufficient, I could fall back to some kind of harvester (Heat, Paraffin).
See some more Links in comments below (too little reputation to post more than 1 link in this post).
Check out InstallShield 2010 Limited Edition ( Free for Visual Studio 2010 users ). It has pretty much all the functionality that VDPROJ ( being retired btw ) has and supports silent builds. You can get one license for your dev box and one license for your build machine pretty easily.

windows installer for COM component

I have a C++ activex control that I need to make an installer for. It needs to drop the dll and make some registry keys.
I have about 6 .RGS files which I made for self-registration via regsvr32, which work.
To do an installer I am manually porting the RGS scripts into the visual studio 2008 windows installer registry GUI. I feel like its not possible to do an exact port (e.g. RGS keywords like ForceRemove).
Isn't there a way to generate these files from the IDL file? Am I doing this wrong?
SelfReg is not a best practice in an MSI install because it's out of process and fragile. Visual Studio 2008 Installers are limited but you should be able to set the Register property to vsdrfCOM instead of vsdrfCOMSelfReg. This will cause the COM meta data to be harvested from your DLL and authored natively in MSI.
After you build your MSI, you should notice the SelfReg table is empty and a serious of automatically authored rows in the Registry table for you COM data.
Note: VDPROJ is kind of flakey at extracting this COM so it may not work. You might have to consider a stronger tool such as InstallShield or Windows Installer XML.
You are doing it wrong. The .rgs files are there so that the component can install itself. Any installer supports letting a component install itself. A Visual Studio Setup project for example, set the Register property.