I’m trying to create a (hopefully) simple installer using WIX, however it seems I’m at my wits end. I cannot for the life of me figure out how to specify a predefined path to install my files. What the installer need to do is this:
- Install 4 fonts
- Install (copy) a binary file and a .ini file to a predefined path (“C:\dvimport”)
- Create shortcut to previous binary on the desktop
- Run a binary installer provided along-side (hopefully bundled inside) the installer.
Also, on a side note; the user should not be able to change the predefined path, cause the application will not run if not installed on the correct path.
Currently what I have is this (which is mostly predefined):
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="660d9ab6-dbd9-4440-b56b-8f1c29d9ab86" Name="FDVweb hjelpefiler" Language="1033" Version="1.0.0.0" Manufacturer="CuroTech" UpgradeCode="4283b7c8-0057-4dcc-bfc5-7c06a12cba90">
<Package InstallerVersion="200" Compressed="yes" Keywords="Installer" Description="FDVweb hjelpefiler installasjons-program" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Binary Id="BarCodeDriver" SourceFile="barcode_install.exe" />
<CustomAction Id="InstallBarCodeDriver" BinaryKey="BarCodeDriver" ExeCommand="" Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="FDVweb">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<!-- <Component Id="ProductComponent" Guid="55a9465e-2350-48bc-9786-22a036ea7304"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="FontsFolder">
<Component Id="C128_100" Guid="72E7E1D2-DEE7-4E0B-939F-5460AD432BEF">
<File Id="C128_100.tff" Source="fonts\C128_100.tff" TrueType="yes" />
</Component>
<Component Id="C128_200" Guid="230EE8B3-06F9-4D88-AFF5-3D26AF0741AD">
<File Id="C128_200.tff" Source="fonts\C128_200.tff" TrueType="yes" />
</Component>
<Component Id="C128_300" Guid="3DC98EE5-B969-453E-B4E9-5D5BC1416F24">
<File Id="C128_300.tff" Source="fonts\C128_300.tff" TrueType="yes" />
</Component>
<Component Id="C128_400" Guid="8CFCAFBE-C7B8-46F1-9C6D-ACF2D881BAEE">
<File Id="C128_400.tff" Source="fonts\C128_400.tff" TrueType="yes" />
</Component>
</DirectoryRef>
<Feature Id="Complete" Title="FDVwebInstall" Level="1">
<!-- TODO: Remove the comments around this ComponentRef element and the Component above in order to add resources to this installer. -->
<!-- <ComponentRef Id="ProductComponent" /> -->
<ComponentRef Id="C128_100" />
<ComponentRef Id="C128_200" />
<ComponentRef Id="C128_300" />
<ComponentRef Id="C128_400" />
<!-- Note: The following ComponentGroupRef is required to pull in generated authoring from project references. -->
<ComponentGroupRef Id="Product.Generated" />
</Feature>
</Product>
</Wix>
I don’t need a definite answer, a link to resources explaining how to achieve what I want would go a long way.
I found the solution to my problem.
The answer was to use the Directory
WINDOWSVOLUME.Here is the solution in WIX-xml: