Reputation: 957
I am looking for a precise tutorial of WiX with a project example, if possible. Current tutorials didn't help me a lot.
My requirements are
I have Visual Studio 2008 with WiX 3.0.5419.0 installed.
Upvotes: 1
Views: 825
Reputation: 11358
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ShortcutFolder" Name="My app">
</Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="My Company" Name="My Company">
<Directory Id="INSTALLDIR" Name="My product">
</Directory>
</Directory>
</Directory>
</Directory>
You can nest Directory tags as you like and after that use DirectoryRef to list components that go into this directory.
You can define UIRef with WixUI_InstallDir somewhere in a Fragment, Include, or Module (not in Product, despite the documentation):
<UIRef Id="WixUI_InstallDir" />
This will create a package that uses InstallDir UI, for example, the target directory can be specified in the UI (in case you mean this, otherwise you'll need to define a new dialog from scratch/copy an existing one and insert it into the sequence.)
Specify something like
<RegistryKey Action="none" Root="HKCU" Key="some key">
<RegistryValue Value="some value" Type="string" KeyPath="yes" />
</RegistryKey>
inside a component.
<DirectoryRef Id="ShortcutFolder">
<Component Id="ShortcutsComponent" Guid="{XXXX}">
<CreateFolder Directory="ShortcutFolder" />
<RemoveFolder Id="RemoveShorcutFolder" Directory="ShortcutFolder" On="uninstall" />
<Shortcut Id="UninstallProduct"
Name="Uninstall my product"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"
Directory="ShortcutFolder"
Description="Uninstalls my product"/>
</Component>
</DirectoryRef>
Note the use of ShortcutFolder directory from the directory list I showed earlier.
Not quite sure which dependencies you mean.
.NET Framework? Example:
<Condition Message="This setup requires the .NET Framework 3.5 or later to be installed.">
Installed OR NETFRAMEWORK35 OR NETFRAMEWORK40FULL
</Condition>
Third-party DLLs? You just create a separate component for every DLL and specify the path where WiX should look for it using the File
tag. This component then is listed under a DirectoryRef
tag that specifies where the file goes during install.
Upvotes: 3