Wix toolset: create directory in root disk (system disk or c:\) and copy files inside
Here is a complete working solution based on your code simplified (notice the comment in the code):
<?define ProductVersion = "13.1.2.3"?>
<?define ProductUpgradeCode = "12345678-1234-1234-1234-111111111112"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="$(var.ProductUpgradeCode)" Name="MyProgram"
Version="$(var.ProductVersion)" Manufacturer="COMPANY" Language="1033">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="MyProgram" />
<Directory Id="ANOTHERLOCATION" />
</Directory>
</Directory>
<!-- The casing of 'ANOTHERLOCATION' and 'WindowsVolume' is very important here.
Replace 'MyNewDir' with the correct name of the folder you want on
WindowsVolume.
-->
<SetDirectory Id="ANOTHERLOCATION" Value="[WindowsVolume]MyNewDir" />
<Feature Id="DefaultFeature" Level="1">
<Component Directory="INSTALLDIR">
<File Id="ApplicationFile1" Source="C:\Users\user\Desktop\myprogram.exe" />
</Component>
<Component Directory="ANOTHERLOCATION">
<File Id="ApplicationFile2" Source="C:\Users\user\Desktop\InstallerFiles_13_4_9_3\myprogramLauncher.jar" />
</Component>
</Feature>
</Product>
</Wix>
Ok, you can do something like this:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="WindowsVolume">
<Directory Id="MyNewDirId" Name="MyNewDir">
<Component Id="SampleComponent" Guid="...">
<File Id="SampleFile" Source="..." KeyPath="yes" />
</Component>
</Directory>
</Directory>
</Directory>
This will install the file to the MyNewDir folder on Windows drive (C: in my case).
However, it will complain that using WindowsVolume
in this fashion might have unexpected side effects.
To satisfy that validation, you can change the sample to:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="MyNewDirId" Name="MyNewDir">
<Component Id="SampleComponent" Guid="...">
<File Id="SampleFile" Source="..." KeyPath="yes" />
</Component>
</Directory>
</Directory>
<SetDirectory Id="MyNewDirId" Value="[WindowsVolume]MyNewDir" />
This looks more like a hack, but the result is the same. To be honest, I don't understand what those "unexpected side effects" could be. Maybe, Windows Installer gurus can shed some light on this.
Hope this helps.