[wix-users] SourceDir not available in Silent mode

Marc Beaudry mbeaudry at matrox.com
Fri Sep 15 06:02:05 PDT 2017


In case anyone comes across the same issue, here is my final solution:

<Property Id="MySourceDir">"$(env.TEMP)"</Property>
<SetProperty Id="MySourceDir" Before="FileCost" Value="[SourceDir]" />

Also in InstallExecuteSequence run the ResolveSource before the FileCost

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Wheeler, Blaine (DSHS/DCS) via wix-users
Sent: September-14-2017 2:25 PM
To: WiX Toolset Users Mailing List
Cc: Wheeler, Blaine (DSHS/DCS)
Subject: Re: [wix-users] SourceDir not available in Silent mode

This will work if you are absolutely certain there is a c:\

Another way I found and use is from http://kentie.net/article/wixtipstricks/
Look at the " TARGETDIR and the system partition" section where this sample
is <Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="WINDOWSVOLUME" >
    <Directory Id="INSTALLLOCATION" Name="SetupProject1">
    </Directory>
  </Directory>
</Directory>
 
<SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]"/> The SetDirectory
element is required as trying to use WindowsVolume directly results in

error LGHT0204: ICE99: The directory name: WindowsVolume is the same as one
of the MSI Public Properties and can cause unforeseen side effects.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Marc Beaudry via wix-users
Sent: Thursday, September 14, 2017 5:39 AM
To: 'WiX Toolset Users Mailing List'
Cc: Marc Beaudry
Subject: Re: [wix-users] SourceDir not available in Silent mode

Hello All,

Found a solution: If this is completely incorrect let me know:

I created a Property: 
      <Property Id="MySourceDir">C:\</Property> Then I set my property value
like this:
     <SetProperty Id="MySourceDir" Before="FileCost" Value="[SourceDir]" />

I also in InstallExecuteSequence run the ResolveSource before the FileCost

This works in both silent and published mode.

Thanks
Marc

-----Original Message-----
From: Marc Beaudry [mailto:mbeaudry at matrox.com]
Sent: September-13-2017 2:05 PM
To: 'WiX Toolset Users Mailing List'
Subject: [wix-users] SourceDir not available in Silent mode

Hello Wix Experts,

I have an MSI that executes correctly when running in "Normal" mode, meaning
with UI.

When I run the same MSI in silent mode I get a SourceDir error Error code
2706: Source paths not created. No path exists for entry [2] in Directory
table.

I know where my error comes from:
<CopyFile Id="CopyVersionFileId" SourceProperty="SourceDir"
SourceName="Versions.txt" DestinationProperty="MYDESTPATH"
DestinationName="Versions.txt"/>

My Question: 
- Can this be done using my approach, or do I need to write a CA for this?
- Can I delay the check of SourceDir in Silent mode so it behaves like
published mode.

The Problem:
I need to copy a simple text file that gets generated once all the various
MSIs and other installers get created to a folder on the destination system.
I chose one of the MSIs to do this, copy from source folder to destination
folder. 

Let me know
Thanks for the help,
Marc
____________________________________________________________________
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