[wix-users] Error in Light

Habib Salim habib at hsalim.com
Wed Apr 26 11:38:41 PDT 2017


I am spending far more time on this than I want to.
If you are a Wix Toolset expert and want to help me sort out this
installation as a moonlighting gig, I'd be happy to engage your services
through upwork.com



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Habib Salim
Sent: Wednesday, April 26, 2017 2:14 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Error in Light

I commented out the component to modify the file
(cmpModifyApplicationConfig).  The build completed successfully.  

When I examined the MSI in Orca, I noticed that the KeyPath was empty, and
there was a CreateFolder table in the MSI - directory: INSTALLFOLDER,
Component_:cmpAppConfig.

I moved the KeyPath attribute from component to the file element.  The
component has a key path to the file, there is no create folder table in
the MSI, but I still get the error.
 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Edwin Castro
Sent: Wednesday, April 26, 2017 1:23 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Error in Light

The format suggested, [#$(var.ExeName).config], depends on the File/@Id
for the specific file you are trying to change. I see the component for
$(var.ExeName).config has an Id but the File element does not. That means
the File Id is generated and you don't know it ahead of time. I'd
recommend you explicitly set File/@Id and then use that Id in
XmlConfig/@File. Some thing like this:

      <Component Id="cmpAppConfig"
Guid="7C93264D-6DBA-4614-9693-5AC244F30986" KeyPath="yes">
        <File Id="fileAppConfig" Source
="$(var.SourceFilesDir)\$(var.ExeName).config">
          <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]"
GenericAll="yes"/>
        </File>
      </Component>

And then you can set XmlConfig/@File="[#fileAppConfig]".

To use XmlConfig/@File="[#$(var.ExeName).config]" as originally suggested
you would need:

      <Component Id="cmpAppConfig"
Guid="7C93264D-6DBA-4614-9693-5AC244F30986" KeyPath="yes">
        <File Id="$(var.ExeName).config" Source
="$(var.SourceFilesDir)\$(var.ExeName).config">
          <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]"
GenericAll="yes"/>
        </File>
      </Component>

--
Edwin G. Castro


On Wed, Apr 26, 2017 at 9:47 AM, Habib Salim <habib at hsalim.com> wrote:
> Thanks for the fast response!
> I tried both
>                         File="[#$(var.ExeName).config]"
>                         File="[INSTALLFOLDER]$(var.ExeName).config"
> I still get the error
>
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Nir Bar
> Sent: Wednesday, April 26, 2017 12:35 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] Error in Light
>
> The XmlConfig/@File attribute should be the path to the file on the 
> target system, not on the build machine.Change it to 
> [#$(var.ExeName).config] and it should work.
>
> Nir Bar
> Panel::Software Architecture and Development
>
> ______________________________________________________________
> JetBA.net- Native and WPF WiX BootstrapperApplication Frameworks
>
>
>
>
>
>
>
>
> ____________________________________________________________________
> 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/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/


More information about the wix-users mailing list