How can I change the text in the Wix installer dialog? - wix

My text message is stuck to "Install My Product to:"
How can I change this?
("My Product" is the name of my product and the string above is resolved based on the Name attribute in my Product.wxs).
I have 2 dialogs and the second requires a different message.

Some text on the built-in dialogs can be changed with variables specified in the localization file for your language. This is a simpler task than if you are trying to change text that is not kept in a variable.
This process is documented here.
However, if that's the case, the recommended way to change the dialog on the install page is to make a copy of and change the template file(s) provided with the WiX installation.
Copy the relevant .wxs files from your WiX dialog extension set (you will need to make sure you installed the WiX source) you want to modify and copy the file that specifies the UI extension name. Modify it to suit your needs and change the names.
When you compile your installer, you will use your new extension name (referring to your modified dialog set) and tell candle/light where your modified .wxs files are.
This process has some good documentation here and here.
Following the entire tutorial at the second link should get you pretty far.
Good luck

Related

Is there a built in way to hide a file in Wix?

The company I work for has recently taken to generating MSI files with Wix. We're at the tail end of the process, but there's one more thing they need me to do.
We have an XML file with a snapshot of what binaries have gone into the install. However, the customers we deliver to will get somewhat confused about an extra useless file in the install.
Most everything that comes up when I search for 'Wix' and 'hide file' is focused on removing or deleting the files after install. I just need to hide this sucker though.
Is there a way to hide the file through HEAT or something? I can modify the file element in the WXS using XSL or Powershell if need be. Or do I need to resort to a custom action that calls cmd.exe to hide it?
You can try setting the file element's hidden attribute to yes. Taken from here:
Set to yes in order to have the file's hidden attribute set when it is installed on the target machine.

Can I increase the size of the feature selection window of `WixUI_Mondo`?

WiX. I use WixUI_Mondo. Can I increase this Window size?
Short answer is yes.
Long answer is that you will need to grab the wix source for the dialogs used within the WixUI_Mondo UI and modify the sizes of all the windows.
Here is the link to the WixUI_Mondo wxs file. You can see the DialogRefs used for this UI set. You can go up one level in git to look at the wixlib files and see that each DialogRef has its own wxs file defining the dialog itself. You'll need to copy the contents of each dialog ref into their own wxs files within your wixproj installer project and then you can modify the sizes of each dialog and realign some UI elements if needed. If you still need the WixUIExtension, you'll need to change the names of each dialog and the UI to not conflict with the defined UI and dialogs in the extension.
You can use localization files to change the dimensions of a control or dialog.

How to set Uninstall Successful message in WixStdBA

In WiX 3.9 and earlier, there was no way to customize the message that WixStdBA shows when the operation completed. I see that bugs 4149 and 4604 have been resolved as fixed. Which version of WiX are these fixes available in, and how do I use this new functionality?
In WiX v3.10.0.1403, support was added for specifying different strings for success/failure of install/repair/uninstall. If you're using the builtin theme and localization file, then you get the new strings automatically. Otherwise, look at the pull request to see what was added to the builtin themes and localization files and put them in your customized files.
In WiX v4.0.2603.0, breaking changes were made to the schema of theme files. As part of that change, the Text element was renamed to Label and the new Text element allows conditionally setting the text of a control. In WiX v4.0.2926.0, the builtin themes and localization files were updated to show the same text as v3.10 does. Take a look at that commit to see how that functionality was added.

Embedding an image as a resource in a FireBreath plugin

While using VS (2010), I used to be able to add an image as a resource simply by going to the Resource view and then: Right click project > Add > Resource > Import.
I even asked a question about how to then load it: Loading an image from a resource embedded in a dll, but that changed for some reason.
Now when I try the same thing and save the .rc file, I get this message:
"The resource script FILE_PATH.rc was not created using Microsoft
Visual Studio. Comments, macros, preprocessor directives, and
conditionally included information may be modified and/or removed from
this file during the build process. Replace existing file?"
Even if I click "yes" (in order to just test things) then I get all kind of error messages at compile time:
ResourceCompile:
gen\firebreathWin.rc(8): error RC2144: PRIMARY
LANGUAGE ID not a number
gen\firebreathWin.rc(16): error RC2135: file not found VS_VERSION_INFO
etc...
I have two questions:
What is the correct way to add an image resource which will be added to the compiled plugin using CMake? I searched about it and couldn't find any helping information.
What can be the cause for this change in behavior? since I was able to use the same exact steps before and it worked.
Thanks.
First of all, I wouldn't do this; instead, I'd just put the file in the same directory as your DLL and use the path of DLL to find it.
That said, the "correct" way to do this would be to see what changes are made to the .rc file when you add it in the IDE, copy the .rc file from gen_templates/ in the root of the firebreath directory into your project, and then make those changes to your copy of the file. Any changes you make to the generated file will be overridden any time cmake is run again, which can happen any time your cmake files (CMakeLists.txt, *.cmake) change.

Copy files from Setup location to installation dir

I am working on my Wix project and have 2 questions:
1) How can I copy file from the same location as my .msi is to the destination folder specified during installation. This file is not part of .msi package but a customized file that needs to be copied after the installer copies the main code files.
2) If this customized file is not available at the location where .msi file is, then I need to show up a OpenFile Dialog so that user can specify the location of this file.
In short, by default the installer should look for the customized file at the same location where the installer is and if the file is not available then show OpenFile Dialog.
Any suggestion or sample code snippet would be very helpful as I am bit new to WIX world.
Thanks for your time.
Ok, first thing you should find out if the file is there. Use DirectorySearch/FileSearch elements for this.
Next, based on the file search result (it will end up in a certain property) schedule and condition a new dialog. You can find how to customize your dialog UI sequence here.
And finally, use CopyFile element to do the copy work.