se_pavel
se_pavel

Reputation: 2208

WIX :: How to install file in LocalLow folder

Is there way to install file in LocalLow folder using WIX script?

Updated:

I can put the following code for XP

<Directory Id="AppDataFolder">
   <Directory Id="ApplicationData">
       <Directory Id="ProductName">

and this for Windows Vista and later

<Directory Id="AppDataFolder">
   <Directory Id="AppData">
       <Directory Id="LocalLow">
           <Directory Id="ProductName">

but how can I push WIX/MSI to select right variant during runtime?

Upvotes: 1

Views: 1592

Answers (2)

Alex Zharnasek
Alex Zharnasek

Reputation: 519

AppDataFolder mapped to Roaming folder, so it isn't a solution

  1. create a folder like LOCALLOW (parentDir: TARGETDIR)
  2. remap it with CustomAction to [%USERPROFILE]\Appdata\LocalLow *(e.g. @WiX CustomAction Id="SET_LocalLowFolder" Directory="LOCALLOWDIR" Value="[%USERPROFILE]\Appdata\LocalLow")* before InstallInitialize.

!!! this folder makes sense only on Vista & later, so make such component conditional

Upvotes: 0

Sasha
Sasha

Reputation: 8860

Yes, you can install (copy) files in any folder you have write access to. Just specify the required directory path with Directory elements.

PS: WIX documentation is poor, but don't expect they will list every possible folder on your machine =).

Upvotes: 1

Related Questions