med...@layout attribute is used during the build to facilitate placement of
the files into your media layout (the way you transfer your build output
onto your multiple CDs or whatever). The data in that attribute is not
preserved in the MSI and is not available/doesn't alter the way that Windows
Installer searches for the files it installs.

You would need to change the source information in the Directory tree for
what you are trying to do, and the location of the files must be relative to
the location of the MSI file (it can't be absolute).

-----Original Message-----
From: Leif Ringstad [mailto:lei...@gmail.com] 
Sent: Friday, June 18, 2010 1:02 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Change media source/layout through property

Hi

I'm trying to change the media layout through the command line when running
msiexec.

I thought it should be enough to have a <property> and set that to the
Layout of the Media, but I cannot get it to work properly.

I'm wondering if this is possible, as I've tried this, and it doesn't seem
to work. It only looks for it at the location where the msi is located. When
logging I can see the property beeing set, but it doesn't seem to affect the
media layout.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
<Product Id="PUT-GUID-HERE" Name="Test media source" Language="1044"
Version="1.0.0.0"  Manufacturer="test"  UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="no" Description="abc" />

  <Property id="PATH_TO_SOURCE" secure="yes>
  <Media id="1" Layout=[PATH_TO_SOURCE]>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder">
      <Component Id="readme_comp" Guid="PUT-GUID-HERE" DiskId="1">
        <File Id="readme_file" Source="readme.txt" />
      </Component>
    </Directory>
 </Directory>
<Feature Id="test_feature" Title="test">
  <ComponentRef="readme_comp" />
</Feature>
</Product>
</Wix>

Command line: msiexec /i test.msi PATH_TO_SOURCE="c:\somepath\"

thanks,
Leif
----------------------------------------------------------------------------
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to