[wix-users] custom destination directory

Lewie Fitz lewfitz at gmail.com
Tue May 31 08:10:27 PDT 2016


Thanks! This issue was resolved. The problem was simply a typo of "id" 
instead of "Id". Here is the currently working section:

         <Property Id="PublicDir" Value="C:\Users\Public"/>
         <Directory Id="TARGETDIR" Name="SourceDir">
             <Directory Id="PublicDir">
                 <Directory Id="APPLICATIONROOTDIRECTORY" Name="AppName"/>
             </Directory>
         </Directory>

I have a very specific reason for using a custom default install 
destination. This is an install that is only going to a few people. It 
will not be published to the public. If I were doing that kind of 
install, I would definitely stick with the system defaults.

On 5/31/2016 7:57 AM, Walter Dexter wrote:
> Are you asking specifically how to say "put it in
> C:\Arbitrary\Custom\Directory\Path" or do you want it as a subdirectory of
> a "well known" directory?
>
> If the first, it's tricky, because that's not the "right" way to do things.
> You're supposed to let the system layout specify where things go.
>
> The systems I create MSIs for are all in-house and all identical. But I
> have 14,0000 identical systems of one type, and 2,000 of another type.We
> put things in arbitrary and peculiar places sometimes, so I had to figure
> this out.
>
> In any case, if that's what you really want to do, here's how I do it.
>
> <CustomAction Id="CA_SetCDrive" Directory="C_DRIVE" Value="c:\" />
>
> <InstallExecuteSequence>
> <Custom Action="CA_SetCDrive" After="CostFinalize" />
> </InstallExecuteSequence>
>
>          <Directory Id="TARGETDIR" Name="SourceDir">
>              <Directory Id="C_DRIVE" Name="CDrive">
>                  <Directory Id="DIR_ARBITRARY" Name="Arbitrary">
>                      <Directory Id="DIR_CUSTOM" Name="Custom">
>                          <Directory Id="DIR_DIRECTORY" Name="Directory">
>                              <Directory Id="DIR_PATH" Name="Path" />
> </Directory>
>                      </Directory>
> </Directory>
>     </Directory>
>          </Directory>
>
>
> Then you can use "DIR_PATH" as a directory Id in all the usual ways. I
> might have messed up the matching of </Directory> but I'm sure you can work
> it out.
>
>
> On Fri, May 27, 2016 at 9:52 AM, Hoover, Jacob <Jacob.Hoover at greenheck.com>
> wrote:
>
>> Id != id
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
>> Of Lewie Fitz
>> Sent: Friday, May 27, 2016 9:52 AM
>> To: wix-users at lists.wixtoolset.org
>> Subject: [wix-users] custom destination directory
>>
>> Hello,
>>
>> I would like my installer to default to a custom destination directory
>> such as C:\Users\Public\AppName and let the user select a different
>> directory if required. I see how to install to the programs directory (and
>> other system dirs), but I can't find any info on setting up a custom
>> directory. I tried creating a SetProperty entry, but I get error
>> CNDL0010 : The SetProperty/@Id attribute was not found; it is required.
>> This is what I am doing:
>>
>>
>>           <SetProperty id="PublicDir" Value="C:\Users\Public"/>
>>           <Directory Id="TARGETDIR" Name="SourceDir">
>>               <Directory Id="PublicDir">
>>                   <Directory Id="APPLICATIONROOTDIRECTORY" Name="AppName"/>
>>               </Directory>
>>           </Directory>
>>
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> https://www.avast.com/antivirus
>>
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the wix-users mailing list