Set the default path for it to be AppData & add a Type 51 Custom Action
to change the path to your .exe's directory when the main feature is
selected for install.

Simplest option would be to modify your app so it always loads the
config from AppData regardless & just put it there. Actually why does it
need to be in the same directory as the .exe in the first place? From
your description it sounds like you could just put it in AppData & it'd
work as long as there wasn't one in the same directory as the .exe.

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer


-----Original Message-----
From: Dave Brotherstone [mailto:dav...@pobox.com] 
Sent: 17 March 2010 06:59
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Invert Feature based on other Feature

Hi all,

I have a feature that controls where the config file for our application
is located (either "locally" next to the exe in Program Files, or in
%APPDATA%).  When this feature is selected, the config file is copied
correctly to the right place, and the indicator file (to let the .exe
know that the config should be loaded next to the .exe rather than
%APPDATA%) is also created.

However, if this feature is not selected, I need to place the config
file in %APPDATA%.  I had attempted to do this with a hidden feature for
the appdata config, and conditions on the main feature action, but that
doesn't seem to work.

FT_DOLOCALCONF is the feature that is shown to the user.  I've tried
with !
states as well, but from what I've read action state is correct to use
in this case?

<Feature Id="FT_APPDATACONFIG" AllowAdvertise="no" Level="0"
Display="hidden" Title="Hidden feature for AppData Config">
                <Condition Level="1">NOT
&amp;FT_DOLOCALCONF=3</Condition>
                <Condition Level="0">&amp;FT_DOLOCALCONF=3</Condition>
                <ComponentRef Id="C_APPDATACONFIG" />  </Feature>


Many thanks for any pointers,

Dave.
------------------------------------------------------------------------
------
Download Intel&#174; Parallel Studio Eval Try the new software tools for
yourself. Speed compiling, find bugs proactively, and fine-tune
applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to