[wix-users] SourceDir - Odd Behaviour
mbeaudry at matrox.com
Mon Mar 14 13:39:01 PDT 2016
I solved my issue, but not sure why this is the case, as when I inspect my MSI with Orca to see the order of ResolveSource it should always get called before my CA.
The UILevel is because my batch file runs the MSI in silent mode for automation purposes. But SouceDir gets correctly populated both in published and silent mode.
<ResolveSource After="CostInitialize" Overridable="yes">Not Installed AND (UILevel = 2 OR UILevel = 3)</ResolveSource>
If someone has insight, I would still appreciate a better/deeper understanding of this.
From: Marc Beaudry [mailto:mbeaudry at matrox.com]
Sent: March-14-2016 2:07 PM
To: 'WiX Toolset Users Mailing List'
Subject: SourceDir - Odd Behaviour
I have been reading on SourceDir property and how it works, and I have a weird behaviour in one of my MSI's.
I have a CA that gets execute in the InstallExecuteSequence "After" installInitialize. Inside my CA written in C# I have this line:
string sourceFolder = session["SourceDir"];
This works as expected, when I simply run (double click) my MSI, I get the folder that my cab files are located in.
The odd thing is that when I run my MSI from a batch file (this allows me to set some public properties), and right click "run as admin" my sourcedir is blank, as if ResolveSource was not yet executed.
Is there a subtlety I am missing here?
Thanks for the insight,
More information about the wix-users