Search code examples
installationwixwix3.5usergroups

WiX error LGHT0094: Unresolved reference to symbol Group:Users in section Fragment


I am trying to add a new user in wix using the following component

<Component Id="NewUser" Guid="">
  <CreateFolder />
  <util:User Id="CIUSER" CreateUser="yes" UpdateIfExists="no" Name="ELASTICUSER" PasswordNeverExpires="yes" Password="eur1357">
     <util:GroupRef Id="Users" />
  </util:User>
</Component>

when I compile this code using candle though I am specifying -ext WixUtilExtension in the command line, I get the following error:

error LGHT0094: Unresolved reference to symbol 'Group:Users' in section 'Fragment:'

Could you please tell me what I am missing?


Solution

  • You need to add a Group definition.

    <util:Group Id="Users" Name="Users"/>
    
    <Component Id="NewUser" Directory="INSTALLDIR" Guid="{0F8A5093-39EF-4F63-B7FA-A2931C21C865}">
      <CreateFolder />
      <util:User Id="CIUSER" CreateUser="yes" UpdateIfExists="no" Name="ELASTICUSER" PasswordNeverExpires="yes" Password="eur1357">
         <util:GroupRef Id="Users" />
      </util:User>
    </Component>