0
votes

I'm using what appears to be the standard XML for a WiX install. Generally things work like expected for the defaults. Sometimes I would like to install on another drive but, use the standard directory. What seems to be right idea is to specify TARGETDIR=D: on the msi command line:

nonsenseInstaller.msi TARGETDIR=D: /log=Install.log

Typically ProgramFilesFolder is set to: C:\Program Files (x86)\

Below is my WiX XML, pretty standard stuff. What is happening is that ProgramFilesFolder already has C: baked in. Is there a standard WiX way to override this with TARGETDIR? (Or another command line property?)

<Directory Id='TARGETDIR' Name='SourceDir'>
    <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id='Draeger' Name='Dyer Heavy Industries'>
            <Directory Id='APPLICATIONROOTDIRECTORY' Name='Build Tools'></Directory>
        </Directory>
        <Directory Id="ProgramMenuFolder">
            <Directory Id="ApplicationProgramsFolder" Name="New Build Email"/>
        </Directory>
    </Directory>
    <Directory Id="FontsFolder" SourceName="Fonts Folder"></Directory>
</Directory>
1

1 Answers

0
votes

In this case you'd want to say msiexec intaller.msi APPLICATIONROOTDIRECTORY=D:\SomePath

I do see a couple problems with your XML though. ProgramMenuFolder should be a child of TARGETDIR not ProgramFilesFolder. Also APPLICATIONROOTFOLDER should typically be called INSTALLLOCATION to match most WiX convention.