I've used the dark.exe to create a WXS file from my 'old' Visual Studio 2010 msi file.
When I open the created WXS file, It has binary references on the top of the file that I can't explain. Can somebody tell me about it? And where can I find some documentation about it?
<Binary Id="InstallUtil" SourceFile="C:\Temp\Binary\InstallUtil" />
<Binary Id="MSVBDPCADLL" SourceFile="C:\Temp\Binary\MSVBDPCADLL" />
<Binary Id="VSDNETCFG" SourceFile="C:\Temp\Binary\VSDNETCFG" />
<Binary Id="DefBannerBitmap" SourceFile="C:\Temp\Binary\DefBannerBitmap" />
<Binary Id="UpFldrBtn" SourceFile="C:\Temp\Binary\UpFldrBtn" />
<Binary Id="NewFldrBtn" SourceFile="C:\Temp\Binary\NewFldrBtn" />
The top three are giving me the most questions because I don't where there for and what they do.
Short answer - these files are used in ui dialogs, custom actions, all places where some files are applicable to the functionality of the setup itself, but the product it installs.
In your case, the first three are DLLs used by Visual Studio Setup Projects to perform custom actions - MSI extensibility blocks. The last three are the icons used in UI dialogs later in code.
To get the files themselves, you should use export binaries parameter for Dark.exe.
Now, your options here depend on what you want to achieve. If your task is just upgrade your setup to VS2012, quick and dirty, then use the exported files as they were, it should work.
If, however, you want to do it clean and nice, or you should update your setup with new features, then you will have to rewrite these.
For UI: if your project does not contain custom UI, I suggest switching to WIX UI library - nice and built-in. If you have custom UI, you may extend it, but it is a lot more work. There are visual UI editors for WIX.
For custom actions: custom action is something you use when MSI/WIX abilities do not give you enough. To upgrade these, you should look where these first three binaries are used, and how they are called. Usually, the meaning of custom action may be devised from its name. Then, you have to replace these custom actions with your own (or ready-made by others or WIX team) that do the same. Then you may remove the unused binaries.
Related
I have an .exe embedded inside my MSI installer which I'd like to somehow call directly from the installer, before the the 'InstallFiles' action occurs.
It's defined as follows:
<CustomAction Id="LaunchInstallManager_TryUninstall" Return="ignore" Directory="INSTALLFOLDER" Execute="deferred" Impersonate="no" ExeCommand=""[#fil713F8F6A7BC9B98857D779B9B29873E1]" /someargument"></CustomAction>
<Custom Action="LaunchInstallManager_TryUninstall" Before="InstallFiles">NOT Installed</Custom>
But upon looking at the logs, it looks like it's (trying to be) called from the install destination.
Is such a thing possible?
It is possible, but in a different way. The 'run EXE' type of custom action will always search for the executable on the target system. Thus, if your executable is installed along with your app, it is not an option.
Here is another way:
First, author your EXE as a <Binary> instead.
It is as easy as <Binary Id="MyEXE" SourceFile="PATH\TO\EXE" />.
Add a DLL deferred custom action, which will extract the binary, run it with parameters and clean up afterwards.
This post can give you an idea how to extract the binary using C# and DTF. Besides, in case you need to pass parameters, make sure you do it the right way for deferred custom action.
Finally, remember that each deferred custom action (that is the one to change the target system) must have corresponding rollback action. This article might give you some hints on how to test the direct and rollback behaviors of your custom actions.
I have been asked to add a function to an existing WiX package.
Specifically, I need to run a small c# application and return a single int back to WiX to conditionally control further actions.
I can see from ExePackage help that there is an ExitCode, but this is an enumeration of success, error, scheduleReboot or forceReboot.
I have googled quite a bit and I am wondering if I am missing the point. I can probably implement the C# process internally within WiX to get the user to provide the information I need, but the existing package already has custom ExePackages written in C# with a particular style, so I'd like to stay with that if I can. (The existing packages don't return any needed values)
Can I do this, or do I need to try and operate entirely within WiX?
For reference, one of the existing packages looks like this:
<ExePackage
SourceFile="..."
DisplayName="License Key"
InstallSize="0"
Permanent="yes"
InstallCommand="/ignoreIfLicensed"
RepairCommand="/ignore"
UninstallCommand="/ignore"
/>
The reference to <ExePackage ...> implies you want the condition to operate in a WIX bundle. In this scenario I think your options are limited and you can only map the return value of an ExePackage to global behaviour like forceReboot.
Do you have any <MsiPackage...> references? If you have, you could move the conditional behaviour inside each <MsiPackage...> using a Custom Action to call the exe and set a property. The property can then be used as a condition in each <component...> you want to conditionally install. See Using a WiX custom action to set a property's value for more information on custom actions setting properties.
I am trying to use Wingdings in my Wix installer, specifically the characters at 0xFB and 0xFC. I tried unicode variants of these (✗, ✓), but since Wix/MSI requires a specific codepage, these do not work.
My TextStyle is:<TextStyle Id="Wingdings_Font_Normal" FaceName="Wingdings" Size="8" />
My control is: <Control Id="TestResult_Success" Type="Text" X="140" Y="237" Width="24" Height="24" Text="{\Wingding_Font_Normal}ü">
In my UI, a raw ü is rendered, rather than the Wingdings glyph for that character.
Is there some way to get Wingdings working with Wix/MSI?
EDIT:
After having a peek with Orca inside my compiled MSI, I've found that my TextStyle table is being generated correctly:
And the relevant lines of the control table:
I manually added a new TextStyle and changed the Text to use the new TextStyle, but was unable to get any Winding symbols to appear in my installer.
I don't have a citation to share but I'm 99.9% certain the answer is no. Windows Installer native/internal UI is about 16 years old and limited in numerous ways. To create a better UI experience you'd need to provide an external UI handler using a tool such as WiX Burn. This is how WiX provides it's enhanced UI experience. If you don't mind taking a dependency on .NET 3.0+ (which was included in Windows Vista and beyond by default ) you could go as far as use WPF to do the UI work.
You can do it by doing the following:
Create a new entry in the TextStyle table, like this for example:
After this you can reference to the new TextStyle in the Control Table (column "Text") just like this: {\WixUI_Font_Wingdings}YourAwesomeText
I'm trying to develop a Wix project. I'm using Wix 3.6, and everything goes perfect, except when I try to change the default interface of Wix to the WiUI_Mondo one.
I do the following to change the interface:
Add reference to WixUIExtension.dll
Add <UIRef Id="WixUI_Mondo" />
With these simple steps, I should be able to change the interface of my Wix installer. Instead, it is launching an error like this:
Error: ICE17: Bitmap: '
And no more text after the simple comma.
Any idea on why is this happening??
EDIT: This mistake comes from several .wxs files, such as PrepareDlg.wxs, FilesInUse.wxs...
I don't know the exact reason, but you can see in msdn what ice17 is testing:
ice 17 documentation
I am using several articles and other questions in order to override the banner bitmap images for a binary wixlib that I am using in 20+ other installers. This library provides our own custom UI, some custom dialogs, common resources, binaries, custom actions, etc.
Here is the code I am using in the wixlib to override the images:
<Binary Id="WixUI_Bmp_Banner" SourceFile="Bitmaps\bnnrbmp.bmp/>
<Binary Id="WixUI_Bmp_Dialog" SourceFile="Bitmaps\dlgbmp.bmp/>
But when I reference my wixlib in my actual MSI project, everything works except for the UI banner image overrides (my custom dialogs fire, process works, common binaries get installed, etc.). Is there something special I need to do in my binary wixlib project to override the UIExtension.wixlib default images in my own binary wixlib?
I saw this question here: Can WixUiBannerBmp be set in a wixlib?, however the answer to that question didn't answer the question, it was directly related to an icon and I'm not sure this guy was using a binary wixlib (re-distributable). My add/remove programs icon embedded in the wixlib already works just fine.
Images are specified via bind-time variables, not Binary elements. Your .wixlib can contain the variable values. The approach used in Can WixUiBannerBmp be set in a wixlib? doesn't use a .wixlib, but otherwise is the same. (A .wixlib is just a collection of .wixobj files.)
The WiX help file documents the variables in "Customizing Built-in WixUI Dialog Sets":
Replacing the default bitmaps
The WixUI dialog library includes default bitmaps for the background of the welcome and completion dialogs and the top banner of the other dialogs. You can replace those bitmaps with your own for product branding purposes. To replace default bitmaps, specify WiX variable values with the file names of your bitmaps, just like when replacing the default license text.
Example:
<WixVariable Id="WixUIBannerBmp" Value="banner.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="dialog.bmp" />