26

Don't know why but I'm finding it difficult to track down what standard values could be used for the Before or After attributes of a WiX SetProperty declaration.

I'm aware of the following two, but I'm looking for a much more exhaustive list.

  • AppSearch
  • CostFinalize

Here's an example of it in use:

<SetProperty Id="INSTALLFOLDER.WEBSITECLIENT" Value="[INETPUBWWWROOT]\[VIRTUAL_DIR_VAL]" Before="Install" />

The manual / documentation page has nothing on it.

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
Jaans
  • 4,598
  • 4
  • 39
  • 49

2 Answers2

22

This link will give you the suggested Install Execute Sequence and you can use any you want.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa372038%28v=vs.85%29.aspx

Natalie Carr
  • 3,707
  • 3
  • 34
  • 68
  • 2
    Even more: you can reference your custom actions in `Before` and `After` attributes. – Alexey Ivanov Oct 23 '12 at 06:58
  • 4
    There must be something more to it. I've tried several of those values, like "InstallExecute", and I get errors like: "Unresolved reference to symbol WixAction:InstallUISequence/InstallExecute". – Adrian McCarthy Jul 01 '13 at 21:51
  • You also need to set the sequence (it is set to `both` by default). Since all actions given in the link are in the InstallExecuteSequence, you need to use ``. See [this answer](http://stackoverflow.com/a/17184230) for more details, – AJ Richardson Jan 20 '15 at 15:45
  • @Adrian: Natalie's link goes to `Suggested InstallExecuteSequence`, and your error message suggests `InstallUISequence`, see [here](https://learn.microsoft.com/de-de/windows/desktop/Msi/suggested-installuisequence). They differ a bit – crusy Oct 24 '18 at 08:01
0

You don't need to call <SetProperty> to set the installation path of your web app. Instead map the target directory with the <Directory> element.

This post can help get started.

<Directory Id='TARGETDIR' Name='SourceDir'>
  <Directory Id="IISMain" Name='inetpub'>
    <Directory Id="WWWMain" Name='wwwroot'
               ComponentGuidGenerationSeed='CA19CA4A-C69B-4CDB-BCBD-6C3C5E9A3EDC'>
      <Directory Id='INSTALLLOCATION' Name='!(loc.ProductName)'>
      </Directory>
    </Directory>
  </Directory>
</Directory>
KMoraz
  • 14,004
  • 3
  • 49
  • 82
  • 1
    Thanks. It just happened to be an install folder property. The question is more about wanting to know at what other values are valid for the SetProperty method and not about when or where the most appropriate time is to set the web folder.. – Jaans Oct 29 '12 at 15:06