Below xml creates the specified folders under C:\Programfiles but I want to create (SomeFolder\MyApp) Folders in D:\MySetupFolder\, how can I create this using the WIX?
<Directory Id="TARGETDIR" Name="SourceDir">
**<Directory Id="$(var.PlatformProgramFilesFolder)">**
<Directory Id="INSTALLFOLDERLOCATION" Name="SomeFolder">
<Directory Id="INSTALLLOCATION" Name="MyApp">
</Directory>
</Directory>
</Directory>
Set the value of rootdrive to the drive you want
System drive will be by default the default drive used by OS
Added code to call 'SetRootDrive' action: You need to call it from InstallUISequence